Dysbiosis Score Based on Median Community Level Variation
Source:R/dysbiosisMedianCLV.R
dysbiosisMedianCLV.Rd
Dysbiosis Score Based on Median Community Level Variation
Arguments
- x
A phyloseq object
- dist_mat
A distance matrix. Can be output of
phyloseq::distance
orvegan::vegdist
.- reference_samples
Vector of samples to use as reference.
Details
Calculates median variation in a given sample compared to a reference
sample group. Here dysbiosisMedianCLV
will calculate median
variation for a sample compared to a reference sample set. The user
can provide a custom distance matrix. If the user provides a Bray-Curtis
dissimilarity matrix, then the resulting score is comparable to the
dysbiosis score
reported in
Lloyd-Price J, Arze C, Ananthakrishnan AN et al. (2019)
.
References
Lloyd-Price J, Arze C, Ananthakrishnan AN et al. (2019). Multi-omics of the gut microbial ecosystem in inflammatory bowel diseases. Nature, 569(7758), pp.655-662.
Examples
library(dysbiosisR)
# We use WirbelJ_2018 as test data
dist.mat <- phyloseq::distance(WirbelJ_2018, "bray")
ref.samples <- sample_names(subset_samples(WirbelJ_2018,
disease == "healthy"))
db.1 <- dysbiosisMedianCLV(WirbelJ_2018,
dist_mat = dist.mat,
reference_samples = ref.samples)
head(db.1)
#> score study_name subject_id body_site
#> CCMD11006829ST-21-0 0.7698956 WirbelJ_2018 CCMD11006829ST-21-0 stool
#> CCMD12232071ST-21-0 0.7611880 WirbelJ_2018 CCMD12232071ST-21-0 stool
#> CCMD13071240ST-21-0 0.6879019 WirbelJ_2018 CCMD13071240ST-21-0 stool
#> CCMD13934959ST-21-0 0.6536472 WirbelJ_2018 CCMD13934959ST-21-0 stool
#> CCMD14479708ST-21-0 0.6524941 WirbelJ_2018 CCMD14479708ST-21-0 stool
#> CCMD18872694ST-21-0 0.6241206 WirbelJ_2018 CCMD18872694ST-21-0 stool
#> study_condition disease age age_category gender country
#> CCMD11006829ST-21-0 CRC CRC 42 adult female DEU
#> CCMD12232071ST-21-0 CRC CRC 75 senior male DEU
#> CCMD13071240ST-21-0 CRC CRC 66 senior female DEU
#> CCMD13934959ST-21-0 CRC CRC 56 adult male DEU
#> CCMD14479708ST-21-0 CRC CRC 74 senior male DEU
#> CCMD18872694ST-21-0 CRC CRC 63 adult male DEU
#> non_westernized sequencing_platform DNA_extraction_kit
#> CCMD11006829ST-21-0 no IlluminaHiSeq Gnome
#> CCMD12232071ST-21-0 no IlluminaHiSeq Gnome
#> CCMD13071240ST-21-0 no IlluminaHiSeq Gnome
#> CCMD13934959ST-21-0 no IlluminaHiSeq Gnome
#> CCMD14479708ST-21-0 no IlluminaHiSeq Gnome
#> CCMD18872694ST-21-0 no IlluminaHiSeq Gnome
#> PMID number_reads number_bases minimum_read_length
#> CCMD11006829ST-21-0 30936547 83456496 7310970279 45
#> CCMD12232071ST-21-0 30936547 65269931 5370021950 2
#> CCMD13071240ST-21-0 30936547 63427722 5486983593 45
#> CCMD13934959ST-21-0 30936547 36979669 3186342244 45
#> CCMD14479708ST-21-0 30936547 65475493 5637718108 45
#> CCMD18872694ST-21-0 30936547 55300211 4780095276 45
#> median_read_length NCBI_accession curator BMI tnm
#> CCMD11006829ST-21-0 94 <NA> Paolo_Manghi 35 t3n0m0
#> CCMD12232071ST-21-0 88 <NA> Paolo_Manghi 28 t3n2m0
#> CCMD13071240ST-21-0 93 <NA> Paolo_Manghi 23 t3n0m0
#> CCMD13934959ST-21-0 93 <NA> Paolo_Manghi 27 t3n0m0
#> CCMD14479708ST-21-0 92 <NA> Paolo_Manghi 26 t3n0m1
#> CCMD18872694ST-21-0 93 <NA> Paolo_Manghi 25 t3n1m0
#> ajcc nspecies group
#> CCMD11006829ST-21-0 ii 144 case
#> CCMD12232071ST-21-0 iii 110 case
#> CCMD13071240ST-21-0 ii 126 case
#> CCMD13934959ST-21-0 ii 100 case
#> CCMD14479708ST-21-0 iv 110 case
#> CCMD18872694ST-21-0 iii 145 case