This script plots Figure 1e: Protein-pump inhibitors (PPIs) are linked to an increase gut abundance of oral bacteria specifically by increasing oral-gut transfer, as revealed through strain-level analysis.

The cuneiform plot shows the change in bacterial species abundance in the gut in subjects taking PPIs versus not (controlling for other drugs and demographic factors) in each clinical group separately, and for all subjects pooled together.

Rows marked “SNV” show whether such oral strain markers are significantly (two-sided MWU FDR < 0.1) enriched over gut strain markers in MetaCardis subjects taking PPIs, controlling for abundance of each species.

Marker direction and color denote the sign and value of Cliff’s delta standardized effect size, whereas intensity and size denote amplitude of the effect size; opaque markers are significantly altered (two-sided MWU FDR < 0.1; passing all confounder checks).

Bacteria are shown if their abundance is significantly altered under PPI consumption, and there are SNPs distinguishing oral from gut strains in the Human Microbiome Project dataset.

Required file in the input_data folder:

File contains the information on effect size and statistic of association between the abundance of selected [potentially] oral strains and PPI intake across patient groups.

Load necessary libraries.

library (ggplot2)

Load data file with SNV analysis results.

fileFolder = './input_data/'
data <- read.table (file = paste0(fileFolder, "snps_ppi_input.txt"),
                    sep = "\t", header = T, check.names = F)

Select data to plot: deconfounded features (Status “SD”, “LD”, “NC”) passing the Q-value threshold of 0.1.

subdata <- data
subdata$Support <- (subdata$Status %in% c ("SD", "LD", "NC")) | (subdata$Form == "SNV" & subdata$Q < 0.1)

Assemble the cuneiform plot.

p <- ggplot (subdata, aes (x = Feature, y = paste0 (Test, ": ", Form))) + 
  theme_bw () + 
  geom_point (data = subset (subdata, Support == "TRUE"), 
              aes (fill = D, shape = as.factor (sign (D)), size = abs (D)), 
              color = "#000000", alpha = 1) + 
  geom_point (data = subset (subdata, Support == "FALSE"), 
              aes (fill = D, shape = as.factor (sign (D)), size = abs (D)), 
              color = "#777777", alpha = 0.5) + 
  theme (axis.text.x = element_text (angle = -90, hjust = 0, size = 12, face = "italic"),
         axis.text.y = element_text (size = 12)) + scale_shape_manual (values = c (25, 24)) +
  scale_fill_gradient2 (mid = "white", high = "blue", low = "red", 
                        midpoint = 0, guide = guide_colorbar (raster = F)) + 
  xlab ("") + ylab ("") +
  ggtitle('Proton pump inhibitors')

Display the plot.

print (p)

Unkomment thi section to print plot to a pdf file.

#pdf (file = "fig_1e_snps_ppi.pdf", width = 12, height = 7)
#print (p)
#dev.off ()
sessionInfo()
## R version 3.6.1 (2019-07-05)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 17763)
## 
## Matrix products: default
## 
## locale:
## [1] LC_COLLATE=English_United States.1252 
## [2] LC_CTYPE=English_United States.1252   
## [3] LC_MONETARY=English_United States.1252
## [4] LC_NUMERIC=C                          
## [5] LC_TIME=English_United States.1252    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] ggplot2_3.3.3
## 
## loaded via a namespace (and not attached):
##  [1] highr_0.9         bslib_0.2.4       compiler_3.6.1    pillar_1.6.0     
##  [5] jquerylib_0.1.4   tools_3.6.1       digest_0.6.27     jsonlite_1.7.2   
##  [9] evaluate_0.14     lifecycle_1.0.0   tibble_3.1.0      gtable_0.3.0     
## [13] pkgconfig_2.0.3   rlang_0.4.10      DBI_1.1.1         yaml_2.2.0       
## [17] xfun_0.22         withr_2.4.2       stringr_1.4.0     dplyr_1.0.5      
## [21] knitr_1.33        generics_0.1.0    sass_0.3.1        vctrs_0.3.6      
## [25] grid_3.6.1        tidyselect_1.1.0  glue_1.4.2        R6_2.5.0         
## [29] fansi_0.4.2       rmarkdown_2.7     farver_2.1.0      purrr_0.3.4      
## [33] magrittr_2.0.1    scales_1.1.1      ellipsis_0.3.1    htmltools_0.5.1.1
## [37] assertthat_0.2.1  colorspace_2.0-0  labeling_0.4.2    utf8_1.2.1       
## [41] stringi_1.5.3     munsell_0.5.0     crayon_1.4.1