physeq.create: Create phyloseq object

View source: R/microbiome_functions.R

physeq.createR Documentation

Create phyloseq object

Description

Function to create phyloseq obejct, with additional quality control measures to ensure input dataframes are correctly aligned for phyloseq.

Usage

physeq.create(
  asvdf,
  taxdf,
  mapdf,
  ID.col,
  export.asvsp = TRUE,
  export.wd = getwd()
)

Arguments

asvdf

Dataframe containing ASV sequence count data for each sample. Rows are sequences and column are samples. Rownames must be set to sequence ID..

taxdf

Dataframe contaningg taxonomic classification of each ASV. Rows are sequences and columns are samples. Rownames must be set to sequence ID.

mapdf

Dataframe containing sample meta data (e.g clinical variables). Rows are samples and columns are metadata variables (e.g age, sex, clinical variables, etc.)

ID.col

#String. Name of the column in mapdf that contains sample IDs. (E.g "sample.ids")

export.asvsp

#TRUE or FALSE whether to export a dataframe that contains ASV sequences and their corresponding species ID (spID) auto-generated by phyloseq

export.wd

#Directory path as a string (e.g "~/output". Location of directory where dataframe will be exported if export.asvp = TRUE.

Value

Phyloseq object.

Examples

dat <- physeq.create(asvdf = asv, taxdf = taxanomy, mapdf = metadata, ID.col = "sample_ID", export.asvsp = FALSE)


SarahAsbury/retainresolve documentation built on Feb. 20, 2023, 7:48 a.m.