Plugin error from dada2: An error was encountered while running DADA2 in R (return code -9), please inspect stdout and stderr to learn more. See above for debug info.

(qiime2-2023.7) sathya@LAPTOP-EAN8IL66:~$ qiime dada2 denoise-ccs --i-demultiplexed-seqs reads_qza/raw_reads.qza --p-min-len 1200 --p-max-len 1800 --p-front AGRGTTYGATYMTGGCTCAG --p-adapter RGYTACCTTGTTACGACTT --p-n-threads $NCORES --o-table dada2_output/table.qza --o-representative-sequences dada2_output/representative_sequences.qza --o-denoising-stats dada2_output/stats.qza --verbose

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.R --input_directory /tmp/qiime2/sathya/data/3eb8d00c-0c1d-4cee-84ce-358ec2049b69/data --output_path /tmp/tmpyrdnncho/output.tsv.biom --output_track /tmp/tmpyrdnncho/track.tsv --removed_primer_directory /tmp/tmpyrdnncho/nop --filtered_directory /tmp/tmpyrdnncho/filt --forward_primer AGRGTTYGATYMTGGCTCAG --reverse_primer RGYTACCTTGTTACGACTT --max_mismatch 2 --indels False --truncation_length 0 --trim_left 0 --max_expected_errors 2.0 --truncation_quality_score 2 --min_length 1200 --max_length 1800 --pooling_method independent --chimera_method consensus --min_parental_fold 3.5 --allow_one_off False --num_threads 1 --learn_min_reads 1000000 --homopolymer_gap_penalty NULL --band_size 32

Warning message:
package ā€˜optparseā€™ was built under R version 4.2.3
R version 4.2.2 (2022-10-31)
Loading required package: Rcpp
DADA2: 1.26.0 / Rcpp: 1.0.11 / RcppParallel: 5.1.6

  1. Removing Primers
    ^[[A^[[A^[[B^[[B
    Multiple matches to the primer(s) in some sequences. Using the longest possible match.
    13990 sequences out of 28546 are being reverse-complemented.
    Read in 28546, output 26362 (92.3%) filtered sequences.
    8185 sequences out of 16521 are being reverse-complemented.
    Read in 16521, output 15011 (90.9%) filtered sequences.
    16739 sequences out of 34472 are being reverse-complemented.
    Read in 34472, output 30808 (89.4%) filtered sequences.
    16972 sequences out of 34594 are being reverse-complemented.
    Read in 34594, output 31375 (90.7%) filtered sequences.
    9413 sequences out of 18945 are being reverse-complemented.
    Read in 18945, output 17238 (91%) filtered sequences.
    9224 sequences out of 18878 are being reverse-complemented.
    Read in 18878, output 17116 (90.7%) filtered sequences.
    6278 sequences out of 12528 are being reverse-complemented.
    Read in 12528, output 11402 (91%) filtered sequences.
    5802 sequences out of 11576 are being reverse-complemented.
    Read in 11576, output 10437 (90.2%) filtered sequences.
    75 sequences out of 154 are being reverse-complemented.
    Read in 154, output 146 (94.8%) filtered sequences.
    5874 sequences out of 11950 are being reverse-complemented.
    Read in 11950, output 10960 (91.7%) filtered sequences.
    35931 sequences out of 73774 are being reverse-complemented.
    Read in 73774, output 67875 (92%) filtered sequences.
    18671 sequences out of 38362 are being reverse-complemented.
    Read in 38362, output 34504 (89.9%) filtered sequences.
    40358 sequences out of 81865 are being reverse-complemented.
    Read in 81865, output 75510 (92.2%) filtered sequences.
    50695 sequences out of 103506 are being reverse-complemented.
    Read in 103506, output 95482 (92.2%) filtered sequences.
    57277 sequences out of 116916 are being reverse-complemented.
    Read in 116916, output 108239 (92.6%) filtered sequences.
    29300 sequences out of 59641 are being reverse-complemented.
    Read in 59641, output 55696 (93.4%) filtered sequences.
    32714 sequences out of 66340 are being reverse-complemented.
    Read in 66340, output 61953 (93.4%) filtered sequences.
    5401 sequences out of 10833 are being reverse-complemented.
    Read in 10833, output 9840 (90.8%) filtered sequences.
    4753 sequences out of 9354 are being reverse-complemented.
    Read in 9354, output 8502 (90.9%) filtered sequences.
    48646 sequences out of 98711 are being reverse-complemented.
    Read in 98711, output 91351 (92.5%) filtered sequences.
    39508 sequences out of 79578 are being reverse-complemented.
    Read in 79578, output 73786 (92.7%) filtered sequences.
    8095 sequences out of 16015 are being reverse-complemented.
    Read in 16015, output 14496 (90.5%) filtered sequences.
    50339 sequences out of 103663 are being reverse-complemented.
    Read in 103663, output 95317 (91.9%) filtered sequences.
    6676 sequences out of 13343 are being reverse-complemented.
    Read in 13343, output 12213 (91.5%) filtered sequences.
    4607 sequences out of 9087 are being reverse-complemented.
    Read in 9087, output 8265 (91%) filtered sequences.
    2769 sequences out of 5589 are being reverse-complemented.
    Read in 5589, output 5014 (89.7%) filtered sequences.
    10628 sequences out of 21417 are being reverse-complemented.
    Read in 21417, output 20237 (94.5%) filtered sequences.
    8057 sequences out of 16087 are being reverse-complemented.
    Read in 16087, output 15294 (95.1%) filtered sequences.
    11368 sequences out of 22807 are being reverse-complemented.
    Read in 22807, output 21604 (94.7%) filtered sequences.
    9129 sequences out of 18182 are being reverse-complemented.
    Read in 18182, output 17365 (95.5%) filtered sequences.
    12819 sequences out of 25876 are being reverse-complemented.
    Read in 25876, output 24297 (93.9%) filtered sequences.
    10060 sequences out of 20104 are being reverse-complemented.
    Read in 20104, output 19114 (95.1%) filtered sequences.
    7259 sequences out of 14430 are being reverse-complemented.
    Read in 14430, output 13630 (94.5%) filtered sequences.
    45613 sequences out of 93211 are being reverse-complemented.
    Read in 93211, output 85941 (92.2%) filtered sequences.
    6411 sequences out of 12662 are being reverse-complemented.
    Read in 12662, output 12050 (95.2%) filtered sequences.
    10354 sequences out of 20992 are being reverse-complemented.
    Read in 20992, output 19992 (95.2%) filtered sequences.
    9322 sequences out of 18711 are being reverse-complemented.
    Read in 18711, output 17733 (94.8%) filtered sequences.
    9033 sequences out of 18238 are being reverse-complemented.
    Read in 18238, output 17223 (94.4%) filtered sequences.
    9226 sequences out of 18534 are being reverse-complemented.
    Read in 18534, output 17773 (95.9%) filtered sequences.
    7540 sequences out of 15242 are being reverse-complemented.
    Read in 15242, output 14445 (94.8%) filtered sequences.
    11267 sequences out of 22676 are being reverse-complemented.
    Read in 22676, output 21501 (94.8%) filtered sequences.
    6893 sequences out of 14038 are being reverse-complemented.
    Read in 14038, output 13278 (94.6%) filtered sequences.
    6625 sequences out of 13314 are being reverse-complemented.
    Read in 13314, output 12614 (94.7%) filtered sequences.
    10021 sequences out of 20393 are being reverse-complemented.
    Read in 20393, output 19329 (94.8%) filtered sequences.
    9498 sequences out of 19188 are being reverse-complemented.
    Read in 19188, output 17480 (91.1%) filtered sequences.
    5506 sequences out of 11074 are being reverse-complemented.
    Read in 11074, output 10455 (94.4%) filtered sequences.
    4750 sequences out of 9582 are being reverse-complemented.
    Read in 9582, output 9095 (94.9%) filtered sequences.
    5280 sequences out of 10695 are being reverse-complemented.
    Read in 10695, output 10198 (95.4%) filtered sequences.
    6317 sequences out of 12841 are being reverse-complemented.
    Read in 12841, output 12165 (94.7%) filtered sequences.
    8835 sequences out of 17831 are being reverse-complemented.
    Read in 17831, output 16941 (95%) filtered sequences.
    5740 sequences out of 11576 are being reverse-complemented.
    Read in 11576, output 10948 (94.6%) filtered sequences.
    3278 sequences out of 6725 are being reverse-complemented.
    Read in 6725, output 6376 (94.8%) filtered sequences.
    10015 sequences out of 20204 are being reverse-complemented.
    Read in 20204, output 19173 (94.9%) filtered sequences.
    8464 sequences out of 17105 are being reverse-complemented.
    Read in 17105, output 16218 (94.8%) filtered sequences.
    10451 sequences out of 20998 are being reverse-complemented.
    Read in 20998, output 19880 (94.7%) filtered sequences.
    11435 sequences out of 23297 are being reverse-complemented.
    Read in 23297, output 21306 (91.5%) filtered sequences.
    8616 sequences out of 17239 are being reverse-complemented.
    Read in 17239, output 16409 (95.2%) filtered sequences.
    8276 sequences out of 16650 are being reverse-complemented.
    Read in 16650, output 15817 (95%) filtered sequences.
    10954 sequences out of 22036 are being reverse-complemented.
    Read in 22036, output 20879 (94.7%) filtered sequences.
    4253 sequences out of 8499 are being reverse-complemented.
    Read in 8499, output 8098 (95.3%) filtered sequences.
    4200 sequences out of 8357 are being reverse-complemented.
    Read in 8357, output 7872 (94.2%) filtered sequences.
    23632 sequences out of 48299 are being reverse-complemented.
    Read in 48299, output 44469 (92.1%) filtered sequences.
    32728 sequences out of 67090 are being reverse-complemented.
    Read in 67090, output 61752 (92%) filtered sequences.
    10635 sequences out of 21311 are being reverse-complemented.
    Read in 21311, output 19231 (90.2%) filtered sequences.
    ................................................................
  2. Filtering ................................................................
  3. Learning Error Rates
    Traceback (most recent call last):
    File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 440, in denoise_ccs
    run_commands([cmd])
    File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
    File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/qiime2/sathya/data/3eb8d00c-0c1d-4cee-84ce-358ec2049b69/data', '--output_path', '/tmp/tmpyrdnncho/output.tsv.biom', '--output_track', '/tmp/tmpyrdnncho/track.tsv', '--removed_primer_directory', '/tmp/tmpyrdnncho/nop', '--filtered_directory', '/tmp/tmpyrdnncho/filt', '--forward_primer', 'AGRGTTYGATYMTGGCTCAG', '--reverse_primer', 'RGYTACCTTGTTACGACTT', '--max_mismatch', '2', '--indels', 'False', '--truncation_length', '0', '--trim_left', '0', '--max_expected_errors', '2.0', '--truncation_quality_score', '2', '--min_length', '1200', '--max_length', '1800', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '3.5', '--allow_one_off', 'False', '--num_threads', '1', '--learn_min_reads', '1000000', '--homopolymer_gap_penalty', 'NULL', '--band_size', '32']' died with <Signals.SIGKILL: 9>.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2cli/commands.py", line 478, in call
results = self._execute_action(
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2cli/commands.py", line 539, in _execute_action
results = action(**arguments)
File "", line 2, in denoise_ccs
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in callable_executor
output_views = self._callable(**view_args)
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 449, in denoise_ccs
raise Exception("An error was encountered while running DADA2"
Exception: An error was encountered while running DADA2 in R (return code -9), please inspect stdout and stderr to learn more.

Plugin error from dada2:

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

See above for debug info.

Hello @Sathya-Am. A sigkill most likely means you ran out of RAM. How much RAM do you have access to and how large is your data?

1 Like

Hi @Oddant1 , Oh! I see. That's what I was suspecting. But couldn't find a solution. I have 8 GB RAM and 7.69 GB usable. I'm running the commands in Ubuntu 20.04 VM.
Thanks!

@Oddant1 And my raw data are 2 GB.

Yeah that sounds like you are most likely running out of RAM. Can you run /usr/bin/time -v <your QIIME 2 command here> then post the results here? If you are running out of RAM, do you have more RAM to allocate to the VM?

Usage: qiime dada2 denoise-ccs [OPTIONS]

This method denoises single-end Pacbio CCS sequences, dereplicates them, and
filters chimeras. Tutorial and workflow:
GitHub - benjjneb/LRASManuscript: Reproducible Analyses accompanying DADA2 + PacBio Manuscript

Inputs:
--i-demultiplexed-seqs ARTIFACT SampleData[SequencesWithQuality]
The single-end demultiplexed PacBio CCS sequences to
be denoised. [required]
Parameters:
--p-front TEXT Sequence of an adapter ligated to the 5' end. The
adapter and any preceding bases are trimmed. Can
contain IUPAC ambiguous nucleotide codes. Note,
primer direction is 5' to 3'. Primers are removed
before trim and filter step. Reads that do not
contain the primer are discarded. Each read is
re-oriented if the reverse complement of the read is
a better match to the provided primer sequence. This
is recommended for PacBio CCS reads, which come in a
random mix of forward and reverse-complement
orientations. [required]
--p-adapter TEXT Sequence of an adapter ligated to the 3' end. The
adapter and any preceding bases are trimmed. Can
contain IUPAC ambiguous nucleotide codes. Note,
primer direction is 5' to 3'. Primers are removed
before trim and filter step. Reads that do not
contain the primer are discarded. [required]
--p-max-mismatch INTEGER
The number of mismatches to tolerate when matching
reads to primer sequences - see
DADA2: Fast and accurate sample inference from amplicon data with single-nucleotide resolution for complete
details. [default: 2]
--p-indels / --p-no-indels
Allow insertions or deletions of bases when matching
adapters. Note that primer matching can be
significantly slower, currently about 4x slower
[default: False]
--p-trunc-len INTEGER Position at which sequences should be truncated due
to decrease in quality. This truncates the 3' end of
the of the input sequences, which will be the bases
that were sequenced in the last cycles. Reads that
are shorter than this value will be discarded. If 0
is provided, no truncation or length filtering will
be performed. Note: Since Pacbio CCS sequences were
normally with very high quality scores, there is no
need to truncate the Pacbio CCS sequences.
[default: 0]
--p-trim-left INTEGER Position at which sequences should be trimmed due to
low quality. This trims the 5' end of the of the
input sequences, which will be the bases that were
sequenced in the first cycles. [default: 0]
--p-max-ee NUMBER Reads with number of expected errors higher than
this value will be discarded. [default: 2.0]
--p-trunc-q INTEGER Reads are truncated at the first instance of a
quality score less than or equal to this value. If
the resulting read is then shorter than trunc-len,
it is discarded. [default: 2]
--p-min-len INTEGER Remove reads with length less than minLen. minLen is
enforced after trimming and truncation. For 16S
Pacbio CCS, suggest 1000. [default: 20]
--p-max-len INTEGER Remove reads prior to trimming or truncation which
are longer than this value. If 0 is provided no reads
will be removed based on length. For 16S Pacbio CCS,
suggest 1600. [default: 0]
--p-pooling-method TEXT Choices('independent', 'pseudo')
The method used to pool samples for denoising.
"independent": Samples are denoised indpendently.
"pseudo": The pseudo-pooling method is used to
approximate pooling of samples. In short, samples are
denoised independently once, ASVs detected in at
least 2 samples are recorded, and samples are
denoised independently a second time, but this time
with prior knowledge of the recorded ASVs and thus
higher sensitivity to those ASVs.
[default: 'independent']
--p-chimera-method TEXT Choices('consensus', 'none', 'pooled')
The method used to remove chimeras. "none": No
chimera removal is performed. "pooled": All reads are
pooled prior to chimera detection. "consensus":
Chimeras are detected in samples individually, and
sequences found chimeric in a sufficient fraction of
samples are removed. [default: 'consensus']
--p-min-fold-parent-over-abundance NUMBER
The minimum abundance of potential parents of a
sequence being tested as chimeric, expressed as a
fold-change versus the abundance of the sequence
being tested. Values should be greater than or equal
to 1 (i.e. parents should be more abundant than the
sequence being tested). Suggest 3.5. This parameter
has no effect if chimera-method is "none".
[default: 3.5]
--p-allow-one-off / --p-no-allow-one-off
Bimeras that are one-off from exact are also
identified if the allow-one-off argument is True.
If True, a sequence will be identified as bimera if
it is one mismatch or indel away from an exact
bimera. [default: False]
--p-n-threads INTEGER The number of threads to use for multithreaded
processing. If 0 is provided, all available cores
will be used. [default: 1]
--p-n-reads-learn INTEGER
The number of reads to use when training the error
model. Smaller numbers will result in a shorter run
time but a less reliable error model.
[default: 1000000]
--p-hashed-feature-ids / --p-no-hashed-feature-ids
If true, the feature ids in the resulting table will
be presented as hashes of the sequences defining each
feature. The hash will always be the same for the
same sequence so this allows feature tables to be
merged across runs of this method. You should only
merge tables if the exact same parameters are used
for each run. [default: True]
Outputs:
--o-table ARTIFACT FeatureTable[Frequency]
The resulting feature table. [required]
--o-representative-sequences ARTIFACT FeatureData[Sequence]
The resulting feature sequences. Each feature in the
feature table will be represented by exactly one
sequence. [required]
--o-denoising-stats ARTIFACT SampleData[DADA2Stats]
[required]
Miscellaneous:
--output-dir PATH Output unspecified results to a directory
--verbose / --quiet Display verbose output to stdout and/or stderr
during execution of this action. Or silence output if
execution is successful (silence is golden).
--example-data PATH Write example data and exit.
--citations Show citations and exit.
--help Show this message and exit.

                There was a problem with the command:

(1/1?) --p-n-threads option requires an argument
Command exited with non-zero status 1
Command being timed: "qiime dada2 denoise-ccs --i-demultiplexed-seqs reads_qza/raw_reads.qza --p-min-len 1200 --p-max-len 1800 --p-front AGRGTTYGATYMTGGCTCAG --p-adapter RGYTACCTTGTTACGACTT --p-n-threads --o-table dada2_output/table.qza --o-representative-sequences dada2_output/representative_sequences.qza --o-denoising-stats dada2_output/stats.qza --verbose"
User time (seconds): 8.54
System time (seconds): 2.13
Percent of CPU this job got: 90%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:11.85
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 379664
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1746
Minor (reclaiming a frame) page faults: 100331
Voluntary context switches: 5985
Involuntary context switches: 45
Swaps: 0
File system inputs: 399768
File system outputs: 8
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 1

Here is the output. How do I check the RAM to allocate? Sorry, I'm a newbie.

It's where it says "maximum resident set size." It looks like it's only using about 4 gigs. Are you sure there are 8 gigs allocated to the vm? Can you run "free -m" and post the output of that here?

          total        used        free      shared  buff/cache   available

Mem: 3763 271 75 2 3417 3308
Swap: 1024 0 1024

Yeah the VM only has access to ~4 gigs you are definitely running out of memory. You may be able to give it access to enough RAM to complete your analysis, but if you only have 8 gigs total that may be tough to do.

How do I allocate more memory to VM? Already, I've allocated 50% to VM. If I allocate more, would it be fine?
Or else do I need to run it with a higher RAM? Thanks for your help!

You can probably get away with allocating 6gb of RAM to the VM. As for changing the amount allocated that's going to be dependent on what VM software you're using. You should be able to google it for the specific software you're using.

Hi again. Now I'm running it on 32GB RAM. Still getting an error code. I wonder whether I'm allocating the NCORES correctly. My sequences are 16s PacBio long read full-length sequences.

Here is the error message.
~$ qiime dada2 denoise-ccs --i-demultiplexed-seqs reads_qza/raw_reads.qza --p-min-len 1200 --p-max-len 1800 --p-front AGRGTTYGATYMTGGCTCAG --p-adapter RGYTACCTTGTTACGACTT --p-n-threads 0
--o-table dada2_output/table.qza --o-representative-sequences dada2_output/representative_sequences.qza --o-denoi
sing-stats dada2_output/stats.qza --verbose
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.R --input_directory /tmp/qiime2/sathya/data/3eb8d00c-0c1d-4cee-84ce-358ec2049b69/data --output_path /tmp/tmphz10shfc/output.tsv.biom --output_track /tmp/tmphz10shfc/track.tsv --removed_primer_directory /tmp/tmphz10shfc/nop --filtered_directory /tmp/tmphz10shfc/filt --forward_primer AGRGTTYGATYMTGGCTCAG --reverse_primer RGYTACCTTGTTACGACTT --max_mismatch 2 --indels False --truncation_length 0 --trim_left 0 --max_expected_errors 2.0 --truncation_quality_score 2 --min_length 1200 --max_length 1800 --pooling_method independent --chimera_method consensus --min_parental_fold 3.5 --allow_one_off False --num_threads 0 --learn_min_reads 1000000 --homopolymer_gap_penalty NULL --band_size 32

Warning message:
package ā€˜optparseā€™ was built under R version 4.2.3
R version 4.2.2 (2022-10-31)
Loading required package: Rcpp
DADA2: 1.26.0 / Rcpp: 1.0.11 / RcppParallel: 5.1.6

  1. Removing Primers
    Multiple matches to the primer(s) in some sequences. Using the longest possible match.
    13990 sequences out of 28546 are being reverse-complemented.
    Read in 28546, output 26362 (92.3%) filtered sequences.
    8185 sequences out of 16521 are being reverse-complemented.
    Read in 16521, output 15011 (90.9%) filtered sequences.
    16739 sequences out of 34472 are being reverse-complemented.
    Read in 34472, output 30808 (89.4%) filtered sequences.
    16972 sequences out of 34594 are being reverse-complemented.
    Read in 34594, output 31375 (90.7%) filtered sequences.
    9413 sequences out of 18945 are being reverse-complemented.
    Read in 18945, output 17238 (91%) filtered sequences.
    9224 sequences out of 18878 are being reverse-complemented.
    Read in 18878, output 17116 (90.7%) filtered sequences.
    6278 sequences out of 12528 are being reverse-complemented.
    Read in 12528, output 11402 (91%) filtered sequences.
    5802 sequences out of 11576 are being reverse-complemented.
    Read in 11576, output 10437 (90.2%) filtered sequences.
    75 sequences out of 154 are being reverse-complemented.
    Read in 154, output 146 (94.8%) filtered sequences.
    5874 sequences out of 11950 are being reverse-complemented.
    Read in 11950, output 10960 (91.7%) filtered sequences.
    35931 sequences out of 73774 are being reverse-complemented.
    Read in 73774, output 67875 (92%) filtered sequences.
    18671 sequences out of 38362 are being reverse-complemented.
    Read in 38362, output 34504 (89.9%) filtered sequences.
    40358 sequences out of 81865 are being reverse-complemented.
    Read in 81865, output 75510 (92.2%) filtered sequences.
    50695 sequences out of 103506 are being reverse-complemented.
    Read in 103506, output 95482 (92.2%) filtered sequences.
    57277 sequences out of 116916 are being reverse-complemented.
    Read in 116916, output 108239 (92.6%) filtered sequences.
    29300 sequences out of 59641 are being reverse-complemented.
    Read in 59641, output 55696 (93.4%) filtered sequences.
    32714 sequences out of 66340 are being reverse-complemented.
    Read in 66340, output 61953 (93.4%) filtered sequences.
    5401 sequences out of 10833 are being reverse-complemented.
    Read in 10833, output 9840 (90.8%) filtered sequences.
    4753 sequences out of 9354 are being reverse-complemented.
    Read in 9354, output 8502 (90.9%) filtered sequences.
    48646 sequences out of 98711 are being reverse-complemented.
    Read in 98711, output 91351 (92.5%) filtered sequences.
    39508 sequences out of 79578 are being reverse-complemented.
    Read in 79578, output 73786 (92.7%) filtered sequences.
    8095 sequences out of 16015 are being reverse-complemented.
    Read in 16015, output 14496 (90.5%) filtered sequences.
    50339 sequences out of 103663 are being reverse-complemented.
    Read in 103663, output 95317 (91.9%) filtered sequences.
    6676 sequences out of 13343 are being reverse-complemented.
    Read in 13343, output 12213 (91.5%) filtered sequences.
    4607 sequences out of 9087 are being reverse-complemented.
    Read in 9087, output 8265 (91%) filtered sequences.
    2769 sequences out of 5589 are being reverse-complemented.
    Read in 5589, output 5014 (89.7%) filtered sequences.
    10628 sequences out of 21417 are being reverse-complemented.
    Read in 21417, output 20237 (94.5%) filtered sequences.
    8057 sequences out of 16087 are being reverse-complemented.
    Read in 16087, output 15294 (95.1%) filtered sequences.
    11368 sequences out of 22807 are being reverse-complemented.
    Read in 22807, output 21604 (94.7%) filtered sequences.
    9129 sequences out of 18182 are being reverse-complemented.
    Read in 18182, output 17365 (95.5%) filtered sequences.
    12819 sequences out of 25876 are being reverse-complemented.
    Read in 25876, output 24297 (93.9%) filtered sequences.
    10060 sequences out of 20104 are being reverse-complemented.
    Read in 20104, output 19114 (95.1%) filtered sequences.
    7259 sequences out of 14430 are being reverse-complemented.
    Read in 14430, output 13630 (94.5%) filtered sequences.
    45613 sequences out of 93211 are being reverse-complemented.
    Read in 93211, output 85941 (92.2%) filtered sequences.
    6411 sequences out of 12662 are being reverse-complemented.
    Read in 12662, output 12050 (95.2%) filtered sequences.
    10354 sequences out of 20992 are being reverse-complemented.
    Read in 20992, output 19992 (95.2%) filtered sequences.
    9322 sequences out of 18711 are being reverse-complemented.
    Read in 18711, output 17733 (94.8%) filtered sequences.
    9033 sequences out of 18238 are being reverse-complemented.
    Read in 18238, output 17223 (94.4%) filtered sequences.
    9226 sequences out of 18534 are being reverse-complemented.
    Read in 18534, output 17773 (95.9%) filtered sequences.
    7540 sequences out of 15242 are being reverse-complemented.
    Read in 15242, output 14445 (94.8%) filtered sequences.
    11267 sequences out of 22676 are being reverse-complemented.
    Read in 22676, output 21501 (94.8%) filtered sequences.
    6893 sequences out of 14038 are being reverse-complemented.
    Read in 14038, output 13278 (94.6%) filtered sequences.
    6625 sequences out of 13314 are being reverse-complemented.
    Read in 13314, output 12614 (94.7%) filtered sequences.
    10021 sequences out of 20393 are being reverse-complemented.
    Read in 20393, output 19329 (94.8%) filtered sequences.
    9498 sequences out of 19188 are being reverse-complemented.
    Read in 19188, output 17480 (91.1%) filtered sequences.
    5506 sequences out of 11074 are being reverse-complemented.
    Read in 11074, output 10455 (94.4%) filtered sequences.
    4750 sequences out of 9582 are being reverse-complemented.
    Read in 9582, output 9095 (94.9%) filtered sequences.
    5280 sequences out of 10695 are being reverse-complemented.
    Read in 10695, output 10198 (95.4%) filtered sequences.
    6317 sequences out of 12841 are being reverse-complemented.
    Read in 12841, output 12165 (94.7%) filtered sequences.
    8835 sequences out of 17831 are being reverse-complemented.
    Read in 17831, output 16941 (95%) filtered sequences.
    5740 sequences out of 11576 are being reverse-complemented.
    Read in 11576, output 10948 (94.6%) filtered sequences.
    3278 sequences out of 6725 are being reverse-complemented.
    Read in 6725, output 6376 (94.8%) filtered sequences.
    10015 sequences out of 20204 are being reverse-complemented.
    Read in 20204, output 19173 (94.9%) filtered sequences.
    8464 sequences out of 17105 are being reverse-complemented.
    Read in 17105, output 16218 (94.8%) filtered sequences.
    10451 sequences out of 20998 are being reverse-complemented.
    Read in 20998, output 19880 (94.7%) filtered sequences.
    11435 sequences out of 23297 are being reverse-complemented.
    Read in 23297, output 21306 (91.5%) filtered sequences.
    8616 sequences out of 17239 are being reverse-complemented.
    Read in 17239, output 16409 (95.2%) filtered sequences.
    8276 sequences out of 16650 are being reverse-complemented.
    Read in 16650, output 15817 (95%) filtered sequences.
    10954 sequences out of 22036 are being reverse-complemented.
    Read in 22036, output 20879 (94.7%) filtered sequences.
    4253 sequences out of 8499 are being reverse-complemented.
    Read in 8499, output 8098 (95.3%) filtered sequences.
    4200 sequences out of 8357 are being reverse-complemented.
    Read in 8357, output 7872 (94.2%) filtered sequences.
    23632 sequences out of 48299 are being reverse-complemented.
    Read in 48299, output 44469 (92.1%) filtered sequences.
    32728 sequences out of 67090 are being reverse-complemented.
    Read in 67090, output 61752 (92%) filtered sequences.
    10635 sequences out of 21311 are being reverse-complemented.
    Read in 21311, output 19231 (90.2%) filtered sequences.
    ................................................................
  2. Filtering Error in names(answer) <- dots[[1L]] :
    'names' attribute [64] must be the same length as the vector [16]
    4: mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ,
    truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight,
    maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ,
    maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex,
    orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType,
    compress = compress, verbose = verbose), mc.cores = ncores,
    mc.silent = TRUE)
    3: filterAndTrim(nop, filts, truncLen = truncLen, trimLeft = trimLeft,
    maxEE = maxEE, truncQ = truncQ, rm.phix = FALSE, multithread = multithread,
    maxLen = maxLen, minLen = minLen, minQ = 3)
    2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
    classes)) tryInvokeRestart("muffleWarning"))
    1: suppressWarnings(filterAndTrim(nop, filts, truncLen = truncLen,
    trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = FALSE,
    multithread = multithread, maxLen = maxLen, minLen = minLen,
    minQ = 3))
    Traceback (most recent call last):
    File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 440, in denoise_ccs
    run_commands([cmd])
    File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
    subprocess.run(cmd, check=True)
    File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/qiime2/sathya/data/3eb8d00c-0c1d-4cee-84ce-358ec2049b69/data', '--output_path', '/tmp/tmphz10shfc/output.tsv.biom', '--output_track', '/tmp/tmphz10shfc/track.tsv', '--removed_primer_directory', '/tmp/tmphz10shfc/nop', '--filtered_directory', '/tmp/tmphz10shfc/filt', '--forward_primer', 'AGRGTTYGATYMTGGCTCAG', '--reverse_primer', 'RGYTACCTTGTTACGACTT', '--max_mismatch', '2', '--indels', 'False', '--truncation_length', '0', '--trim_left', '0', '--max_expected_errors', '2.0', '--truncation_quality_score', '2', '--min_length', '1200', '--max_length', '1800', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '3.5', '--allow_one_off', 'False', '--num_threads', '0', '--learn_min_reads', '1000000', '--homopolymer_gap_penalty', 'NULL', '--band_size', '32']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2cli/commands.py", line 478, in call
results = self._execute_action(
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2cli/commands.py", line 539, in _execute_action
results = action(**arguments)
File "", line 2, in denoise_ccs
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
outputs = self.callable_executor(
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in callable_executor
output_views = self._callable(**view_args)
File "/home/sathya/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 449, in denoise_ccs
raise Exception("An error was encountered while running DADA2"
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.

You are currently setting --p-n-threads 0 which will attempt to create a thread for every core it has access to. More threads means more RAM, so in theory even if QIIME 2 now has access to 32 gigs of RAM you could still run out.

If you know how many cores you have total then try setting that parameter manually to about half of what you have which will PROBABLY work. If you don't know, you can try just setting it to 1 which ought to work but may take a while.

If you run the command lscpu and post the output here I can help you figure out how many cores you have. If you do that can you please also run free -m again so I can verify the amount of RAM you have access to? Thank you.

Here are the outputs. I ran with 1 and didn't work.

          total        used        free      shared  buff/cache   available

Mem: 15851 2556 8880 0 4414 12997
Swap: 4096 116 3979

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 39 bits physical, 48 bits virtual
CPU(s): 12
On-line CPU(s) list: 0-11
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 158
Model name: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Stepping: 10
CPU MHz: 2592.008
BogoMIPS: 5184.01
Virtualization: VT-x
Hypervisor vendor: Microsoft
Virtualization type: full
L1d cache: 192 KiB
L1i cache: 192 KiB
L2 cache: 1.5 MiB
L3 cache: 12 MiB
Vulnerability Gather data sampling: Unknown: Dependent on hypervisor status
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed: Mitigation; IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; IBRS, IBPB conditional, STIBP conditional, RSB filling, PBRSB-eIBRS Not
affected
Vulnerability Srbds: Unknown: Dependent on hypervisor status
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx
fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good
nopl xtopology cpuid pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 movbe
popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single
pti ssbd ibrs ibpb stibp tpr_shadow vnmi ept vpid ept_ad fsgsbase bmi1 avx2 smep bm
i2 erms invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves flush_l1d
arch_capabilities

So the VM is seeing 16gigs of RAM and 12 cores. Can you put the /usr/bin/time -v in front of your command running with one core and post that here? It feels odd to me that you would still be running out of RAM now with 16gigs if your raw data is only 2, but I am not super familiar with the RAM usage of this command it seems like it may be a real RAM hog.

I am getting the 16gigs of RAM from the "total" column "Mem" row from free -m and the 12 cores from where it says "CPU(s)" under lscpu

I tried with above command and NCORES=1. Thereā€™s no error message. But it keeps frozen for around 15hours at the ā€œlearning error rateā€ step. Should I include cores to 6?

Yeah give that a shot

Hi again, it worked with 6 cores after multiple attempts. Thank you so much for your help!

2 Likes

Glad to hear that it worked!

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