mp_import_metaphlan | R Documentation |
Import function to load the output of MetaPhlAn.
mp_import_metaphlan(
profile,
mapfilename = NULL,
treefile = NULL,
linenum = NULL,
...
)
profile |
the output file (text format) of MetaPhlAn. |
mapfilename |
the sample information file or data.frame, default is NULL. |
treefile |
the path of MetaPhlAn tree file ( mpa_v30_CHOCOPhlAn_201901_species_tree.nwk), default is NULL. |
linenum |
a integer, sometimes the output file of MetaPhlAn ( < 3) contained the sample information in the first several lines. The linenum should be required. for example: group A A A A B B B B subgroup A1 A1 A2 A2 B1 B1 B2 B2 subject S1 S2 S3 S4 S5 S6 S7 S8 Bacteria 99 99 99 99 99 99 99 99 ... the sampleid A1 A2 A3 A4 A5 Bacteria 99 99 99 99 99 ... The |
... |
additional parameters, meaningless now. |
When the output abundance of MetaPhlAn is relative abundance, the force
of mp_cal_abundance
should be set to TRUE, and the relative
of mp_cal_abundance
should be set to FALSE.
Because the abundance profile will be rarefied in the default (force=FALSE), which requires the integer (count)
abundance, then the relative abundance will be calculated in the default (relative=TRUE).
Shuangbin Xu
file1 <- system.file("extdata/MetaPhlAn", "metaphlan_test.txt", package="MicrobiotaProcess")
sample.file <- system.file("extdata/MetaPhlAn", "sample_test.txt", package="MicrobiotaProcess")
readLines(file1, n=3) %>% writeLines()
mpse1 <- mp_import_metaphlan(profile=file1, mapfilename=sample.file)
mpse1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.