Cannot access to my External Hard Drive

Hey you all!

I’m trying to analyze some samples (Illumina paired-end) and I get the following error in DADA2 step (I have taken a look to other similar posts but I don’t find the exact issue):

Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_dada_paired.R /tmp/tmp5abyfdx0/forward /tmp/tmp5abyfdx0/reverse /tmp/tmp5abyfdx0/output.tsv.biom /tmp/tmp5abyfdx0/track.tsv /tmp/tmp5abyfdx0/filt_f /tmp/tmp5abyfdx0/filt_r 0 0 10 10 2.0 2.0 2 independent consensus 1.0 4 1000000

R version 4.0.2 (2020-06-22) 
Loading required package: Rcpp
DADA2: 1.18.0 / Rcpp: 1.0.6 / RcppParallel: 5.0.2 
1) Filtering Error in filterAndTrim(unfiltsF, filtsF, unfiltsR, filtsR, truncLen = c(truncLenF,  : 
  These are the errors (up to 5) encountered in individual cores...
Error in writeFastq(fqF, fout[[1]], "a", compress = compress) : 
  failed to write record 488
Error in writeFastq(fqR, fout[[2]], "a", compress = compress) : 
  failed to write record 56573
Error in writeFastq(fqF, fout[[1]], "a", compress = compress) : 
  failed to write record 535
Error in writeFastq(fqF, fout[[1]], "a", compress = compress) : 
  failed to write record 47611
Ejecución interrumpida
Traceback (most recent call last):
  File "/home/unidad/Escritorio/MiriamGorostidi/aMICROBIOTA/QIIME2/InstalationQiime2/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 264, in denoise_paired
    run_commands([cmd])
  File "/home/unidad/Escritorio/MiriamGorostidi/aMICROBIOTA/QIIME2/InstalationQiime2/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
  File "/home/unidad/Escritorio/MiriamGorostidi/aMICROBIOTA/QIIME2/InstalationQiime2/miniconda3/envs/qiime2-2021.2/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/tmp/tmp5abyfdx0/forward', '/tmp/tmp5abyfdx0/reverse', '/tmp/tmp5abyfdx0/output.tsv.biom', '/tmp/tmp5abyfdx0/track.tsv', '/tmp/tmp5abyfdx0/filt_f', '/tmp/tmp5abyfdx0/filt_r', '0', '0', '10', '10', '2.0', '2.0', '2', 'independent', 'consensus', '1.0', '4', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/unidad/Escritorio/MiriamGorostidi/aMICROBIOTA/QIIME2/InstalationQiime2/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/q2cli/commands.py", line 329, in __call__
    results = action(**arguments)
  File "<decorator-gen-522>", line 2, in denoise_paired
  File "/home/unidad/Escritorio/MiriamGorostidi/aMICROBIOTA/QIIME2/InstalationQiime2/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
    output_types, provenance)
  File "/home/unidad/Escritorio/MiriamGorostidi/aMICROBIOTA/QIIME2/InstalationQiime2/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 390, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/home/unidad/Escritorio/MiriamGorostidi/aMICROBIOTA/QIIME2/InstalationQiime2/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_dada2/_denoise.py", line 279, in denoise_paired
    " and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

   Plugin error from dada2:

  An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

See above for debug info.
There was an issue with loading the file /samples-metadata-pocos.tsv as metadata:

  Metadata file path doesn't exist, or the path points to something other than a file. Please check that the path exists, has read permissions, and points to a regular file (not a directory): /samples-metadata-pocos.tsv

  There may be more errors present in the metadata file. To get a full report, sample/feature metadata files can be validated with Keemei: https://keemei.qiime2.org

  Find details on QIIME 2 metadata requirements here: https://docs.qiime2.org/2021.2/tutorials/metadata/

I don’t really understand which is the specific problem… how could I fix this?

It is my first tima analyzing Illumina paired end samples (until now I have been working with Ion Torrent…)

Thank you to everyone in advanced :slight_smile:

Best!

Miriam

Hello Miriam,

Here’s the important part of the error:

Looks like your metadata file isn’t in /samples-metadata-pocos.tsv:thinking:
Perhaps it’s in /path/to/file/samples-metadata-pocos.tsv or maybe in your working directory.

Let us know if you are able to fix that file path and get the script to run!

Colin

EDIT: Can you also post the full command or script that you ran?

Hello Colin!

Thank you for your rapid answer. :blush:

I attached my code below:

##1 Dada2 pyro:
mkdir Dada2_output

qiime dada2 denoise-paired \
  --i-demultiplexed-seqs demux-paired-end-samples.qza \
  --p-trunc-len-f 0 \
  --p-trunc-len-r 0 \
  --p-trim-left-f 10 \
  --p-trim-left-r 10 \
  --p-n-threads 4 \
  --o-representative-sequences /Dada2_output/rep-seqs.qza \
  --o-table /Dada2_output/table.qza \
  --o-denoising-stats /Dada2_output/stats-dada2.qza \
  --verbose

##Visualizing Resulting data...
qiime feature-table summarize \
  --i-table /Dada2_output/table.qza \
  --o-visualization /Dada2_output/table.qzv \
  --m-sample-metadata-file samples-metadata.tsv

qiime feature-table tabulate-seqs \
  --i-data /Dada2_output/rep-seqs.qza \
  --o-visualization /Dada2_output/rep-seqs.qzv

qiime metadata tabulate \
  --m-input-file /Dada2_output/stats-dada2.qza \
  --o-visualization /Dada2_output/stats-dada2.qzv

I would not say the samples-metadata path is the error, in fact, there’s no output to the qiime dada2 denoised-paired command, so the error must be in there, isn’t it?

In addition, I have also checked the path to the samples-metadata.tsv file and it is right, so I don’t actually understand why that error message appears.

Thank you so much in advanced :hugs:

Best!

Miriam

Hello Miriam,

I think you are right! I totally missed this the first time, but I think I found another important part of the error:

1) Filtering Error in filterAndTrim(unfiltsF, filtsF, unfiltsR, filtsR, truncLen = c(truncLenF,  : 
  These are the errors (up to 5) encountered in individual cores...
Error in writeFastq(fqF, fout[[1]], "a", compress = compress) : 
  failed to write record 488
Error in writeFastq(fqR, fout[[2]], "a", compress = compress) : 
  failed to write record 56573
Error in writeFastq(fqF, fout[[1]], "a", compress = compress) : 
  failed to write record 535
Error in writeFastq(fqF, fout[[1]], "a", compress = compress) : 
  failed to write record 47611

It looks like the output files cannot be written. Maybe moving the output directory to a new place would help.

You could try replacing
/Dada2_output with
Dada2_output (no / at the start of the folder)

This should save output files to your working directory, which should solve this problem!

Colin

1 Like

Thank you so much Colin!

1 Like

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