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

getSequences

Get vector of sequences from input object.


Description

This function extracts the sequences from several different data objects, including including dada-class and derep-class objects, as well as data.frame objects that have both $sequence and $abundance columns. This function wraps the getUniques function, but return only the names (i.e. the sequences). Can also be provided the file path to a fasta or fastq file, a taxonomy table, or a DNAStringSet object. Sequences are coerced to upper-case characters.

Usage

getSequences(object, collapse = FALSE, silence = TRUE)

Arguments

object

(Required). The object from which to extract the sequences.

collapse

(Optional). Default FALSE. Should duplicate sequences detected in object be collapsed together, thereby imposing uniqueness on non-unique input.

silence

(Optional). Default TRUE. Suppress reporting of the detection and merger of duplicated input sequences.

Value

character. A character vector of the sequences.

Examples

derep1 = derepFastq(system.file("extdata", "sam1F.fastq.gz", package="dada2"))
dada1 <- dada(derep1, err=tperr1)
getSequences(derep1)[1:5]
getSequences(dada1)[1:5]
getSequences(dada1$clustering)[1:5]

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.