Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

makeSequenceTable

Construct a sample-by-sequence observation matrix.


Description

This function constructs a sequence table (analogous to an OTU table) from the provided list of samples.

Usage

makeSequenceTable(samples, orderBy = "abundance")

Arguments

samples

(Required). A list of the samples to include in the sequence table. Samples can be provided in any format that can be processed by getUniques. Sample names are propagated to the rownames of the sequence table.

orderBy

(Optional). character(1). Default "abundance". Specifies how the sequences (columns) of the returned table should be ordered (decreasing). Valid values: "abundance", "nsamples", NULL.

Value

Named integer matrix. A row for each sample, and a column for each unique sequence across all the samples. Note that the columns are named by the sequence which can make display a little unwieldy.

See Also

Examples

derep1 <- derepFastq(system.file("extdata", "sam1F.fastq.gz", package="dada2"))
derep2 <- derepFastq(system.file("extdata", "sam2F.fastq.gz", package="dada2"))
dada1 <- dada(derep1, tperr1)
dada2 <- dada(derep2, tperr1)
seqtab <- makeSequenceTable(list(sample1=dada1, sample2=dada2))

dada2

Accurate, high-resolution sample inference from amplicon sequencing data

v1.18.0
LGPL-3
Authors
Benjamin Callahan <benjamin.j.callahan@gmail.com>, Paul McMurdie, Susan Holmes
Initial release
2020-08-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.