run_bracod: Run the main BRACoD algorithm

Description Usage Arguments Value Examples

View source: R/BRACoD.R

Description

Uses pymc3 to sample the posterior of the model to determine bacteria that are associated with your environmental variable.

Usage

1
run_bracod(df_relab, env_var, n_sample = 1000, n_burn = 1000, njobs = 4)

Arguments

df_relab

A dataframe of relative microbiome abundances. Samples are rows and bacteria are columns.

env_var

the environmental variable you are evaluating. You need 1 measurement associated with each sample.

n_sample

number of posterior samples.

n_burn

number of burn-in steps before actual sampling stops.

njobs

number of parallel MCMC chains to run.

Value

the pymc trace object which holds the samples of the posterior distribution

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(obesity)
r <- simulate_microbiome_counts(obesity)
sim_counts <- r[[1]]
sim_y <- r[[2]]
contributions <- r[[3]]
sim_relab <- scale_counts(sim_counts)
trace <- run_bracod(sim_relab, sim_y, n_sample = 1000, n_burn=1000, njobs=4)

## End(Not run)

BRACoD.R documentation built on May 17, 2021, 9:09 a.m.