R/import-picrust2.R
import_picrust2.Rd
Import the output of picrust2 into phyloseq object
import_picrust2(
feature_tab,
sam_tab = NULL,
trait = c("PATHWAY", "COG", "EC", "KO", "PFAM", "TIGRFAM", "PHENO")
)
character, file path of the prediction abundance table of functional feature.
character, file path of the sample meta data.
character, options are picrust2 function traits (including "COG", "EC", "KO", "PFAM", "TIGRFAM", and "PHENO") and "PATHWAY".
phyloseq::phyloseq
object.
PICRUSt2 is a software for predicting abundances of functional profiles based on marker gene sequencing data. The functional profiles can be predicted from the taxonomic profiles using PICRUSt2. "Function" usually refers to gene families such as KEGG orthologs and Enzyme Classification numbers, but predictions can be made for any arbitrary trait.
In the phyloseq object
, the predicted function abundance profile is stored
in otu_table
slot. And the functional trait is saved in tax_table
slot,
if the descriptions of function features is not added to the predicted table,
tax_table
will have only one rank Picrust_trait
to represent the function
feature id, or if the desciptions are added one more rank
Picrust_description
will be added to represent the description of
function feature.
sam_tab <- system.file(
"extdata", "picrust2_metadata.tsv",
package = "microbiomeMarker")
feature_tab <- system.file(
"extdata", "path_abun_unstrat_descrip.tsv.gz",
package = "microbiomeMarker")
ps <- import_picrust2(feature_tab, sam_tab, trait = "PATHWAY")
ps
#> phyloseq-class experiment-level object
#> otu_table() OTU Table: [ 195 taxa and 24 samples ]
#> sample_data() Sample Data: [ 24 samples by 3 sample variables ]
#> tax_table() Taxonomy Table: [ 195 taxa by 2 taxonomic ranks ]