dada2 icon indicating copy to clipboard operation
dada2 copied to clipboard

LearnErrors fail

Open najouamghazli opened this issue 1 year ago • 3 comments

Hi,

While running an rmarkdown script of dada2 on ubuntu, it stops at the learErrors chunk with the following error message:

Error in `1:i`: ! argument of length 0 Backtrace: 1. dada2::learnErrors(filtFs, randomize = TRUE, multithread = TRUE)

I tried running the script chunk by chunk manually, always on ubuntu. It finishes the errF step

errF <- dada2::learnErrors(filtFs,
                           randomize = TRUE,
                           multithread = TRUE)
111736303 total bases in 489466 reads from 11 samples will be used for learning the error rates.

But, it stops in the errR step with the following error message:

errR <- dada2::learnErrors(filtRs,
                           randomize = TRUE,
                           multithread = TRUE)
109335294 total bases in 481408 reads from 9 samples will be used for learning the error rates.
Error in Target:errR <- dada2::learnErrors(filtRs, randomize = TRUE, multithread = TRUE) :
  object 'Target' not found

Any idea on how to overcome this ?

najouamghazli avatar Nov 29 '23 12:11 najouamghazli

That was me !! Instead of typing errR as variable I typed Target:errR

But for running it directely from shell, it still doesn't work with the first error message.

najouamghazli avatar Nov 29 '23 13:11 najouamghazli

Error in 1:i: ! argument of length 0 Backtrace: 1. dada2::learnErrors(filtFs, randomize = TRUE, multithread = TRUE)

This error is triggered if the input filtFs argument is empty. Can you double-check that the filtFs is validly assigned, and of length >= 1, at the point learnErrors is being called and producing this error?

benjjneb avatar Nov 29 '23 18:11 benjjneb

Thank you @benjjneb. That was it, the length of filtFs was of 0. When rerunning the script properly the problem was solved. Many thanks.

najouamghazli avatar Nov 29 '23 20:11 najouamghazli