run_MRPP: Multi-response Permutation Procedures (MRPP)

View source: R/gv_MRPP.R

run_MRPPR Documentation

Multi-response Permutation Procedures (MRPP)

Description

The run_MRPP function is used to identify the association between the community and environmental variables by average distance.

Usage

run_MRPP(
   object,
   level = c(NULL, "Kingdom", "Phylum", "Class",
           "Order", "Family", "Genus",
           "Species", "Strain", "unique"),
   variable,
   method = c("unifrac", "wunifrac", "GUniFrac", "bray", "dpcoa", "jsd"),
   seedNum = 123,
   alpha = 0.5)

Arguments

object

(Required). a phyloseq::phyloseq or SummarizedExperiment::SummarizedExperiment object.

level

(Optional). character. Summarization level (from rank_names(pseq), default: NULL).

variable

(Required). character. grouping variable for test.

method

(Optional). character. Provide one of the currently supported options. See distanceMethodList for a detailed list of the supported options and links to accompanying documentation. Options include:

  • "bray": bray crutis distance.

  • "unifrac" : unweighted UniFrac distance.

  • "wunifrac": weighted-UniFrac distance.

  • "GUniFrac": The variance-adjusted weighted UniFrac distances (default: alpha=0.5).

  • "dpcoa": sample-wise distance used in Double Principle Coordinate Analysis.

  • "jsd": Jensen-Shannon Divergence. Alternatively, you can provide a character string that defines a custom distance method, if it has the form described in designdist (default: "bray").

seedNum

(Optional). numeric. specify seeds for reproduction (default: 123).

alpha

(Optional). numeric. the parameter for "GUniFrac" controlling weight on abundant lineages (default: 0.5).

Details

The run_MRPP function is used to identify the association between the community and environmental variables by average distance, applying the distance in profile and calculating the delta statistic between community and variable by permutation test to determine the significance. It can be applied to both phyloseq::phyloseq and SummarizedExperiment::SummarizedExperiment object.

Value

A MRPP model.

Author(s)

Created by Hua Zou (5/15/2022 Shenzhen China)

References

Mielke Jr, Paul W. "The application of multivariate permutation methods based on distance functions in the earth sciences." Earth-Science Reviews 31.1 (1991): 55-71.

Examples


## Not run: 
# phyloseq object
data("Zeybel_2022_gut")
run_MRPP(Zeybel_2022_gut,
          variable = "LiverFatClass",
          method = "bray")

# SummarizedExperiment object
data("Zeybel_2022_protein")
run_MRPP(Zeybel_2022_protein,
          variable = "LiverFatClass",
          method = "bray")

## End(Not run)


HuaZou/MicrobiomeAnalysis documentation built on May 13, 2024, 11:10 a.m.