Error with cutadapt plugin - exit code 28

Hello!
I've looked through the various posts for the errors related to running cutadapt and I don't believe any of them have the exact same one I am experience so here it goes.

I tried running the following command:

qiime cutadapt trim-paired \
   --i-demultiplexed-sequences 16SV4V5_HOME_Run9sequences.qza \
   --p-cores 6 \
   --p-front-f GTGYCAGCMGCCGCGGTAA \
   --p-front-r CCGYCAATTYMTTTRAGTTT \
   --p-discard-untrimmed \
   --p-no-indels \
   --o-trimmed-sequences 16SV4V5_HOME_Run9sequences_trimmed.qza

I get the following error:


Plugin error from cutadapt:

  Command '['cutadapt', '--cores', '6', '--error-rate', '0.1', '--times', '1', '--overlap', '3', '--minimum-length', '1', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-lzba_bh5/QMIC4234_S305_L001_R1_001.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-lzba_bh5/QMIC4234_S305_L001_R2_001.fastq.gz', '--front', 'GTGYCAGCMGCCGCGGTAA', '-G', 'CCGYCAATTYMTTTRAGTTT', '--no-indels', '--discard-untrimmed', '/tmp/qiime2-archive-i9777yzm/96590386-0bbd-4f88-9ad9-c842af05584d/data/QMIC4234_S305_L001_R1_001.fastq.gz', '/tmp/qiime2-archive-i9777yzm/96590386-0bbd-4f88-9ad9-c842af05584d/data/QMIC4234_S305_L001_R2_001.fastq.gz']' returned non-zero exit status 1.

Debug info has been saved to /tmp/qiime2-q2cli-err-uja4b8ym.log

I'm attaching the complete log file.
qiime2-q2cli-err-uja4b8ym.txt (689.9 KB)

It runs through many samples and then seems to crash. This is the error given at the end of the log file.

Traceback (most recent call last):
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/bin/cutadapt", line 10, in <module>
    sys.exit(main())
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/cutadapt/__main__.py", line 855, in main
    stats = r.run()
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/cutadapt/pipeline.py", line 645, in __exit__
    self.close()
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/cutadapt/pipeline.py", line 795, in close
    f.close()
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/xopen/__init__.py", line 173, in close
    "Output {} process terminated with exit code {}".format(self.program, retcode))
OSError: Output pigz process terminated with exit code 28
Traceback (most recent call last):
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/q2cli/commands.py", line 329, in __call__
    results = action(**arguments)
  File "<decorator-gen-551>", line 2, in trim_paired
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    output_types, provenance)
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/qiime2/sdk/action.py", line 390, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/q2_cutadapt/_trim.py", line 189, in trim_paired
    run_commands(cmds)
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/site-packages/q2_cutadapt/_trim.py", line 30, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2020.6/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cutadapt', '--cores', '6', '--error-rate', '0.1', '--times', '1', '--overlap', '3', '--minimum-length', '1', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-lzba_bh5/QMIC4234_S305_L001_R1_001.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-lzba_bh5/QMIC4234_S305_L001_R2_001.fastq.gz', '--front', 'GTGYCAGCMGCCGCGGTAA', '-G', 'CCGYCAATTYMTTTRAGTTT', '--no-indels', '--discard-untrimmed', '/tmp/qiime2-archive-i9777yzm/96590386-0bbd-4f88-9ad9-c842af05584d/data/QMIC4234_S305_L001_R1_001.fastq.gz', '/tmp/qiime2-archive-i9777yzm/96590386-0bbd-4f88-9ad9-c842af05584d/data/QMIC4234_S305_L001_R2_001.fastq.gz']' returned non-zero exit status 1.

seems this may be the pertinent error:
OSError: Output pigz process terminated with exit code 28

Any thoughts about what this problem is here? I'm processing my MiSeq run the same way I have 8 times before, I don't understand what would have changed, especially since I'm using the same version of QIIME2 (version qiime2-2020.6, wasn't sure if i could process newer runs with newer QIIME2 versions and still merge them at the end of the day...)

Thank you in advance for your help!
Colleen

I also tried with a slightly newer version of QIIME2 - v. 2021.8 and am still getting similar errors

This is cutadapt 3.4 with Python 3.8.10
Command line parameters: --cores 6 --error-rate 0.1 --times 1 --overlap 3 --minimum-length 1 -o /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-arqyq6mt/QMIC4170_S298_L001_R1_001.fastq.gz -p /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-arqyq6mt/QMIC4170_S298_L001_R2_001.fastq.gz --front GTGYCAGCMGCCGCGGTAA -G CCGYCAATTYMTTTRAGTTT --no-indels --discard-untrimmed /tmp/qiime2-archive-ejry9z2u/96590386-0bbd-4f88-9ad9-c842af05584d/data/QMIC4170_S298_L001_R1_001.fastq.gz /tmp/qiime2-archive-ejry9z2u/96590386-0bbd-4f88-9ad9-c842af05584d/data/QMIC4170_S298_L001_R2_001.fastq.gz
Processing reads on 6 cores in paired-end mode ...
Traceback (most recent call last):
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/cutadapt/__main__.py", line 913, in main
    stats = r.run()
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/cutadapt/pipeline.py", line 837, in run
    writer.write(data, chunk_index)
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/cutadapt/pipeline.py", line 684, in write
    self._outfile.write(self._chunks[self._current_index])
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/xopen/__init__.py", line 232, in write
    self._file.write(arg)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/bin/cutadapt", line 10, in <module>
    sys.exit(main_cli())
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/cutadapt/__main__.py", line 848, in main_cli
    main(sys.argv[1:])
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/cutadapt/__main__.py", line 913, in main
    stats = r.run()
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/cutadapt/pipeline.py", line 712, in __exit__
    self.close()
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/cutadapt/pipeline.py", line 847, in close
    self._outfiles.close()
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/cutadapt/pipeline.py", line 145, in close
    f.close()
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/xopen/__init__.py", line 242, in close
    raise OSError(
OSError: Output pigz process terminated with exit code -11
Traceback (most recent call last):
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/q2cli/commands.py", line 329, in __call__
    results = action(**arguments)
  File "<decorator-gen-578>", line 2, in trim_paired
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    outputs = self._callable_executor_(scope, callable_args,
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/q2_cutadapt/_trim.py", line 189, in trim_paired
    run_commands(cmds)
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/site-packages/q2_cutadapt/_trim.py", line 30, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/colleen.kellogg/miniconda3/envs/qiime2-2021.8/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cutadapt', '--cores', '6', '--error-rate', '0.1', '--times', '1', '--overlap', '3', '--minimum-length', '1', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-arqyq6mt/QMIC4170_S298_L001_R1_001.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-arqyq6mt/QMIC4170_S298_L001_R2_001.fastq.gz', '--front', 'GTGYCAGCMGCCGCGGTAA', '-G', 'CCGYCAATTYMTTTRAGTTT', '--no-indels', '--discard-untrimmed', '/tmp/qiime2-archive-ejry9z2u/96590386-0bbd-4f88-9ad9-c842af05584d/data/QMIC4170_S298_L001_R1_001.fastq.gz', '/tmp/qiime2-archive-ejry9z2u/96590386-0bbd-4f88-9ad9-c842af05584d/data/QMIC4170_S298_L001_R2_001.fastq.gz']' returned non-zero exit status 1.


I suppose it is possible it relates to this post regarding space in the /tmp directory. Plugin error from cutadapt: [Errno 28] No space left on device ?

However, I am told by our server admin that it is hard to allocate more space to the tmp directory at this time. Is there a way to have qiime2 write to a different /tmp directory within my account that has more space (rather than the communal server one).

I am still baffled why this is happening now after several years of running this exact code on MiSeq runs of the same size...

Thanks again for any help and guidance you can provide!
Colleen

Hello Colleen,

Yes, I concur that this is a space issue and changing your $TMPDIR from /tmp is a great idea!

See this post:

# Make new directory
mkdir -p /full/path/to/new/temp

# Export this environment variable:
export TMPDIR='/full/path/to/new/temp'

# and/or check on what it's set to
echo $TMPDIR

Maybe someone else is using up all the space on /tmp :upside_down_face:

Success! Thank you, @colinbrislawn.

Colleen

1 Like

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