snakemake-workflows / rna-seq-star-deseq2

RNA-seq workflow using STAR and DESeq2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pipeline failing with cutadapt

aryazand opened this issue · comments

Hello,

When I set trimming to true in the config file, I get the following error

cutadapt: error: unrecognized arguments: pipe/cutadapt/1/lane1.fq1.fastq.gz pipe/cutadapt/1/lane1.fq2.fastq.gz

In looking through log files, it appears this error occurs with the following command (which is called by the cutadapt_pe recipe):

subprocess.CalledProcessError: Command 'set -euo pipefail; cutadapt --cores 8 nan -o results/trimmed/1_lane2_R1.fastq.gz -p results/trimmed/1_lane2_R2.fastq.gz pipe/cutadapt/1/lane2.fq1.fastq.gz pipe/cutadapt/1/lane2.fq2.fastq.gz > results/trimmed/1_lane2.paired.qc.txt 2> logs/cutadapt/1_lane2.log' returned non-zero exit status 2.

I haven't been able to figure out why there is this "unrecognized arguments" error, since commands seems to look good to me. Any help with this would be appreciated!

What I have just spotted is this:

--cores 8 nan

In the cutadapt-pe wrapper code, the place where nan appears is where usually an adapter sequence is inserted via whatever is specified in params: adapters=. In this workflow, this is pulled in from the units.tsv file (from a column called adapters):

adapters=lambda w: str(units.loc[w.sample].loc[w.unit, "adapters"]),

So I guess that you either have not specified an adapter sequence (including the cutadapt adapter type specification flag) to cut for this particular unit, or your units.tsv has some more subtle formatting problem that messes up columns (a whitespace as a separator instead of a tab somewhere, for example).

And cutadapt then only recognizes the

Thank you, this fixed it!

Good to hear. I'll also amend the description for the snakemake workflow catalog accordingly in a pull request I am preparing. So hopefully, this will be clearer to future users of the workflow.

Just as a cross-reference, the info is now in #66, provided by these added comments in the config.yamls and a dedicated adapter trimming section in the reworked config/README.md that gets presented via the snakemake workflow catalog usage info.