snakemake-workflows / rna-seq-kallisto-sleuth

A Snakemake workflow for differential expression analysis of RNA-seq data with Kallisto and Sleuth.
MIT License
66 stars 44 forks source link

fix: Feature/update cutadapt wrapper #67

Closed Austin-s-h closed 1 year ago

Austin-s-h commented 1 year ago

I encountered an error in this trimming rule due to

  File "~/mambaforge/envs/snakemake/lib/python3.10/site-packages/snakemake/__init__.py", line 22, in <module>
    from snakemake.target_jobs import parse_target_jobs_cli_args
  File "~/mambaforge/envs/snakemake/lib/python3.10/site-packages/snakemake/target_jobs.py", line 4, in <module>
    from snakemake.common import parse_key_value_arg
  File "~/mambaforge/envs/snakemake/lib/python3.10/site-packages/snakemake/common/__init__.py", line 284, in <module>
    @contextlib.asynccontextmanager
AttributeError: module 'contextlib' has no attribute 'asynccontextmanager'

Tried running under Python 3.10 and 3.7, still encountered the same issue, but eventually tracked the rabbit hole down to this.

Updating the wrapper for cutadapt slightly changes the syntax, but no modification to the config.yaml file is needed. Additionally, (optionally) I added multithreading, as cutadapt scales quite well.

dlaehnemann commented 1 year ago

Ah, I think it is failing because this string here is empty (and we have a single end test case unit): https://github.com/sansterbioanalytics/rna-seq-kallisto-sleuth/blob/6cc1c649c668a0d63ed33668f210d89c72db208f/.test/config/config.yaml#L107

Maybe just replicate the settings string from cutadapt-pe in the .test/config/config.yaml and simply omit the capital letter adapter specs (-A and -G, they are for the reverse reads in the paired end setup): https://github.com/sansterbioanalytics/rna-seq-kallisto-sleuth/blob/6cc1c649c668a0d63ed33668f210d89c72db208f/.test/config/config.yaml#L118

Austin-s-h commented 1 year ago

Ah, I think it is failing because this string here is empty (and we have a single end test case unit): https://github.com/sansterbioanalytics/rna-seq-kallisto-sleuth/blob/6cc1c649c668a0d63ed33668f210d89c72db208f/.test/config/config.yaml#L107

Maybe just replicate the settings string from cutadapt-pe in the .test/config/config.yaml and simply omit the capital letter adapter specs (-A and -G, they are for the reverse reads in the paired end setup): https://github.com/sansterbioanalytics/rna-seq-kallisto-sleuth/blob/6cc1c649c668a0d63ed33668f210d89c72db208f/.test/config/config.yaml#L118

Should have addressed this in my latest :)