data2phyloseq: data2phyloseq

View source: R/convert_data_into_phyloseq.R

data2phyloseqR Documentation

data2phyloseq

Description

Convert all the variate such as phenotype metadata and the relative abundance profiles in the data.frame/matrix into the data of phyloseq type

Usage

data2phyloseq(x, y, z, sampleid)

Arguments

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

Details

13/01/2020 ShenZhen China

Value

A phyloseq object

Author(s)

Hua Zou

Examples

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)


rusher321/microbiotaPair documentation built on July 24, 2024, 8:40 p.m.