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,
  ...
)

Arguments

df

data.frame storing BugSigDB data. Typically obtained via importBugSigDB.

column

character. Column of interest. Need to be a valid column name of df.

direction

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.

min.studies

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.

min.taxa

integer. Minimum size for meta-signatures. Defaults to 5, which will then only include meta-signatures containing at least 5 taxa.

comb.fun

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.

Value

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.

See also

getSignatures

Examples

 df <- importBugSigDB()
#> Using cached version from 2026-04-29 20:00:10

 # 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 graft vs. host disease"                             
#>   [2] "Acute lymphoblastic leukemia"                             
#>   [3] "Age"                                                      
#>   [4] "Age-related macular degeneration"                         
#>   [5] "Air pollution"                                            
#>   [6] "Alcohol drinking"                                         
#>   [7] "Allergic rhinitis"                                        
#>   [8] "Alzheimer's disease"                                      
#>   [9] "Anemia"                                                   
#>  [10] "Antimicrobial agent"                                      
#>  [11] "Anxiety disorder"                                         
#>  [12] "Aspartate aminotransferase measurement"                   
#>  [13] "Asthma"                                                   
#>  [14] "Atopic eczema"                                            
#>  [15] "Attention deficit hyperactivity disorder"                 
#>  [16] "Attention deficit-hyperactivity disorder"                 
#>  [17] "Autism"                                                   
#>  [18] "Autism spectrum disorder"                                 
#>  [19] "Autoimmune disease"                                       
#>  [20] "Autoimmune type 1 diabetes"                               
#>  [21] "Biliary atresia"                                          
#>  [22] "Bipolar disorder"                                         
#>  [23] "Body fat percentage"                                      
#>  [24] "Body mass index"                                          
#>  [25] "Body weight"                                              
#>  [26] "Breast cancer"                                            
#>  [27] "Breastfeeding duration"                                   
#>  [28] "COVID-19"                                                 
#>  [29] "Cervical cancer"                                          
#>  [30] "Cesarean section"                                         
#>  [31] "Chronic constipation"                                     
#>  [32] "Chronic fatigue syndrome"                                 
#>  [33] "Chronic kidney disease"                                   
#>  [34] "Clinical treatment"                                       
#>  [35] "Clostridium difficile infection"                          
#>  [36] "Cognitive impairment"                                     
#>  [37] "Colitis"                                                  
#>  [38] "Colorectal adenoma"                                       
#>  [39] "Colorectal cancer"                                        
#>  [40] "Colorectal carcinoma"                                     
#>  [41] "Constipation"                                             
#>  [42] "Crohn's disease"                                          
#>  [43] "Delivery method"                                          
#>  [44] "Depressive disorder"                                      
#>  [45] "Diabetes mellitus"                                        
#>  [46] "Diabetic nephropathy"                                     
#>  [47] "Diabetic neuropathy"                                      
#>  [48] "Diabetic retinopathy"                                     
#>  [49] "Diarrhea"                                                 
#>  [50] "Diet"                                                     
#>  [51] "Diet measurement"                                         
#>  [52] "Eczema"                                                   
#>  [53] "Endometriosis"                                            
#>  [54] "Environmental exposure measurement"                       
#>  [55] "Environmental factor"                                     
#>  [56] "Epilepsy"                                                 
#>  [57] "Estradiol measurement"                                    
#>  [58] "Ethnic group"                                             
#>  [59] "Exercise"                                                 
#>  [60] "Food allergy"                                             
#>  [61] "Gastric adenocarcinoma"                                   
#>  [62] "Gastric cancer"                                           
#>  [63] "Gestational diabetes"                                     
#>  [64] "Glucose tolerance test"                                   
#>  [65] "Graft versus host disease"                                
#>  [66] "HIV infection"                                            
#>  [67] "Health study participation"                               
#>  [68] "Hepatocellular carcinoma"                                 
#>  [69] "High fat diet"                                            
#>  [70] "Human immunodeficiency virus"                             
#>  [71] "Hypertension"                                             
#>  [72] "Inflammatory bowel disease"                               
#>  [73] "Iron deficiency anemia"                                   
#>  [74] "Irritable bowel syndrome"                                 
#>  [75] "Ischemic stroke"                                          
#>  [76] "Leukemia"                                                 
#>  [77] "Lifestyle measurement"                                    
#>  [78] "Low density lipoprotein cholesterol measurement"          
#>  [79] "Lung cancer"                                              
#>  [80] "Major depressive disorder"                                
#>  [81] "Metastatic colorectal cancer"                             
#>  [82] "Milk allergic reaction"                                   
#>  [83] "Multiple myeloma"                                         
#>  [84] "Multiple sclerosis"                                       
#>  [85] "Non-Hodgkins lymphoma"                                    
#>  [86] "Non-alcoholic fatty liver disease"                        
#>  [87] "Non-alcoholic steatohepatitis"                            
#>  [88] "Obesity"                                                  
#>  [89] "Pancreatic carcinoma"                                     
#>  [90] "Parkinson's disease"                                      
#>  [91] "Physical activity"                                        
#>  [92] "Polycystic ovary syndrome"                                
#>  [93] "Population"                                               
#>  [94] "Prediabetes syndrome"                                     
#>  [95] "Psoriasis"                                                
#>  [96] "Reproductive behaviour measurement"                       
#>  [97] "Response to allogeneic hematopoietic stem cell transplant"
#>  [98] "Response to antibiotic"                                   
#>  [99] "Response to antiviral drug"                               
#> [100] "Response to diet"                                         
#> [101] "Response to immunochemotherapy"                           
#> [102] "Response to ketogenic diet"                               
#> [103] "Response to metformin"                                    
#> [104] "Response to transplant"                                   
#> [105] "Rheumatoid arthritis"                                     
#> [106] "Sampling time"                                            
#> [107] "Schizophrenia"                                            
#> [108] "Seasonality measurement"                                  
#> [109] "Socioeconomic status"                                     
#> [110] "Stroke"                                                   
#> [111] "Total cholesterol measurement"                            
#> [112] "Traditional Chinese medicine type"                        
#> [113] "Transplant outcome measurement"                           
#> [114] "Treatment"                                                
#> [115] "Type I diabetes mellitus"                                 
#> [116] "Type II diabetes mellitus"                                
#> [117] "Ulcerative colitis"                                       
#> [118] "Unipolar depression"                                      
 cond.meta.sigs["Bipolar disorder"]
#> $`Bipolar disorder`
#>                  Lactobacillales                 Streptococcaceae 
#>                      0.031597774                      0.031597774 
#>                    Streptococcus                     Bacteroidota 
#>                      0.031597774                      0.030206677 
#>            Bilophila wadsworthia       Dialister histaminiformans 
#>                      0.030206677                      0.030206677 
#>                Leyella stercorea             Megamonas funiformis 
#>                      0.030206677                      0.030206677 
#>           Oxalobacter formigenes       Parabacteroides distasonis 
#>                      0.030206677                      0.030206677 
#> Parasutterella excrementihominis             Phocaeicola plebeius 
#>                      0.030206677                      0.030206677 
#>          [Clostridium] symbiosum                      Actinomyces 
#>                      0.030206677                      0.023251192 
#>                 Actinomycetaceae                  Actinomycetales 
#>                      0.023251192                      0.023251192 
#>                   Alcaligenaceae                      Bacillaceae 
#>                      0.023251192                      0.023251192 
#>                          Bacilli                         Bacillus 
#>                      0.023251192                      0.023251192 
#>               Corynebacteriaceae                  Corynebacterium 
#>                      0.023251192                      0.023251192 
#>                            Dorea                 Enterobacterales 
#>                      0.023251192                      0.023251192 
#>              Gammaproteobacteria          Lacticaseibacillus zeae 
#>                      0.023251192                      0.023251192 
#>                    Peptoniphilus            Phascolarctobacterium 
#>                      0.023251192                      0.023251192 
#>                       Sutterella                  Veillonellaceae 
#>                      0.023251192                      0.023251192 
#>                 Lactobacillaceae                    Lactobacillus 
#>                      0.008346582                      0.008346582 
#>        Acidaminococcus intestini          Acinetobacter baumannii 
#>                      0.007352941                      0.007352941 
#>          Acinetobacter johnsonii     Acinetobacter radioresistens 
#>                      0.007352941                      0.007352941 
#>           Anaerococcus vaginalis               Citrobacter koseri 
#>                      0.007352941                      0.007352941 
#>              Desulfovibrio piger          Enterococcus gallinarum 
#>                      0.007352941                      0.007352941 
#>                Erwinia amylovora                 Escherichia coli 
#>                      0.007352941                      0.007352941 
#>           Escherichia fergusonii          Fusobacterium nucleatum 
#>                      0.007352941                      0.007352941 
#>             Fusobacterium varium      Limosilactobacillus mucosae 
#>                      0.007352941                      0.007352941 
#>            Porphyromonas uenonis                 Prevotella amnii 
#>                      0.007352941                      0.007352941 
#>                Proteus mirabilis             Providencia rettgeri 
#>                      0.007352941                      0.007352941 
#>              Salmonella enterica          Shewanella putrefaciens 
#>                      0.007352941                      0.007352941 
#>                  Shigella boydii                Shigella flexneri 
#>                      0.007352941                      0.007352941 
#>                  Shigella sonnei             Sodalis glossinidius 
#>                      0.007352941                      0.007352941 
#>                  Vibrio cholerae          Yersinia enterocolitica 
#>                      0.007352941                      0.007352941 
#>