Hello!
I'm using qiime2 locally on my personal MacBook Air to analyse eDNA barcode reads.
Since I have not much of space on my device I am storing all the files and launching the command on an external hard drive.
I have managed to import my fastq creating a temporary dir with these commands:
export TMPDIR=../tmp_qiime
mkdir -p $TMPDIR
chmod 1777 $TMPDIR
and then
qiime tools import
--type MultiplexedPairedEndBarcodeInSequence
--input-path muxed-pe-barcode-in-seq
--output-path multiplexed-seqs.qza
So far so good. I have paired end fastq with in sequence barcodes both for the fw and rv sequences.
I set again the tmpdir and check with python -c "import tempfile; print(tempfile.gettempdir())".
At this point I want to run cutadapt to demultiplex my sequences with this command:
sudo qiime cutadapt demux-paired
--i-seqs multiplexed-seqs.qza
--m-forward-barcodes-file tag.tsv
--m-forward-barcodes-column barcode1
--m-reverse-barcodes-file tag.tsv
--m-reverse-barcodes-column barcode2
--p-batch-size 3
--use-cache=../tmp_qiime
--o-per-sample-sequences per-sample-sequences.qza
--o-untrimmed-sequences untrimmed-sequences.qza
But after a while it crashes and I get this warning on the log file in the tmp directory of my Mac:
Command: cutadapt -g file:/tmp/tmpjdm0xur8 --error-rate 0.1 --minimum-length 1 -o /tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-w7d0szpr/{name}.1.fastq.gz --untrimmed-output /tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-asnsre9p/forward.fastq.gz --pair-adapters -G file:/tmp/tmppdhft3se -p /tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-w7d0szpr/{name}.2.fastq.gz --untrimmed-paired-output /tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-asnsre9p/reverse.fastq.gz /tmp/qiime2/root/data/39e34ff8-5681-4104-aca1-70c9d518608d/data/forward.fastq.gz /tmp/qiime2/root/data/39e34ff8-5681-4104-aca1-70c9d518608d/data/reverse.fastq.gz -U 0 -u 0 -j 1
This is cutadapt 5.1 with Python 3.10.14
Command line parameters: -g file:/tmp/tmpjdm0xur8 --error-rate 0.1 --minimum-length 1 -o /tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-w7d0szpr/{name}.1.fastq.gz --untrimmed-output /tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-asnsre9p/forward.fastq.gz --pair-adapters -G file:/tmp/tmppdhft3se -p /tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-w7d0szpr/{name}.2.fastq.gz --untrimmed-paired-output /tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-asnsre9p/reverse.fastq.gz /tmp/qiime2/root/data/39e34ff8-5681-4104-aca1-70c9d518608d/data/forward.fastq.gz /tmp/qiime2/root/data/39e34ff8-5681-4104-aca1-70c9d518608d/data/reverse.fastq.gz -U 0 -u 0 -j 1
Adapter 'ACACACAC' (regular 5') was specified multiple times! Please make sure that this is what you want.
Adapter 'ACACACAC' (regular 5') was specified multiple times! Please make sure that this is what you want.
Processing paired-end reads on 1 core ...
[Errno 28] No space left on device
Traceback (most recent call last):
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/cutadapt/cli.py", line 1261, in main
stats = runner.run(pipeline, progress, outfiles)
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/cutadapt/runners.py", line 430, in run
(n, total1_bp, total2_bp) = pipeline.process_reads(
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/cutadapt/pipeline.py", line 147, in process_reads
reads = step(*reads, info1, info2) # type: ignore
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/cutadapt/steps.py", line 491, in __call__
self._untrimmed_writer.write(read1, read2)
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/dnaio/pairedend.py", line 240, in write
self._writer2.write(read2)
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/dnaio/writers.py", line 152, in _write
self._file.write(record.fastq_bytes())
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/isal/igzip.py", line 213, in write
self.fileobj.write(self.compress.compress(data))
OSError: [Errno 28] No space left on device
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/cutadapt/cli.py", line 1281, in main
sys.exit(exit_code)
SystemExit: 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/bin/cutadapt", line 8, in <module>
sys.exit(main_cli())
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/cutadapt/cli.py", line 1166, in main_cli
main(sys.argv[1:])
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/cutadapt/cli.py", line 1285, in main
outfiles.close()
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/cutadapt/files.py", line 301, in close
bf.close()
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/gzip.py", line 334, in close
fileobj.write(self.compress.flush())
OSError: [Errno 28] No space left on device
Traceback (most recent call last):
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/q2cli/commands.py", line 573, in __call__
results = self._execute_action(
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/q2cli/commands.py", line 645, in _execute_action
results = action(**arguments)
File "<decorator-gen-995>", line 2, in demux_paired
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/rachis/sdk/action.py", line 307, in bound_callable
outputs = self._callable_executor_(
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/rachis/sdk/action.py", line 496, in _callable_executor_
output_views = self._callable(**view_args)
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/q2_cutadapt/_demux.py", line 330, in demux_paired
untrimmed = _demux(
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/q2_cutadapt/_demux.py", line 240, in _demux
run_command(cmd)
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/site-packages/q2_cutadapt/_demux.py", line 38, in run_command
subprocess.run(cmd, check=True)
File "/opt/miniconda3/envs/qiime2-amplicon-2026.1/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cutadapt', '-g', 'file:/tmp/tmpjdm0xur8', '--error-rate', '0.1', '--minimum-length', '1', '-o', '/tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-w7d0szpr/{name}.1.fastq.gz', '--untrimmed-output', '/tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-asnsre9p/forward.fastq.gz', '--pair-adapters', '-G', 'file:/tmp/tmppdhft3se', '-p', '/tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-w7d0szpr/{name}.2.fastq.gz', '--untrimmed-paired-output', '/tmp/qiime2/root/processes/5266-1774374188.316834@root/tmp/q2-OutPath-asnsre9p/reverse.fastq.gz', '/tmp/qiime2/root/data/39e34ff8-5681-4104-aca1-70c9d518608d/data/forward.fastq.gz', '/tmp/qiime2/root/data/39e34ff8-5681-4104-aca1-70c9d518608d/data/reverse.fastq.gz', '-U', '0', '-u', '0', '-j', '1']' returned non-zero exit status 1.
What am I doing wrong? Is there a way to force cutadapt to use the tmpdir in my external hard disk? Or do I need to run cutadapt outside qiime2 and then import my demultiplexed samples?
Thank you in advance
Alex