Compute pairwise correlations between microbiome taxa and metabolites on matched samples.
Usage
calculate_correlation(
object = NULL,
microbiome_data = NULL,
metabolome_data = NULL,
sample_link = NULL,
microbiome_rank = "Genus",
microbiome_transform = c("relative", "log", "presence_absence", "clr", "none"),
metabolome_transform = c("log", "none"),
method = c("spearman", "pearson", "sparcc"),
p_adjust_method = "BH",
min_taxa_prevalence = 0,
min_taxa_abundance = 0,
min_metabolite_prevalence = 0,
min_metabolite_sd = 0
)
calculate_correlation_spearman(...)
calculate_correlation_pearson(...)
calculate_correlation_sparcc(...)Arguments
- object
A
microbiome_metabolome_datasetobject.- microbiome_data
A
microbiome_datasetobject. Used whenobjectis not supplied.- metabolome_data
A
mass_datasetobject. Used whenobjectis not supplied.- sample_link
Optional sample link table used when
objectis not supplied.- microbiome_rank
Taxonomy rank for microbiome aggregation.
- microbiome_transform
Microbiome transformation method.
- metabolome_transform
Metabolome transformation method.
- method
Correlation method.
- p_adjust_method
Multiple-testing correction method.
- min_taxa_prevalence
Minimum number of non-zero samples required for a microbiome feature.
- min_taxa_abundance
Minimum mean abundance required for a microbiome feature.
- min_metabolite_prevalence
Minimum number of non-zero samples required for a metabolite.
- min_metabolite_sd
Minimum standard deviation required for a metabolite.
- ...
Additional arguments passed through the convenience wrappers.
Examples
data("demo_crossomics", package = "microbiomedataset")
x <- calculate_correlation(
microbiome_data = demo_crossomics$microbiome_data,
metabolome_data = demo_crossomics$metabolome_data,
sample_link = demo_crossomics$sample_link,
microbiome_rank = "Genus",
metabolome_transform = "none",
method = "spearman"
)
class(x)
#> [1] "microbe_metabolite_association"
#> attr(,"package")
#> [1] "microbiomedataset"
