Exploring a MgDb Object

The MgDb Class in the metagenomeFeatures package includes the sequences and taxonomic information for a 16S database. The following vignette demonstrates the class methods for exploring and subsetting a MgDb-class object using the gg85 included in the metagenomeFeatures package. MgDb-class object with full databases are in separate packages such as the greengenes13.5MgDb package.

Demonstration MgDb-class Object

library(metagenomeFeatures)
gg85 <- get_gg13.8_85MgDb()
gg85

MgDb Methods

taxa_keytypes

taxa_keytypes(gg85)
taxa_columns(gg85)
head(taxa_keys(gg85, keytype = c("Kingdom")))

Select Methods

Used to retrieve db entries for a specified taxonomic group or id list, can return either taxonomic, sequences information, or both.

Selecting taxonomic information

mgDb_select(gg85, type = "taxa",
            keys = c("Vibrionaceae", "Enterobacteriaceae"),
            keytype = "Family")

Selecting sequence information

mgDb_select(gg85, type = "seq",
            keys = c("Vibrionaceae", "Enterobacteriaceae"),
            keytype = "Family")

Selecting all

mgDb_select(gg85, type = "all",
                keys = c("Vibrio", "Salmonella"),
                keytype = "Genus")
sessionInfo()


Try the metagenomeFeatures package in your browser

Any scripts or data that you put into this service are public.

metagenomeFeatures documentation built on May 2, 2018, 4:13 a.m.