Functionality for obtaining meta-signatures for a column of interest
getMetaSignatures(
df,
column,
direction = c("BOTH", "UP", "DOWN"),
min.studies = 2,
min.taxa = 5,
comb.fun = sum,
...
)
data.frame
storing BugSigDB data. Typically obtained via
importBugSigDB
.
character. Column of interest. Need to be a valid column name
of df
.
character. Indicates direction of abundance change for signatures
to be included in the computation of meta-signatures. Use "UP"
to restrict
computation to signatures with increased abundance in the exposed group. Use
"DOWN"
to restrict to signatures with decreased abundance in the exposed
group. Defaults to "BOTH"
which will not filter signatures by direction
of abundance change.
integer. Minimum number of studies for a category in column
to be included. Defaults to 2, which will then only compute meta-signatures for
categories investigated by at least two studies.
integer. Minimum size for meta-signatures. Defaults to 5, which will then only include meta-signatures containing at least 5 taxa.
function. Function for combining sample size of the exposed group
and sample size of the unexposed group into an overall study sample size. Defaults
to sum
which will simply add sample sizes of exposed and unexposed group.
additionals argument passed on to getSignatures
.
A list
of meta-signatures, each meta-signature being a named
numeric vector. Names are the taxa of the meta-signature, numeric values
correspond to sample size weights associated with each taxon.
getSignatures
df <- importBugSigDB()
#> Using cached version from 2024-10-30 16:00:33
# Body-site specific meta-signatures composed from signatures reported as both
# increased or decreased across all conditions of study:
bs.meta.sigs <- getMetaSignatures(df, column = "Body site")
# Condition-specific meta-signatures from fecal samples, increased
# in conditions of study. Use taxonomic names instead of the default NCBI IDs:
df.feces <- df[df$`Body site` == "Feces", ]
cond.meta.sigs <- getMetaSignatures(df.feces, column = "Condition",
direction = "UP", tax.id.type = "taxname")
# Inspect the results
names(cond.meta.sigs)
#> [1] "Acute lymphoblastic leukemia"
#> [2] "Age"
#> [3] "Air pollution"
#> [4] "Allergic rhinitis"
#> [5] "Alzheimer's disease"
#> [6] "Anorexia nervosa"
#> [7] "Antimicrobial agent"
#> [8] "Anxiety disorder"
#> [9] "Arthritis"
#> [10] "Asthma"
#> [11] "Atopic eczema"
#> [12] "Attention deficit hyperactivity disorder"
#> [13] "Autism"
#> [14] "Autism spectrum disorder"
#> [15] "Behcet's syndrome"
#> [16] "Bipolar disorder"
#> [17] "Breast cancer"
#> [18] "Breastfeeding duration"
#> [19] "Breed"
#> [20] "COVID-19"
#> [21] "Cervical cancer"
#> [22] "Cesarean section"
#> [23] "Chronic fatigue syndrome"
#> [24] "Chronic kidney disease"
#> [25] "Clinical treatment"
#> [26] "Cognitive impairment"
#> [27] "Colorectal adenoma"
#> [28] "Colorectal cancer"
#> [29] "Colorectal carcinoma"
#> [30] "Crohn's disease"
#> [31] "Delivery method"
#> [32] "Depressive disorder"
#> [33] "Diabetes mellitus"
#> [34] "Diarrhea"
#> [35] "Diet"
#> [36] "Eczema"
#> [37] "Endometriosis"
#> [38] "Environmental exposure measurement"
#> [39] "Epilepsy"
#> [40] "Ethnic group"
#> [41] "Exercise"
#> [42] "Food allergy"
#> [43] "Gastric cancer"
#> [44] "Gestational diabetes"
#> [45] "Graft versus host disease"
#> [46] "Gut microbiome measurement"
#> [47] "HIV infection"
#> [48] "HIV mother to child transmission"
#> [49] "Hashimoto's thyroiditis"
#> [50] "Health study participation"
#> [51] "Hepatocellular carcinoma"
#> [52] "High fat diet"
#> [53] "Hypertension"
#> [54] "Inflammatory bowel disease"
#> [55] "Irritable bowel syndrome"
#> [56] "Ischemic stroke"
#> [57] "Leukemia"
#> [58] "Lung cancer"
#> [59] "Major depressive disorder"
#> [60] "Milk allergic reaction"
#> [61] "Multiple myeloma"
#> [62] "Multiple sclerosis"
#> [63] "Non-Hodgkins lymphoma"
#> [64] "Non-alcoholic fatty liver disease"
#> [65] "Non-alcoholic steatohepatitis"
#> [66] "Obesity"
#> [67] "Pancreatic carcinoma"
#> [68] "Parkinson's disease"
#> [69] "Physical activity"
#> [70] "Polycystic ovary syndrome"
#> [71] "Psoriasis"
#> [72] "Response to allogeneic hematopoietic stem cell transplant"
#> [73] "Response to antiviral drug"
#> [74] "Response to diet"
#> [75] "Response to immunochemotherapy"
#> [76] "Response to transplant"
#> [77] "Rheumatoid arthritis"
#> [78] "Schizophrenia"
#> [79] "Seasonal gut microbiome measurement"
#> [80] "Smoking behavior"
#> [81] "Socioeconomic status"
#> [82] "Stroke"
#> [83] "Treatment"
#> [84] "Type I diabetes mellitus"
#> [85] "Type II diabetes mellitus"
#> [86] "Ulcerative colitis"
#> [87] "Unipolar depression"
#> [88] "Urinary tract infection"
cond.meta.sigs["Bipolar disorder"]
#> $`Bipolar disorder`
#> Flavonifractor Lachnospiraceae Actinomycetota Coriobacteriaceae
#> 0.4412903 0.1509677 0.1019355 0.1019355
#> Coriobacteriales Coriobacteriia
#> 0.1019355 0.1019355
#>