Update for you. I navigated to a different compute environment where I have 60 GB RAM.
This time, the command ran much further but still did not run to completion. The error code is much longer this time.
Can you tell from this error whether it seems like it is still an issue related to not enough resources?
Is the 'memory not mapped' related to the issue you mentioned with the /tmp/ being on a RAM disk?
(qiime2-amplicon-2024.10) [ec2-user@ip-10-1-4-135 ~]$ cat /tmp/qiime2-q2cli-err-ln4t26af.log
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/ec2-user/processes/32828-1738784434.57@ec2-user/tmp/q2-OutPath-cosdwwt0 --output_path /tmp/tmpz33j3e6z/output.tsv.biom --output_track /tmp/tmpz33j3e6z/track.tsv --filtered_directory /tmp/tmpz33j3e6z --truncation_length 268 --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 24 --learn_min_reads 1000000 --homopolymer_gap_penalty NULL --band_size 16
R version 4.3.3 (2024-02-29)
Loading required package: Rcpp
DADA2: 1.30.0 / Rcpp: 1.0.13.1 / RcppParallel: 5.1.9
2) Filtering
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
*** caught segfault ***
address (nil), cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address 0x10, cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address (nil), cause 'memory not mapped'
address 0x10, cause 'memory not mapped'
Traceback:
1: C_matchRef(seqs, sq.phix, wordSize, nonOverlapping)
2: isPhiX(as(sread(fq), "character"), ...)
3: (function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0,
Traceback:
maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, 1: verbose = FALSE, ...) C_matchRef(seqs, rc.phix, wordSize, nonOverlapping){
if (!OMP) { 2: ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L)isPhiX(as(sread(fq), "character"), ...) on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads))
} 3: if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, (function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, trimRight, maxN, minQ, maxEE), length) > 1)) { minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, } n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, start <- max(1, trimLeft + 1, na.rm = TRUE) verbose = FALSE, ...) end <- truncLen{ if (end < start) { if (!OMP) { end = NA ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) } on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads))
Traceback:
end <- end - start + 1 } if (fn == fout) { if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, 1: stop("The output and input files must be different.") trimRight, maxN, minQ, maxEE), length) > 1)) {C_matchRef(seqs, sq.phix, wordSize, nonOverlapping) } stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.")
f <- FastqStreamer(fn, n = n) } 2: on.exit(close(f)) start <- max(1, trimLeft + 1, na.rm = TRUE)isPhiX(as(sread(fq), "character"), ...) if (file.exists(fout)) { end <- truncLen
Traceback:
Traceback:
if (file.remove(fout)) { if (end < start) { 3: 1: if (verbose) end = NA(function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, 1: message("Overwriting file:", fout)C_matchRef(seqs, sq.phix, wordSize, nonOverlapping) } minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, C_matchRef(seqs, sq.phix, wordSize, nonOverlapping) }
Traceback:
Traceback:
Traceback:
Traceback:
Traceback:
Traceback:
end <- end - start + 1 maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL,
else {
Traceback:
1: 1: 1: 1: 1: 2: C_matchRef(seqs, sq.phix, wordSize, nonOverlapping) 1: if (fn == fout) {C_matchRef(seqs, sq.phix, wordSize, nonOverlapping) n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, 2: stop("Failed to overwrite file:", fout) 1: C_matchRef(seqs, rc.phix, wordSize, nonOverlapping)C_matchRef(seqs, rc.phix, wordSize, nonOverlapping)C_matchRef(seqs, sq.phix, wordSize, nonOverlapping)C_matchRef(seqs, rc.phix, wordSize, nonOverlapping)isPhiX(as(sread(fq), "character"), ...)
stop("The output and input files must be different.")
verbose = FALSE, ...) isPhiX(as(sread(fq), "character"), ...) }C_matchRef(seqs, sq.phix, wordSize, nonOverlapping)
2: } 2: {
}
2: 2: 2: 2: 3: isPhiX(as(sread(fq), "character"), ...) f <- FastqStreamer(fn, n = n)isPhiX(as(sread(fq), "character"), ...) if (!OMP) { 3: first = TRUE 2: isPhiX(as(sread(fq), "character"), ...)isPhiX(as(sread(fq), "character"), ...)isPhiX(as(sread(fq), "character"), ...)isPhiX(as(sread(fq), "character"), ...)(function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf,
on.exit(close(f))
ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L)(function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, inseqs = 0isPhiX(as(sread(fq), "character"), ...)
minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, 3: if (file.exists(fout)) { 3: on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, outseqs = 0
3: 3: 3: 3: maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, (function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, if (file.remove(fout)) {(function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, } maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { 3: (function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, (function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, (function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, (function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, if (verbose) minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, inseqs <- inseqs + length(fq)(function (fn, fout, truncQ = 2, truncLen = 0, maxLen = Inf, minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, verbose = FALSE, ...) maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, message("Overwriting file:", fout) maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, trimRight, maxN, minQ, maxEE), length) > 1)) { verbose = FALSE, ...) if (!is.null(orient.fwd)) { minLen = 20, trimLeft = 0, trimRight = 0, maxN = 0, minQ = 0, maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, { n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, } n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data."){ if (!C_isACGT(orient.fwd)) maxEE = Inf, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, if (!OMP) { verbose = FALSE, ...) else { verbose = FALSE, ...) } if (!OMP) { stop("Non-ACGT characters detected in orient.fwd") n = 1e+06, OMP = TRUE, qualityType = "Auto", compress = TRUE, verbose = FALSE, ...) verbose = FALSE, ...) verbose = FALSE, ...) verbose = FALSE, ...) ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L){ stop("Failed to overwrite file:", fout){ start <- max(1, trimLeft + 1, na.rm = TRUE) ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) barlen <- nchar(orient.fwd) verbose = FALSE, ...) {{{{ on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) if (!OMP) { } if (!OMP) { end <- truncLen on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) fq.rc <- reverseComplement(fq){ if (!OMP) { if (!OMP) { if (!OMP) { ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) if (!OMP) { } ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) } ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) if (end < start) { } keepF <- narrow(sread(fq), 1, barlen) == orient.fwd if (!OMP) { ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) first = TRUE end = NA inseqs = 0 on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & ompthreads <- .Call(ShortRead:::.set_omp_threads, 1L) on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) } on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) trimRight, maxN, minQ, maxEE), length) > 1)) { } } outseqs = 0 } trimRight, maxN, minQ, maxEE), length) > 1)) { !keepF on.exit(.Call(ShortRead:::.set_omp_threads, ompthreads)) } } if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, } stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, end <- end - start + 1 while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, } if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, trimRight, maxN, minQ, maxEE), length) > 1)) { if (any(sapply(list(truncQ, truncLen, maxLen, minLen, trimLeft, } trimRight, maxN, minQ, maxEE), length) > 1)) { if (fn == fout) { inseqs <- inseqs + length(fq) trimRight, maxN, minQ, maxEE), length) > 1)) { } quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), trimRight, maxN, minQ, maxEE), length) > 1)) { trimRight, maxN, minQ, maxEE), length) > 1)) { trimRight, maxN, minQ, maxEE), length) > 1)) { stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") trimRight, maxN, minQ, maxEE), length) > 1)) { start <- max(1, trimLeft + 1, na.rm = TRUE) stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") stop("The output and input files must be different.") if (!is.null(orient.fwd)) { stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") start <- max(1, trimLeft + 1, na.rm = TRUE) id = c(id(fq[keepF]), id(fq.rc[keepR]))) stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") } stop("Filtering and trimming arguments should be of length 1 when processing single-end (rather than paired-end) data.") end <- truncLen } } if (!C_isACGT(orient.fwd)) } end <- truncLen } } } } start <- max(1, trimLeft + 1, na.rm = TRUE) } if (end < start) { start <- max(1, trimLeft + 1, na.rm = TRUE) f <- FastqStreamer(fn, n = n) stop("Non-ACGT characters detected in orient.fwd") start <- max(1, trimLeft + 1, na.rm = TRUE) if (end < start) { if (is.finite(maxLen)) { start <- max(1, trimLeft + 1, na.rm = TRUE) start <- max(1, trimLeft + 1, na.rm = TRUE) start <- max(1, trimLeft + 1, na.rm = TRUE) end <- truncLen start <- max(1, trimLeft + 1, na.rm = TRUE) end = NA end <- truncLen on.exit(close(f)) barlen <- nchar(orient.fwd) end <- truncLen end = NA fq <- fq[width(fq) <= maxLen] end <- truncLen end <- truncLen end <- truncLen if (end < start) { end <- truncLen } if (end < start) { if (file.exists(fout)) { fq.rc <- reverseComplement(fq) if (end < start) { } } if (end < start) { if (end < start) { if (end < start) { end = NA if (end < start) { end <- end - start + 1 end = NA if (file.remove(fout)) { keepF <- narrow(sread(fq), 1, barlen) == orient.fwd end = NA end <- end - start + 1 fq <- fq[width(fq) >= start] end = NA end = NA end = NA } end = NA if (fn == fout) { } if (verbose) keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & } if (fn == fout) { fq <- narrow(fq, start = start, end = NA) } } } end <- end - start + 1 } stop("The output and input files must be different.") end <- end - start + 1 message("Overwriting file:", fout) !keepF end <- end - start + 1 stop("The output and input files must be different.") if (trimRight > 0) { end <- end - start + 1 end <- end - start + 1 end <- end - start + 1 if (fn == fout) { end <- end - start + 1 } if (fn == fout) { } fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), if (fn == fout) { } fq <- fq[width(fq) > trimRight] if (fn == fout) { if (fn == fout) { if (fn == fout) { stop("The output and input files must be different.") if (fn == fout) { f <- FastqStreamer(fn, n = n) stop("The output and input files must be different.") else { quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), stop("The output and input files must be different.") f <- FastqStreamer(fn, n = n) fq <- narrow(fq, start = NA, end = width(fq) - trimRight) stop("The output and input files must be different.") stop("The output and input files must be different.") stop("The output and input files must be different.") } stop("The output and input files must be different.") on.exit(close(f)) } stop("Failed to overwrite file:", fout) id = c(id(fq[keepF]), id(fq.rc[keepR]))) } on.exit(close(f)) } } } } f <- FastqStreamer(fn, n = n) } if (file.exists(fout)) { f <- FastqStreamer(fn, n = n) } } f <- FastqStreamer(fn, n = n) if (file.exists(fout)) { enc <- encoding(quality(fq)) f <- FastqStreamer(fn, n = n) f <- FastqStreamer(fn, n = n) f <- FastqStreamer(fn, n = n) on.exit(close(f)) f <- FastqStreamer(fn, n = n) if (file.remove(fout)) { on.exit(close(f)) } if (is.finite(maxLen)) { on.exit(close(f)) if (file.remove(fout)) { if (is.numeric(truncQ)) { on.exit(close(f)) on.exit(close(f)) on.exit(close(f)) if (file.exists(fout)) { on.exit(close(f)) if (verbose) if (file.exists(fout)) { first = TRUE fq <- fq[width(fq) <= maxLen] if (file.exists(fout)) { if (verbose) ind <- which(enc == truncQ) if (file.exists(fout)) { if (file.exists(fout)) { if (file.exists(fout)) { if (file.remove(fout)) { if (file.exists(fout)) { message("Overwriting file:", fout) if (file.remove(fout)) { inseqs = 0 } if (file.remove(fout)) { message("Overwriting file:", fout) if (length(ind) != 1) if (file.remove(fout)) { if (file.remove(fout)) { if (file.remove(fout)) { if (verbose) if (file.remove(fout)) { } if (verbose) outseqs = 0 fq <- fq[width(fq) >= start] if (verbose) } stop("Encoding for this truncQ value not found.") if (verbose) if (verbose) if (verbose) message("Overwriting file:", fout) if (verbose) else { message("Overwriting file:", fout) while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { fq <- narrow(fq, start = start, end = NA) message("Overwriting file:", fout) else { truncQ <- names(enc)[[ind]] message("Overwriting file:", fout) message("Overwriting file:", fout) message("Overwriting file:", fout) } message("Overwriting file:", fout) stop("Failed to overwrite file:", fout) } inseqs <- inseqs + length(fq) if (trimRight > 0) { } stop("Failed to overwrite file:", fout) } } } } else { } } else { if (!is.null(orient.fwd)) { fq <- fq[width(fq) > trimRight] else { } if (length(fq) > 0) else { else { else { stop("Failed to overwrite file:", fout) else { } stop("Failed to overwrite file:", fout) if (!C_isACGT(orient.fwd)) fq <- narrow(fq, start = NA, end = width(fq) - trimRight) stop("Failed to overwrite file:", fout) } fq <- trimTails(fq, 1, truncQ) stop("Failed to overwrite file:", fout) stop("Failed to overwrite file:", fout) stop("Failed to overwrite file:", fout) } stop("Failed to overwrite file:", fout) first = TRUE } stop("Non-ACGT characters detected in orient.fwd") } } first = TRUE truncQ <- enc[truncQ] } } } } } inseqs = 0 } barlen <- nchar(orient.fwd) enc <- encoding(quality(fq)) } inseqs = 0 if (!is.na(end)) { } } } first = TRUE } outseqs = 0 first = TRUE fq.rc <- reverseComplement(fq) if (is.numeric(truncQ)) { first = TRUE outseqs = 0 fq <- fq[width(fq) >= end] first = TRUE first = TRUE first = TRUE inseqs = 0 first = TRUE while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { inseqs = 0 keepF <- narrow(sread(fq), 1, barlen) == orient.fwd ind <- which(enc == truncQ) inseqs = 0 while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { } inseqs = 0 inseqs = 0 inseqs = 0 outseqs = 0 inseqs = 0 inseqs <- inseqs + length(fq) outseqs = 0 keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & if (length(ind) != 1) outseqs = 0 inseqs <- inseqs + length(fq) fq <- narrow(fq, start = 1, end = end) outseqs = 0 outseqs = 0 outseqs = 0 while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { outseqs = 0 if (!is.null(orient.fwd)) { while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { !keepF stop("Encoding for this truncQ value not found.") while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { if (!is.null(orient.fwd)) { fq <- fq[width(fq) >= minLen] while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { inseqs <- inseqs + length(fq) while (length(suppressWarnings(fq <- yield(f, qualityType = qualityType)))) { if (!C_isACGT(orient.fwd)) inseqs <- inseqs + length(fq) fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), truncQ <- names(enc)[[ind]] inseqs <- inseqs + length(fq) if (!C_isACGT(orient.fwd)) fq <- fq[.nFilter(fq, maxN)] inseqs <- inseqs + length(fq) inseqs <- inseqs + length(fq) inseqs <- inseqs + length(fq) if (!is.null(orient.fwd)) { inseqs <- inseqs + length(fq) stop("Non-ACGT characters detected in orient.fwd") if (!is.null(orient.fwd)) { quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), } if (!is.null(orient.fwd)) { stop("Non-ACGT characters detected in orient.fwd") keep <- rep(TRUE, length(fq)) if (!is.null(orient.fwd)) { if (!is.null(orient.fwd)) { if (!is.null(orient.fwd)) { if (!C_isACGT(orient.fwd)) if (!is.null(orient.fwd)) { barlen <- nchar(orient.fwd) if (!C_isACGT(orient.fwd)) id = c(id(fq[keepF]), id(fq.rc[keepR]))) if (length(fq) > 0) if (!C_isACGT(orient.fwd)) barlen <- nchar(orient.fwd) qq <- as(quality(fq), "matrix") if (!C_isACGT(orient.fwd)) if (!C_isACGT(orient.fwd)) if (!C_isACGT(orient.fwd)) stop("Non-ACGT characters detected in orient.fwd") if (!C_isACGT(orient.fwd)) fq.rc <- reverseComplement(fq) stop("Non-ACGT characters detected in orient.fwd") } fq <- trimTails(fq, 1, truncQ) stop("Non-ACGT characters detected in orient.fwd") fq.rc <- reverseComplement(fq) if (minQ > truncQ) stop("Non-ACGT characters detected in orient.fwd") stop("Non-ACGT characters detected in orient.fwd") stop("Non-ACGT characters detected in orient.fwd") barlen <- nchar(orient.fwd) stop("Non-ACGT characters detected in orient.fwd") keepF <- narrow(sread(fq), 1, barlen) == orient.fwd barlen <- nchar(orient.fwd) if (is.finite(maxLen)) { truncQ <- enc[truncQ] barlen <- nchar(orient.fwd) keepF <- narrow(sread(fq), 1, barlen) == orient.fwd keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > barlen <- nchar(orient.fwd) barlen <- nchar(orient.fwd) barlen <- nchar(orient.fwd) fq.rc <- reverseComplement(fq) barlen <- nchar(orient.fwd) keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & fq.rc <- reverseComplement(fq) fq <- fq[width(fq) <= maxLen] if (!is.na(end)) { fq.rc <- reverseComplement(fq) keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & minQ) fq.rc <- reverseComplement(fq) fq.rc <- reverseComplement(fq) fq.rc <- reverseComplement(fq) keepF <- narrow(sread(fq), 1, barlen) == orient.fwd fq.rc <- reverseComplement(fq) !keepF keepF <- narrow(sread(fq), 1, barlen) == orient.fwd } fq <- fq[width(fq) >= end] keepF <- narrow(sread(fq), 1, barlen) == orient.fwd !keepF if (maxEE < Inf) { keepF <- narrow(sread(fq), 1, barlen) == orient.fwd keepF <- narrow(sread(fq), 1, barlen) == orient.fwd keepF <- narrow(sread(fq), 1, barlen) == orient.fwd keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & keepF <- narrow(sread(fq), 1, barlen) == orient.fwd fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & fq <- fq[width(fq) >= start] } keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), keep <- keep & C_matrixEE(qq) <= maxEE keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & !keepF keepR <- narrow(sread(fq.rc), 1, barlen) == orient.fwd & quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), !keepF fq <- narrow(fq, start = start, end = NA) fq <- narrow(fq, start = 1, end = end) !keepF quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), } !keepF !keepF !keepF fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), !keepF id = c(id(fq[keepF]), id(fq.rc[keepR]))) fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), if (trimRight > 0) { fq <- fq[width(fq) >= minLen] fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), id = c(id(fq[keepF]), id(fq.rc[keepR]))) fq <- fq[keep] fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), fq <- ShortReadQ(sread = c(sread(fq[keepF]), sread(fq.rc[keepR])), } quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), fq <- fq[width(fq) > trimRight] fq <- fq[.nFilter(fq, maxN)] quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), } if (rm.phix) { quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), id = c(id(fq[keepF]), id(fq.rc[keepR]))) quality = c(quality(quality(fq[keepF])), quality(quality(fq.rc[keepR]))), if (is.finite(maxLen)) { id = c(id(fq[keepF]), id(fq.rc[keepR]))) fq <- narrow(fq, start = NA, end = width(fq) - trimRight) keep <- rep(TRUE, length(fq)) id = c(id(fq[keepF]), id(fq.rc[keepR]))) if (is.finite(maxLen)) { is.phi <- isPhiX(as(sread(fq), "character"), ...) id = c(id(fq[keepF]), id(fq.rc[keepR]))) id = c(id(fq[keepF]), id(fq.rc[keepR]))) id = c(id(fq[keepF]), id(fq.rc[keepR]))) } id = c(id(fq[keepF]), id(fq.rc[keepR]))) fq <- fq[width(fq) <= maxLen] } } qq <- as(quality(fq), "matrix") } fq <- fq[width(fq) <= maxLen] fq <- fq[!is.phi] } } } if (is.finite(maxLen)) { } } if (is.finite(maxLen)) { enc <- encoding(quality(fq)) if (minQ > truncQ) if (is.finite(maxLen)) { } } if (is.finite(maxLen)) { if (is.finite(maxLen)) { if (is.finite(maxLen)) { fq <- fq[width(fq) <= maxLen] if (is.finite(maxLen)) { fq <- fq[width(fq) >= start] fq <- fq[width(fq) <= maxLen] if (is.numeric(truncQ)) { keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > fq <- fq[width(fq) <= maxLen] fq <- fq[width(fq) >= start] if (rm.lowcomplex > 0) { fq <- fq[width(fq) <= maxLen] fq <- fq[width(fq) <= maxLen] fq <- fq[width(fq) <= maxLen] } fq <- fq[width(fq) <= maxLen] fq <- narrow(fq, start = start, end = NA) } ind <- which(enc == truncQ) minQ) } fq <- narrow(fq, start = start, end = NA) sqcmplx <- seqComplexity(sread(fq), ...) } } } fq <- fq[width(fq) >= start] } if (trimRight > 0) { fq <- fq[width(fq) >= start] if (length(ind) != 1) if (maxEE < Inf) { fq <- fq[width(fq) >= start] if (trimRight > 0) { fq <- fq[sqcmplx >= rm.lowcomplex] fq <- fq[width(fq) >= start] fq <- fq[width(fq) >= start] fq <- fq[width(fq) >= start] fq <- narrow(fq, start = start, end = NA) fq <- fq[width(fq) >= start] fq <- fq[width(fq) > trimRight] fq <- narrow(fq, start = start, end = NA) stop("Encoding for this truncQ value not found.") keep <- keep & C_matrixEE(qq) <= maxEE fq <- narrow(fq, start = start, end = NA) fq <- fq[width(fq) > trimRight] } fq <- narrow(fq, start = start, end = NA) fq <- narrow(fq, start = start, end = NA) fq <- narrow(fq, start = start, end = NA) if (trimRight > 0) { fq <- narrow(fq, start = start, end = NA) fq <- narrow(fq, start = NA, end = width(fq) - trimRight) if (trimRight > 0) { truncQ <- names(enc)[[ind]] } if (trimRight > 0) { fq <- narrow(fq, start = NA, end = width(fq) - trimRight) outseqs <- outseqs + length(fq) if (trimRight > 0) { if (trimRight > 0) { if (trimRight > 0) { fq <- fq[width(fq) > trimRight] if (trimRight > 0) { } fq <- fq[width(fq) > trimRight] } fq <- fq[keep] fq <- fq[width(fq) > trimRight] } if (first) { fq <- fq[width(fq) > trimRight] fq <- fq[width(fq) > trimRight] fq <- fq[width(fq) > trimRight] fq <- narrow(fq, start = NA, end = width(fq) - trimRight) fq <- fq[width(fq) > trimRight] enc <- encoding(quality(fq)) fq <- narrow(fq, start = NA, end = width(fq) - trimRight) if (length(fq) > 0) if (rm.phix) { fq <- narrow(fq, start = NA, end = width(fq) - trimRight) enc <- encoding(quality(fq)) writeFastq(fq, fout, "w", compress = compress) fq <- narrow(fq, start = NA, end = width(fq) - trimRight) fq <- narrow(fq, start = NA, end = width(fq) - trimRight) fq <- narrow(fq, start = NA, end = width(fq) - trimRight) } fq <- narrow(fq, start = NA, end = width(fq) - trimRight) if (is.numeric(truncQ)) { } fq <- trimTails(fq, 1, truncQ) is.phi <- isPhiX(as(sread(fq), "character"), ...) } if (is.numeric(truncQ)) { first = FALSE } } } enc <- encoding(quality(fq)) } ind <- which(enc == truncQ) enc <- encoding(quality(fq)) truncQ <- enc[truncQ] fq <- fq[!is.phi] enc <- encoding(quality(fq)) ind <- which(enc == truncQ) } enc <- encoding(quality(fq)) enc <- encoding(quality(fq)) enc <- encoding(quality(fq)) if (is.numeric(truncQ)) { enc <- encoding(quality(fq)) if (length(ind) != 1) if (is.numeric(truncQ)) { if (!is.na(end)) { } if (is.numeric(truncQ)) { if (length(ind) != 1) else { if (is.numeric(truncQ)) { if (is.numeric(truncQ)) { if (is.numeric(truncQ)) { ind <- which(enc == truncQ) if (is.numeric(truncQ)) { stop("Encoding for this truncQ value not found.") ind <- which(enc == truncQ) fq <- fq[width(fq) >= end] if (rm.lowcomplex > 0) { ind <- which(enc == truncQ) stop("Encoding for this truncQ value not found.") writeFastq(fq, fout, "a", compress = compress) ind <- which(enc == truncQ) ind <- which(enc == truncQ) ind <- which(enc == truncQ) if (length(ind) != 1) ind <- which(enc == truncQ) truncQ <- names(enc)[[ind]] if (length(ind) != 1) } sqcmplx <- seqComplexity(sread(fq), ...) if (length(ind) != 1) truncQ <- names(enc)[[ind]] } if (length(ind) != 1) if (length(ind) != 1) if (length(ind) != 1) stop("Encoding for this truncQ value not found.") if (length(ind) != 1) } stop("Encoding for this truncQ value not found.") fq <- narrow(fq, start = 1, end = end) fq <- fq[sqcmplx >= rm.lowcomplex] stop("Encoding for this truncQ value not found.") } } stop("Encoding for this truncQ value not found.") stop("Encoding for this truncQ value not found.") stop("Encoding for this truncQ value not found.") truncQ <- names(enc)[[ind]] stop("Encoding for this truncQ value not found.") if (length(fq) > 0) truncQ <- names(enc)[[ind]] fq <- fq[width(fq) >= minLen] } truncQ <- names(enc)[[ind]] if (length(fq) > 0) if (verbose) { truncQ <- names(enc)[[ind]] truncQ <- names(enc)[[ind]] truncQ <- names(enc)[[ind]] } truncQ <- names(enc)[[ind]] fq <- trimTails(fq, 1, truncQ) } fq <- fq[.nFilter(fq, maxN)] outseqs <- outseqs + length(fq) } fq <- trimTails(fq, 1, truncQ) outperc <- round(outseqs * 100/inseqs, 1) } } } if (length(fq) > 0) } truncQ <- enc[truncQ] if (length(fq) > 0) keep <- rep(TRUE, length(fq)) if (first) { if (length(fq) > 0) truncQ <- enc[truncQ] outperc <- paste(" (", outperc, "%)", sep = "") if (length(fq) > 0) if (length(fq) > 0) if (length(fq) > 0) fq <- trimTails(fq, 1, truncQ) if (length(fq) > 0) if (!is.na(end)) { fq <- trimTails(fq, 1, truncQ) qq <- as(quality(fq), "matrix") writeFastq(fq, fout, "w", compress = compress) fq <- trimTails(fq, 1, truncQ) if (!is.na(end)) { message("Read in ", inseqs, ", output ", outseqs, outperc, fq <- trimTails(fq, 1, truncQ) fq <- trimTails(fq, 1, truncQ) fq <- trimTails(fq, 1, truncQ) truncQ <- enc[truncQ] fq <- trimTails(fq, 1, truncQ) fq <- fq[width(fq) >= end] truncQ <- enc[truncQ] if (minQ > truncQ) first = FALSE truncQ <- enc[truncQ] fq <- fq[width(fq) >= end] " filtered sequences.", sep = "") truncQ <- enc[truncQ] truncQ <- enc[truncQ] truncQ <- enc[truncQ] if (!is.na(end)) { truncQ <- enc[truncQ] } if (!is.na(end)) { keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > } if (!is.na(end)) { } } if (!is.na(end)) { if (!is.na(end)) { if (!is.na(end)) { fq <- fq[width(fq) >= end] if (!is.na(end)) { fq <- narrow(fq, start = 1, end = end) fq <- fq[width(fq) >= end] minQ) else { fq <- fq[width(fq) >= end] fq <- narrow(fq, start = 1, end = end) if (outseqs == 0) { fq <- fq[width(fq) >= end] fq <- fq[width(fq) >= end] fq <- fq[width(fq) >= end] } fq <- fq[width(fq) >= end] fq <- fq[width(fq) >= minLen] } if (maxEE < Inf) { writeFastq(fq, fout, "a", compress = compress) } fq <- fq[width(fq) >= minLen] message(paste("The filter removed all reads:", fout, } } } fq <- narrow(fq, start = 1, end = end) } fq <- fq[.nFilter(fq, maxN)] fq <- narrow(fq, start = 1, end = end) keep <- keep & C_matrixEE(qq) <= maxEE } fq <- narrow(fq, start = 1, end = end) fq <- fq[.nFilter(fq, maxN)] "not written.")) fq <- narrow(fq, start = 1, end = end) fq <- narrow(fq, start = 1, end = end) fq <- narrow(fq, start = 1, end = end) fq <- fq[width(fq) >= minLen] fq <- narrow(fq, start = 1, end = end) keep <- rep(TRUE, length(fq)) fq <- fq[width(fq) >= minLen] } } fq <- fq[width(fq) >= minLen] keep <- rep(TRUE, length(fq)) file.remove(fout) fq <- fq[width(fq) >= minLen] fq <- fq[width(fq) >= minLen] fq <- fq[width(fq) >= minLen] fq <- fq[.nFilter(fq, maxN)] fq <- fq[width(fq) >= minLen] qq <- as(quality(fq), "matrix") fq <- fq[.nFilter(fq, maxN)] fq <- fq[keep] if (verbose) { fq <- fq[.nFilter(fq, maxN)] qq <- as(quality(fq), "matrix") } fq <- fq[.nFilter(fq, maxN)] fq <- fq[.nFilter(fq, maxN)] fq <- fq[.nFilter(fq, maxN)] keep <- rep(TRUE, length(fq)) fq <- fq[.nFilter(fq, maxN)] if (minQ > truncQ) keep <- rep(TRUE, length(fq)) if (rm.phix) { outperc <- round(outseqs * 100/inseqs, 1) keep <- rep(TRUE, length(fq)) if (minQ > truncQ) return(invisible(c(reads.in = inseqs, reads.out = outseqs))) keep <- rep(TRUE, length(fq)) keep <- rep(TRUE, length(fq)) keep <- rep(TRUE, length(fq)) qq <- as(quality(fq), "matrix") keep <- rep(TRUE, length(fq)) keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > qq <- as(quality(fq), "matrix") is.phi <- isPhiX(as(sread(fq), "character"), ...) outperc <- paste(" (", outperc, "%)", sep = "") qq <- as(quality(fq), "matrix") keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > })(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, qq <- as(quality(fq), "matrix") qq <- as(quality(fq), "matrix") qq <- as(quality(fq), "matrix") if (minQ > truncQ) qq <- as(quality(fq), "matrix") minQ) if (minQ > truncQ) fq <- fq[!is.phi] message("Read in ", inseqs, ", output ", outseqs, outperc, if (minQ > truncQ) minQ) trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, if (minQ > truncQ) if (minQ > truncQ) if (minQ > truncQ) keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > if (minQ > truncQ) if (maxEE < Inf) { keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > } " filtered sequences.", sep = "") keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > if (maxEE < Inf) { maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > minQ) keep <- keep & (apply(qq, 1, min, na.rm = TRUE) > keep <- keep & C_matrixEE(qq) <= maxEE minQ) if (rm.lowcomplex > 0) { } minQ) keep <- keep & C_matrixEE(qq) <= maxEE orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", minQ) minQ) minQ) if (maxEE < Inf) { minQ) } if (maxEE < Inf) { sqcmplx <- seqComplexity(sread(fq), ...) if (outseqs == 0) { if (maxEE < Inf) { } compress = TRUE, verbose = FALSE) if (maxEE < Inf) { if (maxEE < Inf) { if (maxEE < Inf) { keep <- keep & C_matrixEE(qq) <= maxEE if (maxEE < Inf) { fq <- fq[keep] keep <- keep & C_matrixEE(qq) <= maxEE fq <- fq[sqcmplx >= rm.lowcomplex] message(paste("The filter removed all reads:", fout, keep <- keep & C_matrixEE(qq) <= maxEE fq <- fq[keep]
keep <- keep & C_matrixEE(qq) <= maxEE 4: keep <- keep & C_matrixEE(qq) <= maxEE keep <- keep & C_matrixEE(qq) <= maxEE } keep <- keep & C_matrixEE(qq) <= maxEE if (rm.phix) { } } "not written.")) } if (rm.phix) { }.mapply(FUN, dots, MoreArgs) } } fq <- fq[keep] } is.phi <- isPhiX(as(sread(fq), "character"), ...) fq <- fq[keep] outseqs <- outseqs + length(fq) file.remove(fout) fq <- fq[keep] is.phi <- isPhiX(as(sread(fq), "character"), ...) fq <- fq[keep]
fq <- fq[keep] fq <- fq[keep] if (rm.phix) { fq <- fq[keep] fq <- fq[!is.phi] if (rm.phix) { if (first) { } if (rm.phix) { fq <- fq[!is.phi] if (rm.phix) { 5: if (rm.phix) { if (rm.phix) { is.phi <- isPhiX(as(sread(fq), "character"), ...) if (rm.phix) { } is.phi <- isPhiX(as(sread(fq), "character"), ...) writeFastq(fq, fout, "w", compress = compress) return(invisible(c(reads.in = inseqs, reads.out = outseqs))) is.phi <- isPhiX(as(sread(fq), "character"), ...) } is.phi <- isPhiX(as(sread(fq), "character"), ...)FUN(X[[i]], ...) is.phi <- isPhiX(as(sread(fq), "character"), ...) is.phi <- isPhiX(as(sread(fq), "character"), ...) fq <- fq[!is.phi] is.phi <- isPhiX(as(sread(fq), "character"), ...) if (rm.lowcomplex > 0) { fq <- fq[!is.phi] first = FALSE})(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, fq <- fq[!is.phi] if (rm.lowcomplex > 0) { fq <- fq[!is.phi]
fq <- fq[!is.phi] fq <- fq[!is.phi] } fq <- fq[!is.phi] sqcmplx <- seqComplexity(sread(fq), ...) } } trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, } sqcmplx <- seqComplexity(sread(fq), ...) } 6: } } if (rm.lowcomplex > 0) { } fq <- fq[sqcmplx >= rm.lowcomplex] if (rm.lowcomplex > 0) { else { maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, if (rm.lowcomplex > 0) { fq <- fq[sqcmplx >= rm.lowcomplex] if (rm.lowcomplex > 0) {lapply(X = S, FUN = FUN, ...) if (rm.lowcomplex > 0) { if (rm.lowcomplex > 0) { sqcmplx <- seqComplexity(sread(fq), ...) if (rm.lowcomplex > 0) { } sqcmplx <- seqComplexity(sread(fq), ...) writeFastq(fq, fout, "a", compress = compress) orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", sqcmplx <- seqComplexity(sread(fq), ...) } sqcmplx <- seqComplexity(sread(fq), ...)
sqcmplx <- seqComplexity(sread(fq), ...) sqcmplx <- seqComplexity(sread(fq), ...) fq <- fq[sqcmplx >= rm.lowcomplex] sqcmplx <- seqComplexity(sread(fq), ...) outseqs <- outseqs + length(fq) fq <- fq[sqcmplx >= rm.lowcomplex] } compress = TRUE, verbose = FALSE) fq <- fq[sqcmplx >= rm.lowcomplex] outseqs <- outseqs + length(fq) fq <- fq[sqcmplx >= rm.lowcomplex] 7: fq <- fq[sqcmplx >= rm.lowcomplex] fq <- fq[sqcmplx >= rm.lowcomplex] } fq <- fq[sqcmplx >= rm.lowcomplex] if (first) { } }
} if (first) { }doTryCatch(return(expr), name, parentenv, handler) } } outseqs <- outseqs + length(fq) } writeFastq(fq, fout, "w", compress = compress) outseqs <- outseqs + length(fq) if (verbose) { 4: outseqs <- outseqs + length(fq) writeFastq(fq, fout, "w", compress = compress) outseqs <- outseqs + length(fq)
outseqs <- outseqs + length(fq) outseqs <- outseqs + length(fq) if (first) { outseqs <- outseqs + length(fq) first = FALSE if (first) { outperc <- round(outseqs * 100/inseqs, 1).mapply(FUN, dots, MoreArgs) if (first) { first = FALSE if (first) { 8: if (first) { if (first) { writeFastq(fq, fout, "w", compress = compress) if (first) { } writeFastq(fq, fout, "w", compress = compress) outperc <- paste(" (", outperc, "%)", sep = "")
writeFastq(fq, fout, "w", compress = compress) } writeFastq(fq, fout, "w", compress = compress)tryCatchOne(expr, names, parentenv, handlers[[1L]]) writeFastq(fq, fout, "w", compress = compress) writeFastq(fq, fout, "w", compress = compress) first = FALSE writeFastq(fq, fout, "w", compress = compress) else { first = FALSE message("Read in ", inseqs, ", output ", outseqs, outperc, 5: first = FALSE else { first = FALSE
first = FALSE first = FALSE } first = FALSE writeFastq(fq, fout, "a", compress = compress) } " filtered sequences.", sep = "") }FUN(X[[i]], ...) } writeFastq(fq, fout, "a", compress = compress) } 9: } } else { } } else { if (outseqs == 0) {
else { } else {tryCatchList(expr, classes, parentenv, handlers) else { else { writeFastq(fq, fout, "a", compress = compress) else { } writeFastq(fq, fout, "a", compress = compress) message(paste("The filter removed all reads:", fout, 6: writeFastq(fq, fout, "a", compress = compress) } writeFastq(fq, fout, "a", compress = compress)
writeFastq(fq, fout, "a", compress = compress) writeFastq(fq, fout, "a", compress = compress) } writeFastq(fq, fout, "a", compress = compress) if (verbose) { } "not written."))lapply(X = S, FUN = FUN, ...) } if (verbose) { }10: } } } } outperc <- round(outseqs * 100/inseqs, 1) } file.remove(fout)
} outperc <- round(outseqs * 100/inseqs, 1) }tryCatch(expr, error = function(e) { } } if (verbose) { } outperc <- paste(" (", outperc, "%)", sep = "") if (verbose) { } 7: if (verbose) { outperc <- paste(" (", outperc, "%)", sep = "") if (verbose) { call <- conditionCall(e) if (verbose) { if (verbose) { outperc <- round(outseqs * 100/inseqs, 1) if (verbose) { message("Read in ", inseqs, ", output ", outseqs, outperc, outperc <- round(outseqs * 100/inseqs, 1) return(invisible(c(reads.in = inseqs, reads.out = outseqs)))doTryCatch(return(expr), name, parentenv, handler) outperc <- round(outseqs * 100/inseqs, 1) message("Read in ", inseqs, ", output ", outseqs, outperc, outperc <- round(outseqs * 100/inseqs, 1) if (!is.null(call)) { outperc <- round(outseqs * 100/inseqs, 1) outperc <- round(outseqs * 100/inseqs, 1) outperc <- paste(" (", outperc, "%)", sep = "") outperc <- round(outseqs * 100/inseqs, 1) " filtered sequences.", sep = "") outperc <- paste(" (", outperc, "%)", sep = "")})(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L,
outperc <- paste(" (", outperc, "%)", sep = "") " filtered sequences.", sep = "") outperc <- paste(" (", outperc, "%)", sep = "") if (identical(call[[1L]], quote(doTryCatch))) outperc <- paste(" (", outperc, "%)", sep = "") outperc <- paste(" (", outperc, "%)", sep = "") message("Read in ", inseqs, ", output ", outseqs, outperc, outperc <- paste(" (", outperc, "%)", sep = "") } message("Read in ", inseqs, ", output ", outseqs, outperc, trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, 8: message("Read in ", inseqs, ", output ", outseqs, outperc, } message("Read in ", inseqs, ", output ", outseqs, outperc, call <- sys.call(-4L) message("Read in ", inseqs, ", output ", outseqs, outperc, message("Read in ", inseqs, ", output ", outseqs, outperc, " filtered sequences.", sep = "") message("Read in ", inseqs, ", output ", outseqs, outperc, if (outseqs == 0) { " filtered sequences.", sep = "") maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, tryCatchOne(expr, names, parentenv, handlers[[1L]]) " filtered sequences.", sep = "") if (outseqs == 0) { " filtered sequences.", sep = "") dcall <- deparse(call, nlines = 1L) " filtered sequences.", sep = "") " filtered sequences.", sep = "") } " filtered sequences.", sep = "") message(paste("The filter removed all reads:", fout, } orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto",
} message(paste("The filter removed all reads:", fout, } prefix <- paste("Error in", dcall, ": ") } } if (outseqs == 0) { } "not written.")) if (outseqs == 0) { compress = TRUE, verbose = FALSE) 9: if (outseqs == 0) { "not written.")) if (outseqs == 0) { LONG <- 75L if (outseqs == 0) { if (outseqs == 0) { message(paste("The filter removed all reads:", fout, if (outseqs == 0) { file.remove(fout) message(paste("The filter removed all reads:", fout,
tryCatchList(expr, classes, parentenv, handlers) 4: message(paste("The filter removed all reads:", fout, file.remove(fout) message(paste("The filter removed all reads:", fout, sm <- strsplit(conditionMessage(e), "\n")[[1L]] message(paste("The filter removed all reads:", fout, message(paste("The filter removed all reads:", fout, "not written.")) message(paste("The filter removed all reads:", fout, } "not written."))
.mapply(FUN, dots, MoreArgs) "not written.")) } "not written.")) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") "not written.")) "not written.")) file.remove(fout) "not written.")) return(invisible(c(reads.in = inseqs, reads.out = outseqs))) file.remove(fout)10:
file.remove(fout) return(invisible(c(reads.in = inseqs, reads.out = outseqs))) file.remove(fout) if (is.na(w)) file.remove(fout) file.remove(fout) } file.remove(fout)})(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, }tryCatch(expr, error = function(e) { 5: }})(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, } w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], } } return(invisible(c(reads.in = inseqs, reads.out = outseqs))) } trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, return(invisible(c(reads.in = inseqs, reads.out = outseqs))) call <- conditionCall(e)FUN(X[[i]], ...) return(invisible(c(reads.in = inseqs, reads.out = outseqs))) trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, return(invisible(c(reads.in = inseqs, reads.out = outseqs))) type = "b") return(invisible(c(reads.in = inseqs, reads.out = outseqs))) return(invisible(c(reads.in = inseqs, reads.out = outseqs)))})(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, return(invisible(c(reads.in = inseqs, reads.out = outseqs))) maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, })(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, if (!is.null(call)) {
})(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, })(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, if (w > LONG) })(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, })(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, })(dots[[1L]][[1L]], dots[[2L]][[1L]], truncQ = 2L, truncLen = 268L, orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, if (identical(call[[1L]], quote(doTryCatch))) 6: trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, prefix <- paste0(prefix, "\n ") trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, trimLeft = 0L, trimRight = 0, maxLen = Inf, minLen = 20, compress = TRUE, verbose = FALSE) maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, call <- sys.call(-4L)lapply(X = S, FUN = FUN, ...) maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, compress = TRUE, verbose = FALSE) maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, } maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0, orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", maxN = 0, minQ = 0, maxEE = 2, rm.phix = TRUE, rm.lowcomplex = 0,
orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", dcall <- deparse(call, nlines = 1L)
orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto",
orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", else prefix <- "Error : " orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", compress = TRUE, verbose = FALSE) orient.fwd = NULL, n = 1e+05, OMP = FALSE, qualityType = "Auto", 4: compress = TRUE, verbose = FALSE) prefix <- paste("Error in", dcall, ": ") 7: compress = TRUE, verbose = FALSE) 4: compress = TRUE, verbose = FALSE) msg <- paste0(prefix, conditionMessage(e), "\n") compress = TRUE, verbose = FALSE) compress = TRUE, verbose = FALSE)
compress = TRUE, verbose = FALSE).mapply(FUN, dots, MoreArgs)
LONG <- 75LdoTryCatch(return(expr), name, parentenv, handler)
.mapply(FUN, dots, MoreArgs) 4:
.Internal(seterrmessage(msg[1L]))
4:
4: sm <- strsplit(conditionMessage(e), "\n")[[1L]]
.mapply(FUN, dots, MoreArgs) 4: if (!silent && isTRUE(getOption("show.error.messages"))) { 4: 4: .mapply(FUN, dots, MoreArgs) 4: 5: .mapply(FUN, dots, MoreArgs) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 8: 5:
.mapply(FUN, dots, MoreArgs) cat(msg, file = outFile).mapply(FUN, dots, MoreArgs).mapply(FUN, dots, MoreArgs)
.mapply(FUN, dots, MoreArgs)FUN(X[[i]], ...)
if (is.na(w)) tryCatchOne(expr, names, parentenv, handlers[[1L]])FUN(X[[i]], ...) 5:
.Internal(printDeferredWarnings())
5:
5: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
FUN(X[[i]], ...) 5: } 5: 5: FUN(X[[i]], ...) 5: 6: FUN(X[[i]], ...) type = "b") 9: 6:
FUN(X[[i]], ...) invisible(structure(msg, class = "try-error", condition = e))FUN(X[[i]], ...)FUN(X[[i]], ...)
FUN(X[[i]], ...)lapply(X = S, FUN = FUN, ...)
if (w > LONG) tryCatchList(expr, classes, parentenv, handlers)lapply(X = S, FUN = FUN, ...) 6:
})
6:
6: prefix <- paste0(prefix, "\n ")
lapply(X = S, FUN = FUN, ...) 6:
6: 6: lapply(X = S, FUN = FUN, ...) 6: 7: lapply(X = S, FUN = FUN, ...) }10: 7:
lapply(X = S, FUN = FUN, ...)11: lapply(X = S, FUN = FUN, ...)lapply(X = S, FUN = FUN, ...)
lapply(X = S, FUN = FUN, ...)doTryCatch(return(expr), name, parentenv, handler)
else prefix <- "Error : "tryCatch(expr, error = function(e) {doTryCatch(return(expr), name, parentenv, handler) 7:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
7:
7: msg <- paste0(prefix, conditionMessage(e), "\n") call <- conditionCall(e)
doTryCatch(return(expr), name, parentenv, handler) 7:
7: 7: doTryCatch(return(expr), name, parentenv, handler) 7: 8: doTryCatch(return(expr), name, parentenv, handler) .Internal(seterrmessage(msg[1L])) if (!is.null(call)) { 8:
doTryCatch(return(expr), name, parentenv, handler)12: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler)
doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])
if (!silent && isTRUE(getOption("show.error.messages"))) { if (identical(call[[1L]], quote(doTryCatch))) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
8:
8: cat(msg, file = outFile) call <- sys.call(-4L)
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8:
8: 8: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 8: 9: tryCatchOne(expr, names, parentenv, handlers[[1L]]) .Internal(printDeferredWarnings()) dcall <- deparse(call, nlines = 1L) 9:
tryCatchOne(expr, names, parentenv, handlers[[1L]])13: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers)
} prefix <- paste("Error in", dcall, ": ")tryCatchList(expr, classes, parentenv, handlers) 9:
FUN(X[[i]], ...)
9:
9: invisible(structure(msg, class = "try-error", condition = e)) LONG <- 75L
tryCatchList(expr, classes, parentenv, handlers) 9:
9: 9: tryCatchList(expr, classes, parentenv, handlers) 9: 10: tryCatchList(expr, classes, parentenv, handlers)}) sm <- strsplit(conditionMessage(e), "\n")[[1L]]10:
tryCatchList(expr, classes, parentenv, handlers)14: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
tryCatchList(expr, classes, parentenv, handlers)tryCatch(expr, error = function(e) {
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatch(expr, error = function(e) {10:
lapply(seq_len(cores), inner.do)
10:
call <- conditionCall(e)10: 11: if (is.na(w)) call <- conditionCall(e)tryCatch(expr, error = function(e) {10:
10: 10: tryCatch(expr, error = function(e) {10: if (!is.null(call)) {tryCatch(expr, error = function(e) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (!is.null(call)) { call <- conditionCall(e)tryCatch(expr, error = function(e) {15: tryCatch(expr, error = function(e) {tryCatch(expr, error = function(e) { call <- conditionCall(e)tryCatch(expr, error = function(e) { if (identical(call[[1L]], quote(doTryCatch))) call <- conditionCall(e)
type = "b") if (identical(call[[1L]], quote(doTryCatch))) if (!is.null(call)) { call <- conditionCall(e)mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, call <- conditionCall(e) call <- conditionCall(e) if (!is.null(call)) { call <- conditionCall(e) call <- sys.call(-4L) if (!is.null(call)) {12: if (w > LONG) call <- sys.call(-4L) if (identical(call[[1L]], quote(doTryCatch))) if (!is.null(call)) { mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores, if (!is.null(call)) { if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) if (!is.null(call)) { dcall <- deparse(call, nlines = 1L) if (identical(call[[1L]], quote(doTryCatch))) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) prefix <- paste0(prefix, "\n ") dcall <- deparse(call, nlines = 1L) call <- sys.call(-4L) if (identical(call[[1L]], quote(doTryCatch))) mc.cleanup = mc.cleanup, affinity.list = affinity.list) if (identical(call[[1L]], quote(doTryCatch))) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) if (identical(call[[1L]], quote(doTryCatch))) prefix <- paste("Error in", dcall, ": ") call <- sys.call(-4L)
} prefix <- paste("Error in", dcall, ": ") dcall <- deparse(call, nlines = 1L) call <- sys.call(-4L)
call <- sys.call(-4L) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) call <- sys.call(-4L) LONG <- 75L dcall <- deparse(call, nlines = 1L)13: else prefix <- "Error : " LONG <- 75L prefix <- paste("Error in", dcall, ": ") dcall <- deparse(call, nlines = 1L)16: dcall <- deparse(call, nlines = 1L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") dcall <- deparse(call, nlines = 1L) sm <- strsplit(conditionMessage(e), "\n")[[1L]] prefix <- paste("Error in", dcall, ": ")FUN(X[[i]], ...) msg <- paste0(prefix, conditionMessage(e), "\n") sm <- strsplit(conditionMessage(e), "\n")[[1L]] LONG <- 75L prefix <- paste("Error in", dcall, ": ")mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, prefix <- paste("Error in", dcall, ": ") prefix <- paste("Error in", dcall, ": ") LONG <- 75L prefix <- paste("Error in", dcall, ": ") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") LONG <- 75L
.Internal(seterrmessage(msg[1L])) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") sm <- strsplit(conditionMessage(e), "\n")[[1L]] LONG <- 75L truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, LONG <- 75L LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] LONG <- 75L if (is.na(w)) sm <- strsplit(conditionMessage(e), "\n")[[1L]]14: if (!silent && isTRUE(getOption("show.error.messages"))) { if (is.na(w)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") sm <- strsplit(conditionMessage(e), "\n")[[1L]] maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, sm <- strsplit(conditionMessage(e), "\n")[[1L]] sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")lapply(seq_len(cores), inner.do) cat(msg, file = outFile) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (is.na(w)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") type = "b") if (is.na(w))
.Internal(printDeferredWarnings()) type = "b") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (is.na(w)) orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, if (is.na(w)) if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (is.na(w)) if (w > LONG) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 15: } if (w > LONG) type = "b") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], compress = compress, verbose = verbose), mc.cores = ncores, w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], prefix <- paste0(prefix, "\n ") type = "b")mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, invisible(structure(msg, class = "try-error", condition = e)) prefix <- paste0(prefix, "\n ") if (w > LONG) type = "b") mc.silent = TRUE) type = "b") type = "b") if (w > LONG) type = "b") } if (w > LONG) mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores, }) } prefix <- paste0(prefix, "\n ") if (w > LONG)
if (w > LONG) if (w > LONG) prefix <- paste0(prefix, "\n ") if (w > LONG) else prefix <- "Error : " prefix <- paste0(prefix, "\n ") mc.cleanup = mc.cleanup, affinity.list = affinity.list)
else prefix <- "Error : " } prefix <- paste0(prefix, "\n ")17: prefix <- paste0(prefix, "\n ") prefix <- paste0(prefix, "\n ") } prefix <- paste0(prefix, "\n ") msg <- paste0(prefix, conditionMessage(e), "\n") }
11: msg <- paste0(prefix, conditionMessage(e), "\n") else prefix <- "Error : " }filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, } } else prefix <- "Error : " } .Internal(seterrmessage(msg[1L])) else prefix <- "Error : "16: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) .Internal(seterrmessage(msg[1L])) msg <- paste0(prefix, conditionMessage(e), "\n") else prefix <- "Error : " maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, else prefix <- "Error : " else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") else prefix <- "Error : " if (!silent && isTRUE(getOption("show.error.messages"))) { msg <- paste0(prefix, conditionMessage(e), "\n")mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ,
if (!silent && isTRUE(getOption("show.error.messages"))) { .Internal(seterrmessage(msg[1L])) msg <- paste0(prefix, conditionMessage(e), "\n") maxLen = maxLen) msg <- paste0(prefix, conditionMessage(e), "\n") msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) msg <- paste0(prefix, conditionMessage(e), "\n") cat(msg, file = outFile) .Internal(seterrmessage(msg[1L])) truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, 12: cat(msg, file = outFile) if (!silent && isTRUE(getOption("show.error.messages"))) { .Internal(seterrmessage(msg[1L]))
.Internal(seterrmessage(msg[1L])) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { .Internal(seterrmessage(msg[1L])) .Internal(printDeferredWarnings()) if (!silent && isTRUE(getOption("show.error.messages"))) { maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) .Internal(printDeferredWarnings()) cat(msg, file = outFile) if (!silent && isTRUE(getOption("show.error.messages"))) {18: if (!silent && isTRUE(getOption("show.error.messages"))) { if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) if (!silent && isTRUE(getOption("show.error.messages"))) { } cat(msg, file = outFile) maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex,
} .Internal(printDeferredWarnings()) cat(msg, file = outFile)withCallingHandlers(expr, warning = function(w) if (inherits(w, cat(msg, file = outFile) cat(msg, file = outFile) .Internal(printDeferredWarnings()) cat(msg, file = outFile) invisible(structure(msg, class = "try-error", condition = e)) .Internal(printDeferredWarnings()) orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, 13: invisible(structure(msg, class = "try-error", condition = e)) } .Internal(printDeferredWarnings()) classes)) tryInvokeRestart("muffleWarning")) .Internal(printDeferredWarnings()) .Internal(printDeferredWarnings()) } .Internal(printDeferredWarnings())}) } compress = compress, verbose = verbose), mc.cores = ncores, FUN(X[[i]], ...)}) invisible(structure(msg, class = "try-error", condition = e)) }
} } invisible(structure(msg, class = "try-error", condition = e)) }
invisible(structure(msg, class = "try-error", condition = e)) mc.silent = TRUE)
}) invisible(structure(msg, class = "try-error", condition = e))19: invisible(structure(msg, class = "try-error", condition = e)) invisible(structure(msg, class = "try-error", condition = e))}) invisible(structure(msg, class = "try-error", condition = e))11: })
14: 11:
})suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, })})
})try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
17: lapply(seq_len(cores), inner.do)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)11:
trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE,
11:
11: filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft,
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)11: multithread = multithread, maxLen = maxLen))11: 11: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)11: 12: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, 15: 12:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
maxLen = maxLen)mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))12:
12:
12:
mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores,
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))12: 12: 12: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))12: 13: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))18: mc.cleanup = mc.cleanup, affinity.list = affinity.list)13:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))FUN(X[[i]], ...)
withCallingHandlers(expr, warning = function(w) if (inherits(w,
FUN(X[[i]], ...)13:
13:
13: classes)) tryInvokeRestart("muffleWarning"))16:
FUN(X[[i]], ...)13: 13: 13: FUN(X[[i]], ...)FUN(X[[i]], ...)13: 14: FUN(X[[i]], ...)
mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, 14:
FUN(X[[i]], ...)FUN(X[[i]], ...)
FUN(X[[i]], ...)
lapply(seq_len(cores), inner.do)
19: truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, 14: lapply(seq_len(cores), inner.do)14:
14:
14:
suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, lapply(seq_len(cores), inner.do)lapply(seq_len(cores), inner.do) maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex,
14: 14: lapply(seq_len(cores), inner.do)
lapply(seq_len(cores), inner.do)14: lapply(seq_len(cores), inner.do)15: trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE,
orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, 15: lapply(seq_len(cores), inner.do)15: lapply(seq_len(cores), inner.do)
mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, multithread = multithread, maxLen = maxLen))15: 15: compress = compress, verbose = verbose), mc.cores = ncores, mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule,
mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule,
15: 15: mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores,
mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, mc.silent = TRUE) mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores, 15: mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores, 15: mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, mc.cleanup = mc.cleanup, affinity.list = affinity.list) mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores, mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores,
mc.cleanup = mc.cleanup, affinity.list = affinity.list)mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, mc.cleanup = mc.cleanup, affinity.list = affinity.list)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.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores,
mc.cleanup = mc.cleanup, affinity.list = affinity.list) mc.cleanup = mc.cleanup, affinity.list = affinity.list)17:
mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores,
mc.set.seed = mc.set.seed, mc.silent = mc.silent, mc.cores = mc.cores, mc.cleanup = mc.cleanup, affinity.list = affinity.list) mc.cleanup = mc.cleanup, affinity.list = affinity.list)16:
filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, 16: mc.cleanup = mc.cleanup, affinity.list = affinity.list)16: mc.cleanup = mc.cleanup, affinity.list = affinity.list)
mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, 16: 16: maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ,
mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ,
16: 16: truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, maxLen = maxLen) truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, 16: truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, 16: mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight,
maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, mcmapply(fastqFilter, fwd, filt, MoreArgs = list(truncQ = truncQ, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, 18: maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, withCallingHandlers(expr, warning = function(w) if (inherits(w, orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, compress = compress, verbose = verbose), mc.cores = ncores, orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, classes)) tryInvokeRestart("muffleWarning")) compress = compress, verbose = verbose), mc.cores = ncores, maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, compress = compress, verbose = verbose), mc.cores = ncores, maxEE = maxEE, rm.phix = rm.phix, rm.lowcomplex = rm.lowcomplex, orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, mc.silent = TRUE) compress = compress, verbose = verbose), mc.cores = ncores, compress = compress, verbose = verbose), mc.cores = ncores,
mc.silent = TRUE) orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, mc.silent = TRUE) orient.fwd = orient.fwd, n = n, OMP = OMP, qualityType = qualityType, compress = compress, verbose = verbose), mc.cores = ncores, compress = compress, verbose = verbose), mc.cores = ncores,
mc.silent = TRUE) mc.silent = TRUE)19:
compress = compress, verbose = verbose), mc.cores = ncores, An irrecoverable exception occurred. R is aborting now ...
compress = compress, verbose = verbose), mc.cores = ncores, An irrecoverable exception occurred. R is aborting now ...
mc.silent = TRUE) mc.silent = TRUE)17:
suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, 17: mc.silent = TRUE)17: mc.silent = TRUE)
filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, 17: 17: trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft,
17: filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft,
17: 17: maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, multithread = multithread, maxLen = maxLen)) maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, maxLen = maxLen) maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, 17: filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, maxLen = maxLen) maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread,
maxLen = maxLen)
An irrecoverable exception occurred. R is aborting now ...
maxLen = maxLen)filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread,
maxLen = maxLen) maxLen = maxLen)
18:
maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, maxLen = maxLen) maxLen = maxLen)18:
18: withCallingHandlers(expr, warning = function(w) if (inherits(w, 18: maxLen = maxLen)
withCallingHandlers(expr, warning = function(w) if (inherits(w, 18: 18: withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))withCallingHandlers(expr, warning = function(w) if (inherits(w,
18: 18: classes)) tryInvokeRestart("muffleWarning"))withCallingHandlers(expr, warning = function(w) if (inherits(w, withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning"))
classes)) tryInvokeRestart("muffleWarning"))18: withCallingHandlers(expr, warning = function(w) if (inherits(w, withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning")) classes)) tryInvokeRestart("muffleWarning"))
19:
withCallingHandlers(expr, warning = function(w) if (inherits(w, classes)) tryInvokeRestart("muffleWarning")) classes)) tryInvokeRestart("muffleWarning"))19:
19: suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, 19: classes)) tryInvokeRestart("muffleWarning"))
suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, 19: 19: suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen,
19: 19: trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, maxLen = maxLen)) trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, 19: suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, multithread = multithread, maxLen = maxLen)) trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, maxLen = maxLen)) multithread = multithread, maxLen = maxLen))
multithread = multithread, maxLen = maxLen))suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE,
multithread = multithread, maxLen = maxLen))
An irrecoverable exception occurred. R is aborting now ...
trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread, maxLen = maxLen)) multithread = multithread, maxLen = maxLen))
An irrecoverable exception occurred. R is aborting now ...
An irrecoverable exception occurred. R is aborting now ...
An irrecoverable exception occurred. R is aborting now ...
multithread = multithread, maxLen = maxLen))An irrecoverable exception occurred. R is aborting now ...
An irrecoverable exception occurred. R is aborting now ...
An irrecoverable exception occurred. R is aborting now ...
An irrecoverable exception occurred. R is aborting now ...
An irrecoverable exception occurred. R is aborting now ...
Error in names(answer) <- dots[[1L]] :
'names' attribute [184] must be the same length as the vector [90]
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(unfilts, filts, truncLen = truncLen, trimLeft = trimLeft,
maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE, multithread = multithread,
maxLen = maxLen)
2: withCallingHandlers(expr, warning = function(w) if (inherits(w,
classes)) tryInvokeRestart("muffleWarning"))
1: suppressWarnings(filterAndTrim(unfilts, filts, truncLen = truncLen,
trimLeft = trimLeft, maxEE = maxEE, truncQ = truncQ, rm.phix = TRUE,
multithread = multithread, maxLen = maxLen))
Traceback (most recent call last):
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 243, in _denoise_single
run_commands([cmd])
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 38, in run_commands
subprocess.run(cmd, check=True)
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada.R', '--input_directory', '/tmp/qiime2/ec2-user/processes/32828-1738784434.57@ec2-user/tmp/q2-OutPath-cosdwwt0', '--output_path', '/tmp/tmpz33j3e6z/output.tsv.biom', '--output_track', '/tmp/tmpz33j3e6z/track.tsv', '--filtered_directory', '/tmp/tmpz33j3e6z', '--truncation_length', '268', '--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', '24', '--learn_min_reads', '1000000', '--homopolymer_gap_penalty', 'NULL', '--band_size', '16']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 530, in __call__
results = self._execute_action(
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2cli/commands.py", line 602, in _execute_action
results = action(**arguments)
File "<decorator-gen-46>", line 2, in denoise_single
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/qiime2/sdk/action.py", line 299, in bound_callable
outputs = self._callable_executor_(
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/qiime2/sdk/action.py", line 570, in _callable_executor_
output_views = self._callable(**view_args)
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 269, in denoise_single
return _denoise_single(
File "/home/ec2-user/miniconda3/envs/qiime2-amplicon-2024.10/lib/python3.10/site-packages/q2_dada2/_denoise.py", line 252, in _denoise_single
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.
(qiime2-amplicon-2024.10) [ec2-user@ip-10-1-4-135 ~]$