% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import-dada2.R
\name{import_dada2}
\alias{import_dada2}
\title{Import function to read the the output of dada2 as phyloseq object}
\usage{
import_dada2(
  seq_tab,
  tax_tab = NULL,
  sam_tab = NULL,
  phy_tree = NULL,
  keep_taxa_rows = TRUE
)
}
\arguments{
\item{seq_tab}{matrix-like, ASV table, the output of
\code{dada2::removeBimeraDenovo}.}

\item{tax_tab}{matrix, taxonomy table, the output of
\code{dada2::assignTaxonomy} or \code{dada2::addSpecies}.}

\item{sam_tab}{data.frame or \code{\link[phyloseq:sample_data-class]{phyloseq::sample_data}}, sample data}

\item{phy_tree}{\code{\link[ape:read.tree]{ape::phylo}} class or character represents the path of
the tree file}

\item{keep_taxa_rows}{logical, whether keep taxa in rows or not in the
\code{otu_table} of the returned \code{phyloseq} object, default \code{TRUE}.}
}
\value{
\code{\link[phyloseq:phyloseq-class]{phyloseq::phyloseq}} object hold the taxonomy info,
sample metadata, number of reads per ASV.
}
\description{
Import the output of dada2 into phyloseq object
}
\details{
The output of the dada2 pipeline is a feature table of amplicon sequence
variants (an ASV table): A matrix with rows corresponding to samples and
columns to ASVs, in which the value of each entry is the number of times
that ASV was observed in that sample. This table is analogous to the
traditional OTU table. Conveniently, taxa names are saved as ASV1, ASV2,
..., in the returned phyloseq object.
}
\examples{
seq_tab <- readRDS(system.file("extdata", "dada2_seqtab.rds",
    package = "microbiomeMarker"
))
tax_tab <- readRDS(system.file("extdata", "dada2_taxtab.rds",
    package = "microbiomeMarker"
))
sam_tab <- read.table(system.file("extdata", "dada2_samdata.txt",
    package = "microbiomeMarker"
), sep = "\t", header = TRUE, row.names = 1)
ps <- import_dada2(seq_tab = seq_tab, tax_tab = tax_tab, sam_tab = sam_tab)
ps
}
