cutadapt crashes

Hi,

I am trying to use cut-adapt on my sequences and it keeps giving me an error. I checked if my files were corrupt but they are ok. So, I deleted the file and ran it without the file it was giving an error and it gave the same error with a different file now. The error is as follows:

File "/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py", line 328, in __call__

    results = action(**arguments)

  File "</home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-461>", line 2, in trim_paired

  File "/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable

    output_types, provenance)

  File "/home/ubuntu/miniconda3/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/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_cutadapt/_trim.py", line 189, in trim_paired

    run_commands(cmds)

  File "/home/ubuntu/miniconda3/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/ubuntu/miniconda3/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-mp7wae9i/SRR5009671._1_L001_R1_001.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-mp7wae9i/SRR5009671._1_L001_R2_001.fastq.gz', '--front', 'AGRGTTTGATYMTGGCTCAG', '-G', 'TGCTGCCTCCCGTAGGAGT', '/tmp/qiime2-archive-9wdm7925/6af89fb8-e024-4628-b537-fbfa1d182287/data/SRR5009671._1_L001_R1_001.fastq.gz', '/tmp/qiime2-archive-9wdm7925/6af89fb8-e024-4628-b537-fbfa1d182287/data/SRR5009671._1_L001_R2_001.fastq.gz']' returned non-zero exit status 1.

 

Plugin error from cutadapt:

 

  Command '['cutadapt', '--cores', '8', '--error-rate', '0.1', '--times', '1', '--overlap', '3', '--minimum-length', '1', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-mp7wae9i/SRR5009671._1_L001_R1_001.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-mp7wae9i/SRR5009671._1_L001_R2_001.fastq.gz', '--front', 'AGRGTTTGATYMTGGCTCAG', '-G', 'TGCTGCCTCCCGTAGGAGT', '/tmp/qiime2-archive-9wdm7925/6af89fb8-e024-4628-b537-fbfa1d182287/data/SRR5009671._1_L001_R1_001.fastq.gz', '/tmp/qiime2-archive-9wdm7925/6af89fb8-e024-4628-b537-fbfa1d182287/data/SRR5009671._1_L001_R2_001.fastq.gz']' returned non-zero exit status 1.

 

See above for debug info.

What should I do about this?

Thanks

Cheers

Hi @Huda_Ghori,
Thanks for sharing your traceback. In future, please also include the exact command you ran, and any information about your system, files, etc that you think might be relevant. It makes troubleshooting easier. (Putting your code between single- or triple-backticks ``` may also help make it easier to read.)

A quick forum search for cutadapt "non-zero exit status 1" returned this answer. I’m not sure this is relevant, but :crossed_fingers: I hope it helps.

If it doesn’t, can you share the command you ran and basic system information?

Thanks,
Chris :gorilla:

Hi @ChrisKeefe

Sorry about that. This is the command I used :slight_smile:
qiime cutadapt trim-paired
–i-demultiplexed-sequences p114.qza
–p-cores 8
–p-front-f AGRGTTTGATYMTGGCTCAG
–p-front-r TGCTGCCTCCCGTAGGAGT
–o-trimmed-sequences primer114.qza
–verbose

The Error shows up as follows:

This is cutadapt 2.8 with Python 3.6.7
Command line parameters: --cores 8 --error-rate 0.1 --times 1 --overlap 3 --minimum-length 1 -o /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-re6rt0n0/SRR5009672_1_L001_R1_001.fastq.gz -p /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt- re6rt0n0/SRR5009672_1_L001_R2_001.fastq.gz --front AGRGTTTGATYMTGGCTCAG -G TGCTGCCTCCCGTAGGAGT /tmp/qiime2-archive-esb5 6taz/b24ff69e-bdd2-46b0-9d1a-d6937e9ada29/data/SRR5009672_1_L001_R1_001.fastq.gz /tmp/qiime2-archive-esb56taz/b24ff69e-bdd2-46b0-9d1a-d6937e9ada29/data/SRR5009672_1_L001_R2_001.fastq.gz
Processing reads on 8 cores in paired-end mode …
ERROR: Traceback (most recent call last):
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/cutadapt/pipeline.py”, line 520, in run
(n, bp1, bp2) = self._pipeline.process_reads()
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/cutadapt/pipeline.py”, line 355, in process_reads
for read1, read2 in self._reader:
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/dnaio/init.py”, line 274, in _iter _
“in file 1 does not match ‘{}’ in file 2.”.format(r1.name, r2.name), line=None) from None
dnaio.exceptions.FileFormatError: Error in sequence file at unknown line: Reads are improperly paired. Read name ‘SRR5009672.3 C355_148 length=281’ in file 1 does not match ‘SRR5009672.4 C355_161 length=350’ in file 2.

cutadapt: error: Error in sequence file at unknown line: Reads are improperly paired. Read name ‘SRR5009672.3 C355_148 length=281’ in file 1 does not match ‘SRR5009672.4 C355_161 length=350’ in file 2.
Traceback (most recent call last):
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in __call _
results = action(**arguments)
File “</home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-461>”, line 2, in trim_paired
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/home/ubuntu/miniconda3/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/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_cutadapt/_trim.py”, line 189, in trim_paired
run_commands(cmds)
File “/home/ubuntu/miniconda3/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/ubuntu/miniconda3/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-re6rt0n0/SRR5009672_1_L001_R1_001.fastq.gz’, ‘-p’, ‘/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-re6rt0n0/SRR5009672_1_L001_R2_001.fastq.gz’, ‘–fro nt’, ‘AGRGTTTGATYMTGGCTCAG’, ‘-G’, ‘TGCTGCCTCCCGTAGGAGT’, ‘/tmp/qiime2-archive-esb56taz/b24ff69e-bdd2-46b0-9d1a-d6937e9 ada29/data/SRR5009672_1_L001_R1_001.fastq.gz’, ‘/tmp/qiime2-archive-esb56taz/b24ff69e-bdd2-46b0-9d1a-d6937e9ada29/data/SRR5009672_1_L001_R2_001.fastq.gz’]’ returned non-zero exit status 1.

Plugin error from cutadapt:

Command '[‘cutadapt’, ‘–cores’, ‘8’, ‘–error-rate’, ‘0.1’, ‘–times’, ‘1’, ‘–overlap’, ‘3’, ‘–minimum-length’, '1 ‘, ‘-o’, ‘/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-re6rt0n0/SRR5009672_1_L001_R1_001.fastq.gz’, ‘-p’, ‘/tmp/q2-C asavaOneEightSingleLanePerSampleDirFmt-re6rt0n0/SRR5009672_1_L001_R2_001.fastq.gz’, ‘–front’, ‘AGRGTTTGATYMTGGCTCAG’, ‘-G’, ‘TGCTGCCTCCCGTAGGAGT’, ‘/tmp/qiime2-archive-esb56taz/b24ff69e-bdd2-46b0-9d1a-d6937e9ada29/data/SRR5009672_1_L001_ R1_001.fastq.gz’, ‘/tmp/qiime2-archive-esb56taz/b24ff69e-bdd2-46b0-9d1a-d6937e9ada29/data/SRR5009672_1_L001_R2_001.fastq.gz’]’ returned non-zero exit status 1.

See above for debug info.

The error mentions that the forward and reverse are not of the same length. I checked and in fact the both were not of the same length. I don’t know how to go about it. Please help

Thanks!

Hi @Huda_Ghori

I think this is the key:

It basically means that the sequences in your forward and reverse paired-end sequence files are not “matching-up”. This means that either, some sequences are missing in one of the files, or that they are simply out of order with respect to each other. You’ll have to investigate your processing steps prior to the cutadapt step.

-Mike

1 Like