core_taxa: Determine taxa that are common (core) across sample types

View source: R/misc_analyses.R

core_taxaR Documentation

Determine taxa that are common (core) across sample types

Description

This function returns a data frame with taxa that are determined to be common across multiple sample types based on default or user defined thresholds.

Usage

core_taxa(input, type_header, prop_types = 1, prop_reps = 0.5)

Arguments

input

The input dataset as loaded by load_taxa_table.

type_header

Mapping file header (in quotation marks) of factor for which you are testing for differences.

prop_types

[OPTIONAL] The proportion of sample types in which a taxon must be present to be considered core.

prop_reps

[OPTIONAL] The proportion of replicate samples within a sample type in which a taxon must be present to be considered core.

Value

A data frame with each core taxon as a row. The proportion of sample types where the taxon was present, the mean count of each sample type, and the corresponding taxonomy (if provided), are also returned.

Examples

# taxa core to fruits and vegetables
core_taxa(fruits_veggies, type_header = 'Sample_type')
# relax the proportion of produce/sample types
core_taxa(fruits_veggies, type_header = 'Sample_type', prop_types = 0.6)

leffj/mctoolsr documentation built on Aug. 5, 2022, 1:27 a.m.