cutadapt plugin error

Greetings,

I’m running QIIME2 2020.2 and I’m getting an error in the cutadapt plugin.

I’m running the following codes:

qiime tools import
–type ‘SampleData[PairedEndSequencesWithQuality]’
–input-path manifest.tsv
–output-path paired-end-demux.qza
–input-format PairedEndFastqManifestPhred33V2

qiime cutadapt trim-paired
–i-demultiplexed-sequences paired-end-demux.qza
–p-cores 8
–p-front-f CCTAYGGGRBGCASCAG
-p-front-r GGACTACNNGGGTATCTAAT
–verbose
–o-trimmed-sequences trimmed_sequences.qza

Verbose:

Command: cutadapt --cores 8 --error-rate 0.1 --times 1 --overlap 3 --minimum-length 1 -o /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-p28trx8v/sample-1_0_L001_R1_001.fastq.gz -p /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-p28trx8v/sample-1_30_L001_R2_001.fastq.gz --front CCTAYGGGRBGCASCAG --front -p-front-r --front GGACTACNNGGGTATCTAAT /tmp/qiime2-archive-q9i70va5/c6ae5be2-2352-47e9-a9ab-d1aca502c363/data/sample-1_0_L001_R1_001.fastq.gz /tmp/qiime2-archive-q9i70va5/c6ae5be2-2352-47e9-a9ab-d1aca502c363/data/sample-1_30_L001_R2_001.fastq.gz

Run “cutadapt --help” to see command-line options.
See https://cutadapt.readthedocs.io/ for full documentation.

cutadapt: error: argument -g/–front: expected one argument
Traceback (most recent call last):
File “/home/andre/miniconda2/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</home/andre/miniconda2/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-461>”, line 2, in trim_paired
File “/home/andre/miniconda2/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/home/andre/miniconda2/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/home/andre/miniconda2/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_cutadapt/_trim.py”, line 189, in trim_paired
run_commands(cmds)
File “/home/andre/miniconda2/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_cutadapt/_trim.py”, line 30, in run_commands
subprocess.run(cmd, check=True)
File “/home/andre/miniconda2/envs/qiime2-2020.2/lib/python3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘cutadapt’, ‘–cores’, ‘8’, ‘–error-rate’, ‘0.1’, ‘–times’, ‘1’, ‘–overlap’, ‘3’, ‘–minimum-length’, ‘1’, ‘-o’, ‘/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-p28trx8v/sample-1_0_L001_R1_001.fastq.gz’, ‘-p’, ‘/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-p28trx8v/sample-1_30_L001_R2_001.fastq.gz’, ‘–front’, ‘CCTAYGGGRBGCASCAG’, ‘–front’, ‘-p-front-r’, ‘–front’, ‘GGACTACNNGGGTATCTAAT’, ‘/tmp/qiime2-archive-q9i70va5/c6ae5be2-2352-47e9-a9ab-d1aca502c363/data/sample-1_0_L001_R1_001.fastq.gz’, ‘/tmp/qiime2-archive-q9i70va5/c6ae5be2-2352-47e9-a9ab-d1aca502c363/data/sample-1_30_L001_R2_001.fastq.gz’]’ returned non-zero exit status 2.

Plugin error from cutadapt:

Command ‘[‘cutadapt’, ‘–cores’, ‘8’, ‘–error-rate’, ‘0.1’, ‘–times’, ‘1’, ‘–overlap’, ‘3’, ‘–minimum-length’, ‘1’, ‘-o’, ‘/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-p28trx8v/sample-1_0_L001_R1_001.fastq.gz’, ‘-p’, ‘/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-p28trx8v/sample-1_30_L001_R2_001.fastq.gz’, ‘–front’, ‘CCTAYGGGRBGCASCAG’, ‘–front’, ‘-p-front-r’, ‘–front’, ‘GGACTACNNGGGTATCTAAT’, ‘/tmp/qiime2-archive-q9i70va5/c6ae5be2-2352-47e9-a9ab-d1aca502c363/data/sample-1_0_L001_R1_001.fastq.gz’, ‘/tmp/qiime2-archive-q9i70va5/c6ae5be2-2352-47e9-a9ab-d1aca502c363/data/sample-1_30_L001_R2_001.fastq.gz’]’ returned non-zero exit status 2.

It seems to be a problem importing sample-1, but I checked the manifest and it looks correct. Am I missing something? Excuse me if it is a very obvious problem, I am new to this.

Thanks!

Hey there @Andre_Pegoraro!

Welcome!

I have a hunch that the problem is here:

You appear to have a different style dash (-), which is messing things up, try this please:

qiime cutadapt trim-paired \
  --i-demultiplexed-sequences paired-end-demux.qza \
  --p-cores 8 \
  --p-front-f CCTAYGGGRBGCASCAG \
  --p-front-r GGACTACNNGGGTATCTAAT \
  --verbose \
  --o-trimmed-sequences trimmed_sequences.qza

:qiime2:

2 Likes

Yes, that was the problem.

And here’s the lesson for not being lazy and to type the code integrally.

I’m sorry for that silly mistake, haha.
I appreciate your attention and your quick response!

Best regards!

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.