View source: R/phyloseq2lefse.R
phyloseq2lefse | R Documentation |
Convert phyloseq otu and tax tables into a file that can be fed into LefSe
phyloseq2lefse( ps, covars, file.name = "lefse_data.txt", taxa.levels = c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus"), transpose.otus = TRUE )
ps |
A phyloseq object that contains a sample data table, an OTU (or ASV) table, and a taxonomy table. |
covars |
A character vector with, the names of the variables in the sample data that will be used in LefSe. Max length: 2. |
file.name |
Character string with name of file you want to write the output to. The convention is to use the .txt extension. |
taxa.levels |
A character vector with the taxonomic levels you want considered by LefSe. Default is "Domain", "Kingdom", "Phylum", "Class", "Order", "Family", "Genus". |
transpose.otus |
Phyloseq generally makes the OTUs/ASVs the column names, but this function needs them as row names. If OTUs/ASVs are already row names, set this to FALSE. Default is TRUE. |
phyloseq
data(example_phyloseq) phyloseq2lefse(ps = example_phyloseq, covars = "Genotype", file.name = "example_lefse_data.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.