Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【ERROR】Exception: An error was encountered while running DADA2 in R (return code -11) #1999

Open
AlenaYoung opened this issue Aug 14, 2024 · 1 comment

Comments

@AlenaYoung
Copy link

Hi,

I am having trouble with running Sequence quality control using DADA2 in DADA2: 1.26.0 / Rcpp: 1.0.12 / RcppParallel: 5.1.6
My script is as shown below:

run_dada.R --input_directory /tmp/qiime2/yangtr/data/adb69828-bac4-4b3d-98df-25413e5686af/data --output_path /tmp/tmp3ytxlxso/output.tsv.biom --output_track /tmp/tmp3ytxlxso/track.tsv --filtered_directory /tmp/tmp3ytxlxso --truncation_length 0 --trim_left 0 --max_expected_errors 2.0 --truncation_quality_score 2 --max_length Inf --pooling_method independent --chimera_method consensus --min_parental_fold 1.0 --allow_one_off False --num_threads 0 --learn_min_reads 1000000 --homopolymer_gap_penalty NULL --band_size 16

But I get this error;

Command: run_dada.R --input_directory /tmp/qiime2/yangtr/data/adb69828-bac4-4b3d-98df-25413e5686af/data --output_path /tmp/tmp3ytxlxso/output.tsv.biom --output_track /tmp/tmp3ytxlxso/track.tsv --filtered_directory /tmp/tmp3ytxlxso --truncation_length 0 --trim_left 0 --max_expected_errors 2.0 --truncation_quality_score 2 --max_length Inf --pooling_method independent --chimera_method consensus --min_parental_fold 1.0 --allow_one_off False --num_threads 0 --learn_min_reads 1000000 --homopolymer_gap_penalty NULL --band_size 16

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.12 / RcppParallel: 5.1.6 
2) Filtering ..................................................................
3) Learning Error Rates
231624508 total bases in 2161450 reads from 2 samples will be used for learning the error rates.
4) Denoise samples 
..........................
 *** caught segfault ***
address 0xa5dc, cause 'memory not mapped'

 *** caught segfault ***
address 0x6501, cause 'memory not mapped'

 *** caught segfault ***
address 0x134d8d, cause 'memory not mapped'

 *** caught segfault ***
address 0x18251b, cause 'memory not mapped'
Error in dada_uniques(names(drpi$uniques), unname(drpi$uniques), names(drpi$uniques) %in%  : 
  bad value
Calls: dada -> dada_uniques

Traceback:

 *** caught segfault ***

Traceback:
 1: dada_uniques(names(drpi$uniques), unname(drpi$uniques), names(drpi$uniques) %in%     c(priors, pseudo_priors), erri, unname(t(drpi$quals)), opts[["MATCH"]], 
 *** caught segfault ***

Traceback:
 1: dada_uniques(names(drpi$uniques), unname(drpi$uniques), names(drpi$uniques) %in%     c(priors, pseudo_priors), erri, unname(t(drpi$quals)), opts[["MATCH"]],     opts[["MISMATCH"]], opts[["GAP_PENALTY"]], opts[["USE_KMERS"]],     opts[["KDIST_CUTOFF"]], opts[["BAND_SIZE"]], opts[["OMEGA_A"]],     opts[["OMEGA_P"]], opts[["OMEGA_C"]], opts[["DETECT_SINGLETONS"]],     if (initializeErr) {        1    } else {        unname(t(drpi$quals))[[opts[["MATCH"]]]]    }, opts[["HOMOPOLD"]], opts[["MIN_HAMMING"]], opts[["MIN_ABUNDANCE"]],     TRUE, FALSE, opts[["GAPLESS"]], opts[["HOMOPOLYMER_GAP_PENALTY"]],     multithread, (verbose >= 2), opts[["SSE"]], opts[["GAPLESS"]],     opts[["GREEDY"]])
 2: dada(drp, err = err, multithread = multithread, HOMOPOLYMER_GAP_PENALTY = HOMOPOLYMER_GAP_PENALTY,     BAND_SIZE = BAND_SIZE, verbose = FALSE)
An irrecoverable exception occurred. R is aborting now ...
 1: dada_uniques(names(drpi$uniques), unname(drpi$uniques), names(drpi$uniques) %in%     c(priors, pseudo_priors), erri, unname(t(drpi$quals)), opts[["MATCH"]],     opts[["MISMATCH"]], opts[["GAP_PENALTY"]], opts[["USE_KMERS"]],     opts[["KDIST_CUTOFF"]], opts[["BAND_SIZE"]], opts[["KDISA_A"]], address (nil), cause 'unknown'
    opts[["MISMATCH"]], opts[["GAP_PENALTY"]], opts[["USE_KMERS"]],     opts[["GAPLE_S"]], opts[["OREEAY"]], opts[["DETECT_SINGLETONS"]],     if (initializeErr) {        1    } else {        opts[["MAX_CLUST"]]    }, opts[["MIN_FOLD"]], opts[["MIN_HAMMING"]], opts[["MIN_ABUNDANCE"]],     TRUE, FALSE, opts[["VECTORIZED_ALIGNMENT"]], opts[["HOMOPOLYMER_GAP_PENALTY"]],     multithread, (verbose >= 2), opts[["SSE"]], opts[["GAPLESS"]],     opts[["GREEDY"UTOFF"]])
 2: dada(drp, err = err, multithread = multithread, HOMOPOLYMER_GAP_PENALTY = HOMOPOLYMER_GAP_PENALTY,     BAND_SIZE = BAND_SIZE, verbose = FALSE)
An irrecoverable exception occurred. R is aborting now ...
    opts[["GREEDY"UTOFF"]], opts[["BAND_SIZE"]], opts[["OMEGA_A"]],     opts[["OMEGA_P"]], opts[["OMEGA_C"]], opts[["DETECT_SINGLETONS"]],     if (initializeErr) {        1.0000000e+00    } else {        opts[["MAX_CLUST"]]    }, opts[["MIN_FOLD"]], opts[["MIN_HAMMING"]], opts[["MIN_ABUNDANCE"]],     TRUE, FALSE, opts[["VECTORIZED_ALIGNMENT"]], opts[["HOMOPOLYMER_GAP_PENALTY"]],     multithread, (verbose >= 2), opts[["SSE"]], opts[["GAPLESS"]],     opts[["GREEDY"]])
 2: dada(drp, err = err, multithread = multithread, HOMOPOLYMER_GAP_PENALTY = HOMOPOLYMER_GAP_PENALTY,     BAND_SIZE = BAND_SIZE, verbose = FALSE)
An irrecoverable exception occurred. R is aborting now ...
address 0x1957, cause 'memory not mapped'
Error during wrapup: promise already under evaluation: recursive default argument reference or earlier problems?
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
Error: R_Reprotect: only 37 protected items, can't reprotect index 37
Traceback (most recent call last):
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 240, in _denoise_single
    run_commands([cmd])
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 37, in run_commands
    subprocess.run(cmd, check=True)
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/qiime2/yangtr/data/adb69828-bac4-4b3d-98df-25413e5686af/data', '--output_path', '/tmp/tmp3ytxlxso/output.tsv.biom', '--output_track', '/tmp/tmp3ytxlxso/track.tsv', '--filtered_directory', '/tmp/tmp3ytxlxso', '--truncation_length', '0', '--trim_left', '0', '--max_expected_errors', '2.0', '--truncation_quality_score', '2', '--max_length', 'Inf', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '1.0', '--allow_one_off', 'False', '--num_threads', '0', '--learn_min_reads', '1000000', '--homopolymer_gap_penalty', 'NULL', '--band_size', '16']' died with <Signals.SIGSEGV: 11>.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/site-packages/q2cli/commands.py", line 520, in __call__
    results = self._execute_action(
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/site-packages/q2cli/commands.py", line 581, in _execute_action
    results = action(**arguments)
  File "<decorator-gen-70>", line 2, in denoise_single
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/site-packages/qiime2/sdk/action.py", line 342, in bound_callable
    outputs = self._callable_executor_(
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/site-packages/qiime2/sdk/action.py", line 566, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 266, in denoise_single
    return _denoise_single(
  File "/mnt/data/software/miniconda3/envs/qiime2-amplicon/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 249, in _denoise_single
    raise Exception("An error was encountered while running DADA2"
Exception: An error was encountered while running DADA2 in R (return code -11), please inspect stdout and stderr to learn more.

Any help will be much appreciated.
Thank you in advance,

Alena

@benjjneb
Copy link
Owner

This looks like an error from the Q2 dada2 plugin. Have you tried looking at the QIIME2 forum?

Googling around suggests this is an issue with differences between installed libraries and the libraries used to build R packages: https://stackoverflow.com/questions/49190251/caught-segfault-memory-not-mapped-error-in-r

You may want to consider creating a new clean Q2 environment and rerunning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants