View source: R/convert_data_into_phyloseq.R
data2phyloseq | R Documentation |
Convert all the variate such as phenotype metadata and the relative abundance profiles in the data.frame/matrix into the data of phyloseq type
data2phyloseq(x, y, z, sampleid)
metadata |
x (Required) A table including multiple vectors of subjects' characteristic; |
micro |
y (Required) A table including multiple taxonomy, colnames are sampleid, rownames are taxonomy; |
occ |
A numberic of the occurrence above to restain |
13/01/2020 ShenZhen China
A phyloseq object
Hua Zou
library(phyloseq)
library(dplyr)
library(data.table)
library(tibble)
metadata <- read.csv(system.file("extdata", "phenotype.csv", package = "microbiotaPair"))
micro <- read.table(system.file("extdata", "abundance.profile",
package = "microbiotaPair"), sep = "\t")
sampleid <- "SampleID"
physeq_data <- data2phyloseq(metadata, micro)
# print(physeq_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.