dada2
dada2 copied to clipboard
LearnErrors fail
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 ?
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.
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?
Thank you @benjjneb. That was it, the length of filtFs
was of 0. When rerunning the script properly the problem was solved. Many thanks.