View source: R/convertFromDADA2.R
convertFromDADA2 | R Documentation |
TreeSummarizedExperiment
object from ‘DADA2’ resultsCreate a TreeSummarizedExperiment
object from ‘DADA2’ results
convertFromDADA2(...)
... |
Additional arguments. For |
convertFromDADA2
is a wrapper for the
mergePairs
function from the dada2
package.
A count matrix is constructed via
makeSequenceTable(mergePairs(...))
and rownames are dynamically
created as ASV(N)
with N
from 1 to nrow
of the count
tables. The colnames and rownames from the output of makeSequenceTable
are stored as colnames
and in the referenceSeq
slot of the
TreeSummarizedExperiment
, respectively.
convertFromDADA2
returns an object of class
TreeSummarizedExperiment
### Coerce DADA2 results to a TreeSE object
if(requireNamespace("dada2")) {
fnF <- system.file("extdata", "sam1F.fastq.gz", package="dada2")
fnR = system.file("extdata", "sam1R.fastq.gz", package="dada2")
dadaF <- dada2::dada(fnF, selfConsist=TRUE)
dadaR <- dada2::dada(fnR, selfConsist=TRUE)
tse <- convertFromDADA2(dadaF, fnF, dadaR, fnR)
tse
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.