Bishop-Laboratory / RLPipes

RLPipes: A standardized R-loop-mapping pipeline.
https://anaconda.org/bioconda/rlpipes
MIT License
3 stars 1 forks source link

Error building test_data #81

Closed markdunning closed 2 years ago

markdunning commented 2 years ago

Hello,

I'm afraid I'm stuck with the build command on the test_data provided. I have freshly-installed the RLPipes package using conda and activated a new enviroment. I feel the problem is something straightforward, but I'm not much of a Python or conda expert. The error is as follows


(rlpipes) [md1mjdx@sharc-node004 RLPipes]$ RLPipes build -m DRIP rlpipes_out tests/test_data/samples.csv
Traceback (most recent call last):
  File "/home/md1mjdx/miniconda3/envs/rlpipes/bin/RLPipes", line 10, in <module>
    sys.exit(cli())
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/click/core.py", line 914, in make_context
    self.parse_args(ctx, args)
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/click/core.py", line 1370, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/click/core.py", line 2347, in handle_parse_result
    value = self.process_value(ctx, value)
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/click/core.py", line 2309, in process_value
    value = self.callback(ctx, self, value)
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/rlpipes/cli.py", line 289, in validate_samples
    db = SRAweb(os.environ.get("NCBI_API_KEY", None))
TypeError: __init__() takes 1 positional argument but 2 were given

the samples.csv exists in the location I specified, so that is not the issue. Any assistance you can give in debugging / solving the error would be greatly appreciated! I get the same error when trying to build a project for my own dataset.

Many thanks,

Mark

millerh1 commented 2 years ago

Thank you so much for bringing this to my attention! I was able to repeat this error by downgrading my version of pysradb. Therefore, it appears that the version is the problem in this case. Could you please let me know what the following line produces?

pysradb --version

If that is the problem, I think the long-term fix will be for me to pin a minimal version of pysradb for the bioconda recipe. And the short-term solution would be for you to upgrade your pysradb version to 1.0.1 or above.

The following should work:

mamba install -c bioconda -c conda-forge python=3.8 pysradb=1.0.1
markdunning commented 2 years ago

Thanks for the reply. I haven't had a chance to check this out yet, but I will do so today

markdunning commented 2 years ago

So the build step works, but I get an error with check I'm afraid

(rlpipes) [md1mjdx@sharc-login2 RLPipes]$ RLPipes check /mnt/fastdata/md1mjdx/INDUCESEQ_drip/RLPipes/rlpipes_out/config.json
Usage: RLPipes check [OPTIONS] RUN_DIR
Try 'RLPipes check --help' for help.

Error: Invalid value for 'RUN_DIR': Configuration file '/mnt/fastdata/md1mjdx/INDUCESEQ_drip/RLPipes/rlpipes_out/config.json/config.json' is not found. Have you run 'RSeqCLI build' yet?
(rlpipes) [md1mjdx@sharc-login2 RLPipes]$ RLPipes check /mnt/fastdata/md1mjdx/INDUCESEQ_drip/RLPipes/rlpipes_out/
AttributeError in line 13 of /home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/rlpipes/src/rlpipes.smk:
'str' object has no attribute 'removesuffix'
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/rlpipes/src/rlpipes.smk", line 13, in <module>
AttributeError in line 13 of /home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/rlpipes/src/rlpipes.smk:
'str' object has no attribute 'removesuffix'
  File "/home/md1mjdx/miniconda3/envs/rlpipes/lib/python3.8/site-packages/rlpipes/src/rlpipes.smk", line 13, in <module>

Any chance you might know what's going on?

Many thanks

millerh1 commented 2 years ago

Hi @markdunning -- so this is another version issue as removesuffix was introduced in Python 3.9. I will be pinning the dependencies soon at python 3.9+. I believe you are running python 3.8 which is not supported. My apologies for the confusion...

I just replicated the error and solved it by running the following:

mamba install -c bioconda -c conda-forge python=3.9 rlpipes

Also you will need to use macs2 instead of macs3 due to an ongoing problem here.

So when you run it, please use the --macs2 flag for now. Hopefully this will be resolved shortly.

markdunning commented 2 years ago

Yes, it seems to work now. Thanks a lot. I have a question about the where the genomes data gets downloaded to, but I can ask that separately.

millerh1 commented 2 years ago

Glad to know! I will leave this open for now as a reminder to fix in the next release.