forked from microbiome/mia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimportMetaPhlAn.Rd
94 lines (85 loc) · 3.46 KB
/
importMetaPhlAn.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importMetaphlan.R
\name{importMetaPhlAn}
\alias{importMetaPhlAn}
\title{Import Metaphlan results to \code{TreeSummarizedExperiment}}
\arguments{
\item{file}{\code{NULL} or \code{DataFrame}-like object. Defines the file
path of the Metaphlan file. The file must be in merged Metaphlan format.}
\item{col.data}{a DataFrame-like object that includes sample names in
rownames, or a single \code{character} value defining the file
path of the sample metadata file. The file must be in \code{tsv} format
(Default: \code{NULL}).}
\item{colData}{Deprecated. use \code{col.data} instead.}
\item{sample_meta}{Deprecated. Use \code{col.data} instead.}
\item{tree.file}{\code{Character scalar}. Defines the file
path of the phylogenetic tree.
(Default: \code{NULL}).}
\item{phy_tree}{Deprecated. Use \code{tree.file} instead.}
\item{...}{additional arguments:
\itemize{
\item \code{assay.type}: \code{Character scalar}. Specifies the name of
the assay used in calculation. (Default: \code{"metaphlan"})
\item \code{prefix.rm}: \code{Logical scalar}. Should
taxonomic prefixes be removed? (Default: \code{FALSE})
\item \code{remove.suffix}: \code{Logical scalar}. Should
suffixes of sample names be removed? Metaphlan pipeline adds suffixes
to sample names. Suffixes are formed from file names. By selecting
\code{remove.suffix = TRUE}, you can remove pattern from end of sample
names that is shared by all. (Default: \code{FALSE})
\item \code{set.ranks}: \code{Logical scalar}. Should the columns
in the rowData that are treated as taxonomy ranks be updated according to
the ranks found in the imported data?
(Default: \code{FALSE})
}}
}
\value{
A
\code{\link[TreeSummarizedExperiment:TreeSummarizedExperiment-class]{TreeSummarizedExperiment}}
object
}
\description{
Import Metaphlan results to \code{TreeSummarizedExperiment}
}
\details{
Import Metaphlan (versions 2, 3 and 4 supported) results.
Input must be in merged Metaphlan format.
(See
\href{https://github.com/biobakery/MetaPhlAn/wiki/MetaPhlAn-4#merging-tables}{
the Metaphlan documentation and \code{merge_metaphlan_tables} method.})
Data is imported so that data at the lowest rank is imported as a
\code{TreeSummarizedExperiment} object. Data at higher rank is imported as a
\code{SummarizedExperiment} objects which are stored to \code{altExp} of
\code{TreeSummarizedExperiment} object.
Currently Metaphlan versions 2, 3, and 4 are supported.
}
\examples{
# (Data is from tutorial
# https://github.com/biobakery/biobakery/wiki/metaphlan3#merge-outputs)
# File path
file_path <- system.file(
"extdata", "merged_abundance_table.txt", package = "mia")
# Import data
tse <- importMetaPhlAn(file_path)
# Data at the lowest rank
tse
# Data at higher rank is stored in altExp
altExps(tse)
# Higher rank data is in SE format, for example, Phylum rank
altExp(tse, "phylum")
}
\references{
Beghini F, McIver LJ, Blanco-Míguez A, Dubois L, Asnicar F, Maharjan S,
Mailyan A, Manghi P, Scholz M, Thomas AM, Valles-Colomer M, Weingart G,
Zhang Y, Zolfo M, Huttenhower C, Franzosa EA, & Segata N (2021)
Integrating taxonomic, functional,
and strain-level profiling of diverse microbial communities with bioBakery 3.
\emph{eLife}. 10:e65088. doi: 10.7554/eLife.65088
}
\seealso{
\code{\link[=convertFromPhyloseq]{convertFromPhyloseq}}
\code{\link[=convertFromBIOM]{convertFromBIOM}}
\code{\link[=convertFromDADA2]{convertFromDADA2}}
\code{\link[=importQIIME2]{importQIIME2}}
\code{\link[=importMothur]{importMothur}}
}