prepSampleData: Prepare Metadata

View source: R/prepSampleData.R

prepSampleDataR Documentation

Prepare Metadata

Description

Prepare Metadata

Usage

prepSampleData(
  x,
  sample_ids = NULL,
  reference_group = NULL,
  compare = NULL,
  confounder_variables = NULL,
  variable_interest = NULL
)

Arguments

x

phyloseq-class object

sample_ids

columns with sample ids matching rownames of otu_table(ps)

reference_group

e.g. "no_ili" this will be coded as zero. The ref group witin compare vars of interest.

compare

The column name with case-control description

confounder_variables

Confounders to create stratum e.g. c("gender", "age_yrs_oct2014")

variable_interest

variable of interest to test

Details

Prepares Metadata for Testing.

Author(s)

Sudarshan A. Shetty

Examples

# comord.vars <- c("BMI_2014","respiratory_disease_2014", "Roken_2014")
# med.vars <- c("ace_inhibitors_2014","arbs_2014","flu_shot_2014_2015")
# patho.vars <- c("influenza_2014_any","haemophilus_2014_any","coronavirus_2014")
# all.vars <- c(comord.vars,med.vars,patho.vars)
# phenotypic.data.1 <- prepSampleData(ps.genus.ctrl.ili,
# sample_ids = "seq_sam_name",
# ref.group="no_ili",
# compare= "condition_status",
# confounder_variables = c("gender", "age_yrs_oct2014"),
# variable_interest=all.vars)


RIVM-IIV-Microbiome/biomeStats documentation built on Sept. 14, 2022, 5:15 p.m.