% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import-picrust2.R
\name{import_picrust2}
\alias{import_picrust2}
\title{Import function to read the output of picrust2 as phyloseq object}
\usage{
import_picrust2(
  feature_tab,
  sam_tab = NULL,
  trait = c("PATHWAY", "COG", "EC", "KO", "PFAM", "TIGRFAM", "PHENO")
)
}
\arguments{
\item{feature_tab}{character, file path of the prediction abundance table of
functional feature.}

\item{sam_tab}{character, file path of the sample meta data.}

\item{trait}{character, options are picrust2 function traits (including
"COG", "EC", "KO", "PFAM", "TIGRFAM", and "PHENO") and "PATHWAY".}
}
\value{
\code{\link[phyloseq:phyloseq-class]{phyloseq::phyloseq}} object.
}
\description{
Import the output of picrust2 into phyloseq object
}
\details{
\href{https://huttenhower.sph.harvard.edu/picrust/}{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 \verb{phyloseq object}, the predicted function abundance profile is stored
in \code{otu_table} slot. And the functional trait is saved in \code{tax_table} slot,
if the descriptions of function features is not added to the predicted table,
\code{tax_table} will have only one rank \code{Picrust_trait} to represent the function
feature id, or if the desciptions are added one more rank
\code{Picrust_description} will be added to represent the description of
function feature.
}
\examples{
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
}
