predict.topics: Predict topic functional content

Description Usage Arguments Value References See Also Examples

View source: R/predict.R

Description

Given an object of class topics, this function predicts the functional content using PICRUSt or tax4fun precalculated mapping tables that maps the taxonomic abundance for a given OTU to functional abundance content across a set of functional genes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S3 method for class 'topics'
predict(
  object,
  reference = c("gg_ko", "gg_cog", "silva_ko"),
  reference_path,
  scalar = 100,
  cn_normalize = FALSE,
  sample_normalize = FALSE,
  drop = TRUE,
  ...
)

Arguments

object

(required) Output of find_topics.

reference

A string for either gg_ko, gg_cog, or silva_ko. Defaults to gg_ko.

reference_path

Folder path of the reference file

scalar

Value for scaling the topics over taxa distribution to predicted counts. Defaults to 100.

cn_normalize

Logical flag for performing 16S rRNA copy number normalization. Defaults to FALSE.

sample_normalize

Logical flag to normalize functional predictions by the total functional abundance in a sample. Defaults to FALSE.

drop

Logical flag to drop empty gene columns. Defaults to TRUE.

...

Additional arguments for t4f method.

Value

An object of class functions containing

fxn_table

A matrix of gene counts across topics.

fxn_meta

A list of functional metadata corresponding to fxn_table.

method_meta

A matrix of method specific metadata.

References

ABhauer, K. P., Wemheuer, B. Daniel, R., and Meinicke, P. (2015). Bioinformatics, 1-3. 31(17).

Langille, M. G.I.*, Zaneveld, J.*, Caporaso, J. G., McDonald, D., Knights, D., a Reyes, J., Clemente, J. C., Burkepile, D. E., Vega Thurber, R. L., Knight, R., Beiko, R. G., and Huttenhower, C. (2013). Nature Biotechnology, 1-10. 8.

See Also

download_ref picrust t4f

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
formula <- ~DIAGNOSIS
refs <- 'Not IBD'

dat <- prepare_data(otu_table=GEVERS$OTU,rows_are_taxa=FALSE,tax_table=GEVERS$TAX,
                    metadata=GEVERS$META,formula=formula,refs=refs,
                    cn_normalize=TRUE,drop=TRUE)

## Not run: 
topics <- find_topics(dat,K=15)

download_ref(destination='/references',reference='gg_ko')
functions <- predict(topics,reference='gg_ko',
                     reference_path='/references')

## End(Not run)

EESI/themetagenomics documentation built on May 10, 2020, 1:40 a.m.