Hi. I gave the followin command with verbose flag.
qiime dada2 denoise-paired
--i-demultiplexed-seqs paired-end-demux.qza
--p-trim-left-f 15
--p-trim-left-r 15
--p-trunc-len-f 260
--p-trunc-len-r 150
--o-representative-sequences rep-seqs.qza
--o-table table.qza
--o-denoising-stats denoising-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/tmpqeg4et7z/forward --input_directory_reverse /tmp/tmpqeg4et7z/reverse --output_path /tmp/tmpqeg4et7z/output.tsv.biom --output_track /tmp/tmpqeg4et7z/track.tsv --filtered_directory /tmp/tmpqeg4et7z/filt_f --filtered_directory_reverse /tmp/tmpqeg4et7z/filt_r --truncation_length 260 --truncation_length_reverse 150 --trim_left 15 --trim_left_reverse 15 --max_expected_errors 2.0 --max_expected_errors_reverse 2.0 --truncation_quality_score 2 --min_overlap 12 --pooling_method independent --chimera_method consensus --min_parental_fold 1.0 --allow_one_off False --num_threads 1 --learn_min_reads 1000000
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
2) Filtering Error in add(raw()) : record does not start with '@'
16: .Call(.streamer_add, sampler, bin, c(skips[ith], adds[ith]))
15: add(raw())
14: x$yield(...)
13: yield(fF, qualityType = qualityType)
12: yield(fF, qualityType = qualityType)
11: withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
10: suppressWarnings(fqF <- yield(fF, qualityType = qualityType))
9: (function (fn, fout, maxN = c(0, 0), truncQ = c(2, 2), truncLen = c(0,
0), maxLen = c(Inf, Inf), minLen = c(20, 20), trimLeft = c(0,
0), trimRight = c(0, 0), minQ = c(0, 0), maxEE = c(Inf, Inf),
rm.phix = c(TRUE, TRUE), rm.lowcomplex = c(0, 0), matchIDs = FALSE,
orient.fwd = NULL, id.sep = "\s", id.field = NULL, n = 1e+06,
OMP = TRUE, qualityType = "Auto", compress = TRUE, verbose = FALSE,
...)
{
if (!OMP) {
ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L)
on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads))
}
if (!is.character(fn) || length(fn) != 2)
stop("Two paired input file names required.")
if (!is.character(fout) || length(fout) != 2)
stop("Two paired output file names required.")
if (any(duplicated(c(fn, fout)))) {
stop("The output and input file names must be different.")
}
for (var in c("maxN", "truncQ", "truncLen", "maxLen", "minLen",
"trimLeft", "trimRight", "minQ", "maxEE", "rm.phix",
"rm.lowcomplex")) {
if (length(get(var)) == 1) {
assign(var, c(get(var), get(var)))
}
if (length(get(var)) != 2) {
stop(paste("Input variable", var, "must be length 1 or 2 (Forward, Reverse)."))
}
}
startF <- max(1, trimLeft[[1]] + 1, na.rm = TRUE)
startR <- max(1, trimLeft[[2]] + 1, na.rm = TRUE)
endF <- truncLen[[1]]
if (endF < startF) {
endF = NA
}
endF <- endF - startF + 1
endR <- truncLen[[2]]
if (endR < startR) {
endR = NA
}
endR <- endR - startR + 1
fF <- FastqStreamer(fn[[1]], n = n)
on.exit(close(fF))
fR <- FastqStreamer(fn[[2]], n = n)
on.exit(close(fR), add = TRUE)
if (file.exists(fout[[1]])) {
if (file.remove(fout[[1]])) {
if (verbose)
message("Overwriting file:", fout[[1]])
}
else {
stop("Failed to overwrite file:", fout[[1]])
}
}
if (file.exists(fout[[2]])) {
if (file.remove(fout[[2]])) {
if (verbose)
message("Overwriting file:", fout[[2]])
}
else {
stop("Failed to overwrite file:", fout[[2]])
}
}
first = TRUE
remainderF <- ShortReadQ()
remainderR <- ShortReadQ()
casava <- "Undetermined"
inseqs = 0
outseqs = 0
while (TRUE) {
suppressWarnings(fqF <- yield(fF, qualityType = qualityType))
suppressWarnings(fqR <- yield(fR, qualityType = qualityType))
if (length(fqF) == 0 && length(fqR) == 0) {
break
}
inseqs <- inseqs + length(fqF)
if (matchIDs) {
if (first) {
if (is.null(id.field)) {
id1 <- as.character(id(fqF)[[1]])
id.fields <- strsplit(id1, id.sep)[[1]]
ncolon <- sapply(gregexpr(":", id.fields),
length)
ncoltab <- table(ncolon)
if (max(ncolon) == 6 && ncoltab["6"] == 1) {
casava <- "Current"
id.field <- which(ncolon == 6)
}
else if (max(ncolon) == 4 && ncoltab["4"] ==
1) {
casava <- "Old"
id.field <- which(ncolon == 4)
}
else {
stop("Couldn't automatically detect the sequence identifier field in the fastq id string.")
}
}
}
else {
fqF <- append(remainderF, fqF)
fqR <- append(remainderR, fqR)
}
}
else {
if (length(fqF) != length(fqR))
stop("Mismatched forward and reverse sequence files: ",
length(fqF), ", ", length(fqR), ".")
}
if (matchIDs) {
idsF <- sapply(strsplit(as.character(id(fqF)), id.sep),
[
, id.field)
idsR <- sapply(strsplit(as.character(id(fqR)), id.sep),
[
, id.field)
if (casava == "Old") {
idsF <- sapply(strsplit(idsF, "#"), [
, 1)
}
lastF <- max(c(0, which(idsF %in% idsR)))
lastR <- max(c(0, which(idsR %in% idsF)))
if (lastF < length(fqF)) {
remainderF <- fqF[(lastF + 1):length(fqF)]
}
else {
remainderF <- ShortReadQ()
}
if (lastR < length(fqR)) {
remainderR <- fqR[(lastR + 1):length(fqR)]
}
else {
remainderR <- ShortReadQ()
}
fqF <- fqF[idsF %in% idsR]
fqR <- fqR[idsR %in% idsF]
}
if (!is.null(orient.fwd)) {
if (!C_isACGT(orient.fwd))
stop("Non-ACGT characters detected in orient.fwd")
barlen <- nchar(orient.fwd)
keepF <- narrow(sread(fqF), 1, barlen) == orient.fwd
keepR <- (narrow(sread(fqR), 1, barlen) == orient.fwd) &
!keepF
fq <- ShortReadQ(sread = c(sread(fqF[keepF]), sread(fqR[keepR])),
quality = c(quality(quality(fqF[keepF])), quality(quality(fqR[keepR]))),
id = c(id(fqF[keepF]), id(fqR[keepR])))
fqR <- ShortReadQ(sread = c(sread(fqR[keepF]), sread(fqF[keepR])),
quality = c(quality(quality(fqR[keepF])), quality(quality(fqF[keepR]))),
id = c(id(fqR[keepF]), id(fqF[keepR])))
fqF <- fq
rm(fq)
}
if (is.finite(maxLen[[1]]) || is.finite(maxLen[[2]])) {
keep <- width(fqF) <= maxLen[[1]] & width(fqR) <=
maxLen[[2]]
fqF <- fqF[keep]
fqR <- fqR[keep]
}
keep <- (width(fqF) >= startF & width(fqR) >= startR)
fqF <- fqF[keep]
fqF <- narrow(fqF, start = startF, end = NA)
fqR <- fqR[keep]
fqR <- narrow(fqR, start = startR, end = NA)
if (trimRight[[1]] > 0) {
keep <- width(fqF) > trimRight[[1]]
fqF <- fqF[keep]
fqR <- fqR[keep]
fqF <- narrow(fqF, start = NA, end = width(fqF) -
trimRight[[1]])
}
if (trimRight[[2]] > 0) {
keep <- width(fqR) > trimRight[[2]]
fqF <- fqF[keep]
fqR <- fqR[keep]
fqR <- narrow(fqR, start = NA, end = width(fqR) -
trimRight[[2]])
}
encF <- encoding(quality(fqF))
encR <- encoding(quality(fqR))
if (is.numeric(truncQ)) {
indF <- which(encF == truncQ[[1]])
indR <- which(encR == truncQ[[2]])
if (!(length(indF) == 1 && length(indR) == 1))
stop("Encoding for this truncQ value not found.")
truncQ <- c(names(encF)[[indF]], names(encR)[[indR]])
}
if (length(fqF) > 0) {
rngF <- trimTails(fqF, 1, truncQ[[1]], ranges = TRUE)
fqF <- narrow(fqF, 1, end(rngF))
}
if (length(fqR) > 0) {
rngR <- trimTails(fqR, 1, truncQ[[2]], ranges = TRUE)
fqR <- narrow(fqR, 1, end(rngR))
}
truncQ <- c(encF[truncQ[1]], encR[truncQ[2]])
keep <- (width(fqF) > 0 & width(fqR) > 0)
fqF <- fqF[keep]
fqR <- fqR[keep]
keep <- rep(TRUE, length(fqF))
if (!is.na(endF)) {
keep <- keep & (width(fqF) >= endF)
}
if (!is.na(endR)) {
keep <- keep & (width(fqR) >= endR)
}
fqF <- fqF[keep]
fqR <- fqR[keep]
fqF <- narrow(fqF, start = 1, end = endF)
fqR <- narrow(fqR, start = 1, end = endR)
keep <- width(fqF) >= minLen[[1]] & width(fqR) >= minLen[[2]]
fqF <- fqF[keep]
fqR <- fqR[keep]
keep <- .nFilter(fqF, maxN[[1]]) & .nFilter(fqR, maxN[[2]])
fqF <- fqF[keep]
fqR <- fqR[keep]
keep <- rep(TRUE, length(fqF))
qmat <- as(quality(fqF), "matrix")
if (minQ[[1]] > truncQ[[1]])
suppressWarnings(keep <- keep & (apply(qmat, 1, min,
na.rm = TRUE) > minQ[[1]]))
if (maxEE[[1]] < Inf)
keep <- keep & C_matrixEE(qmat) <= maxEE[[1]]
qmat <- as(quality(fqR), "matrix")
if (minQ[[2]] > truncQ[[2]])
suppressWarnings(keep <- keep & (apply(qmat, 1, min,
na.rm = TRUE) > minQ[[2]]))
if (maxEE[[2]] < Inf)
keep <- keep & C_matrixEE(qmat) <= maxEE[[2]]
fqF <- fqF[keep]
fqR <- fqR[keep]
rm(qmat)
if (length(fqF) != length(fqR))
stop("Filtering caused mismatch between forward and reverse sequence lists: ",
length(fqF), ", ", length(fqR), ".")
if (rm.phix[[1]] && rm.phix[[2]]) {
is.phi <- isPhiX(as(sread(fqF), "character"), ...)
is.phi <- is.phi | isPhiX(as(sread(fqR), "character"),
...)
}
else if (rm.phix[[1]] && !rm.phix[[2]]) {
is.phi <- isPhiX(as(sread(fqF), "character"), ...)
}
else if (!rm.phix[[1]] && rm.phix[[2]]) {
is.phi <- isPhiX(as(sread(fqR), "character"), ...)
}
if (any(rm.phix)) {
fqF <- fqF[!is.phi]
fqR <- fqR[!is.phi]
}
if (rm.lowcomplex[[1]] > 0 && rm.lowcomplex[[2]] > 0) {
is.lowc <- (seqComplexity(sread(fqF), ...) < rm.lowcomplex[[1]])
is.lowc <- is.lowc | (seqComplexity(sread(fqF), ...) <
rm.lowcomplex[[2]])
}
else if (rm.lowcomplex[[1]] && !rm.lowcomplex[[2]]) {
is.lowc <- (seqComplexity(sread(fqF), ...) < rm.lowcomplex[[1]])
}
else if (!rm.lowcomplex[[1]] && rm.lowcomplex[[2]]) {
is.lowc <- (seqComplexity(sread(fqR), ...) < rm.lowcomplex[[2]])
}
if (rm.lowcomplex[[1]] > 0 && rm.lowcomplex[[2]] > 0) {
fqF <- fqF[!is.lowc]
fqR <- fqR[!is.lowc]
}
outseqs <- outseqs + length(fqF)
if (first) {
writeFastq(fqF, fout[[1]], "w", compress = compress)
writeFastq(fqR, fout[[2]], "w", compress = compress)
first = FALSE
}
else {
writeFastq(fqF, fout[[1]], "a", compress = compress)
writeFastq(fqR, fout[[2]], "a", compress = compress)
}
}
if (outseqs == 0) {
}
if (verbose) {
outperc <- round(outseqs * 100/inseqs, 1)
outperc <- paste(" (", outperc, "%)", sep = "")
message("Read in ", inseqs, " paired-sequences, output ",
outseqs, outperc, " filtered paired-sequences.",
sep = "")
}
if (outseqs == 0) {
message(paste("The filter removed all reads:", fout[[1]],
"and", fout[[2]], "not written."))
file.remove(fout[[1]])
file.remove(fout[[2]])
}
return(invisible(c(reads.in = inseqs, reads.out = outseqs)))
})(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = c(260L,
150L), trimLeft = c(15L, 15L), trimRight = 0, maxLen = Inf, minLen = 20,
maxN = 0, minQ = 0, maxEE = c(2, 2), rm.phix = TRUE, rm.lowcomplex = 0,
orient.fwd = NULL, matchIDs = FALSE, id.sep = "\s", id.field = NULL,
n = 1e+05, OMP = TRUE, qualityType = "Auto", compress = TRUE,
verbose = FALSE)
8: .mapply(FUN, dots, MoreArgs)
7: FUN(X[[i]], ...)
6: lapply(X = X, FUN = FUN, ...)
5: mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule,
mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores,
mc.cleanup = mc.cleanup, affinity.list = affinity.list)
4: mcmapply(fastqPairedFilter, mapply(c, fwd, rev, SIMPLIFY = FALSE),
mapply(c, filt, filt.rev, SIMPLIFY = FALSE), 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, matchIDs = matchIDs, id.sep = id.sep,
id.field = id.field, n = n, OMP = OMP, qualityType = qualityType,
compress = compress, verbose = verbose), mc.cores = ncores,
mc.silent = TRUE)
3: filterAndTrim(unfilts, filts, unfiltsR, filtsR, truncLen = c(truncLen,
truncLenR), trimLeft = c(trimLeft, trimLeftR), maxEE = c(maxEE,
maxEER), truncQ = truncQ, rm.phix = TRUE, multithread = multithread)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
1: suppressWarnings(filterAndTrim(unfilts, filts, unfiltsR, filtsR,
truncLen = c(truncLen, truncLenR), trimLeft = c(trimLeft,
trimLeftR), maxEE = c(maxEE, maxEER), truncQ = truncQ,
rm.phix = TRUE, multithread = multithread))
Traceback (most recent call last):
File "/home/temp/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 326, in denoise_paired
run_commands([cmd])
File "/home/temp/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/temp/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/tmpw3tiq6ya/forward', '--input_directory_reverse', '/tmp/tmpw3tiq6ya/reverse', '--output_path', '/tmp/tmpw3tiq6ya/output.tsv.biom', '--output_track', '/tmp/tmpw3tiq6ya/track.tsv', '--filtered_directory', '/tmp/tmpw3tiq6ya/filt_f', '--filtered_directory_reverse', '/tmp/tmpw3tiq6ya/filt_r', '--truncation_length', '260', '--truncation_length_reverse', '150', '--trim_left', '15', '--trim_left_reverse', '15', '--max_expected_errors', '2.0', '--max_expected_errors_reverse', '2.0', '--truncation_quality_score', '2', '--min_overlap', '12', '--pooling_method', 'independent', '--chimera_method', 'consensus', '--min_parental_fold', '1.0', '--allow_one_off', 'False', '--num_threads', '1', '--learn_min_reads', '1000000']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/temp/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2cli/commands.py", line 478, in call
results = self._execute_action(
File "/home/temp/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_paired
File "/home/temp/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/temp/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/temp/miniconda3/envs/qiime2-2023.7/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 339, in denoise_paired
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.
I am unable to figure the error from the above message. Kindly help