Last updated: 2020-10-22

Checks: 6 1

Knit directory: esoph-micro-cancer-workflow/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20200916) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 5b186b4. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    data/

Untracked files:
    Untracked:  analysis/ids_abundance_misc.Rmd

Unstaged changes:
    Modified:   analysis/data_processing_nci_umd.Rmd
    Modified:   analysis/data_processing_tcga.Rmd
    Modified:   code/get_cleaned_data.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


  • Sampling IDs in each dataset with Fusobacterium (genus level) abundance above 0.1%
  • I need to know the relative abundance of Streptococcus sanguinis, Prevotella (genus level), Fusobacterium nucleatum, Camplybactor concisus in the NCI-MD dataset for tumors only.

IDs with Fuso. > .01

NCI Data

# Transform to relative abundance. Save as new object.
ra.dat = transform_sample_counts(phylo.data.nci.umd, function(x){x / sum(x)})
mphyseq = phyloseq::psmelt(ra.dat)
mphyseq <- subset(mphyseq, Abundance > 0.01)

A <- mphyseq %>%
  filter(Genus == "g__Fusobacterium", Abundance > .01)

kable(A[, c("Sample", "Abundance")], style= "html", digits=3) %>%
  kable_styling(full_width = T)
Sample Abundance
205.S2.Jun172016 0.776
71.H10.S94.Jun232016 0.651
74.H03.S87.Jul202017 0.498
73.H04.S88.Jul202017 0.471
16.S38.Jun172016 0.381
204.S1.Jun172016 0.351
156.S42.Jun172016 0.322
173.S66.Jun172016 0.198
135.B06.S18.Jun232016 0.193
114.S41.Jun172016 0.150
97.S45.Jun172016 0.148
1.S37.Jun172016 0.124
158.D06.S42.Jun232016 0.122
174.S76.Jun172016 0.110
124.S93.Jun172016 0.092
27.F09.S69.Jun232016 0.092
175.S88.Jun172016 0.086
55.E03.S51.Jul202017 0.076
46.C04.S28.Jul202017 0.068
24.S92.Jun172016 0.066
87.B01.S13.Jun232016 0.058
127.S6.Jun172016 0.054
103.S58.Jun172016 0.049
38.C09.S33.Jun232016 0.044
186.S77.Jun172016 0.038
112.F02.S62.Jun232016 0.032
167.E05.S53.Jun232016 0.028
81.A02.S2.Jun232016 0.024
199.A11.S11.Jun232016 0.022
172.S65.Jun172016 0.022
130.A02.S2.Jul202017 0.020
104.S23.Jun172016 0.017
113.F01.S61.Jun232016 0.015
128.S5.Jun172016 0.014
234.C07.S31.Jul202017 0.012
179.F01.S61.Jul202017 0.012
184.S61.Jun172016 0.012
139.F07.S67.Jun232016 0.010

TCGA RNAseq

# Transform to relative abundance. Save as new object.
ra.dat = transform_sample_counts(phylo.data.tcga.RNAseq, function(x){x / sum(x)})
mphyseq = phyloseq::psmelt(ra.dat)

A <- mphyseq %>%
  filter(Genus == "Fusobacterium", Abundance > .01)

kable(A[, c("Sample", "Abundance")], style= "html", digits=3) %>%
  kable_styling(full_width = T)
Sample Abundance
TCGA.L5.A4OT.Tumor.RNAseq.71d 0.248
TCGA.LN.A49U.Tumor.RNAseq.450 0.086
TCGA.S8.A6BW.Tumor.RNAseq.802 0.069
TCGA.IG.A50L.Tumor.RNAseq.93f 0.055
TCGA.L7.A56G.Tumor.RNAseq.70a 0.045

TCGA WGS

# Transform to relative abundance. Save as new object.
ra.dat = transform_sample_counts(phylo.data.tcga.WGS, function(x){x / sum(x)})
mphyseq = phyloseq::psmelt(ra.dat)

A <- mphyseq %>%
  filter(Genus == "Fusobacterium", Abundance > .01)

kable(A[, c("Sample", "Abundance")], style= "html", digits=3) %>%
  kable_styling(full_width = T)
Sample Abundance
TCGA.L5.A4OT.Tumor.WGS.7d4 0.484
TCGA.LN.A49U.Tumor.WGS.c07 0.394
TCGA.L5.A4OG.Tumor.WGS.cef 0.385
TCGA.IG.A50L.Tumor.WGS.3e7 0.243
TCGA.LN.A49V.Tumor.WGS.331 0.158
TCGA.L7.A56G.Tumor.WGS.8e8 0.094
TCGA.L5.A4OG.Normal.WGS.963 0.048
TCGA.IG.A3I8.Tumor.WGS.d45 0.045
TCGA.IG.A5S3.Tumor.WGS.736 0.041
TCGA.L5.A4OI.Tumor.WGS.61f 0.036
TCGA.LN.A5U5.Tumor.WGS.d38 0.031
TCGA.L5.A891.Tumor.WGS.6a8 0.025
TCGA.L5.A4OM.Normal.WGS.6cb 0.018
TCGA.IG.A5B8.Tumor.WGS.948 0.013
TCGA.LN.A4MR.Tumor.WGS.6c3 0.012
TCGA.IG.A3I8.Normal.WGS.a07 0.011

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

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] car_3.0-8         carData_3.0-4     gvlma_1.0.0.3     patchwork_1.0.1  
 [5] viridis_0.5.1     viridisLite_0.3.0 gridExtra_2.3     xtable_1.8-4     
 [9] kableExtra_1.1.0  plyr_1.8.6        data.table_1.13.0 readxl_1.3.1     
[13] forcats_0.5.0     stringr_1.4.0     dplyr_1.0.1       purrr_0.3.4      
[17] readr_1.3.1       tidyr_1.1.1       tibble_3.0.3      ggplot2_3.3.2    
[21] tidyverse_1.3.0   lmerTest_3.1-2    lme4_1.1-23       Matrix_1.2-18    
[25] vegan_2.5-6       lattice_0.20-41   permute_0.9-5     phyloseq_1.32.0  
[29] workflowr_1.6.2  

loaded via a namespace (and not attached):
 [1] minqa_1.2.4         colorspace_1.4-1    rio_0.5.16         
 [4] ellipsis_0.3.1      rprojroot_1.3-2     XVector_0.28.0     
 [7] fs_1.5.0            rstudioapi_0.11     fansi_0.4.1        
[10] lubridate_1.7.9     xml2_1.3.2          codetools_0.2-16   
[13] splines_4.0.2       knitr_1.29          ade4_1.7-15        
[16] jsonlite_1.7.0      nloptr_1.2.2.2      broom_0.7.0        
[19] cluster_2.1.0       dbplyr_1.4.4        BiocManager_1.30.10
[22] compiler_4.0.2      httr_1.4.2          backports_1.1.7    
[25] assertthat_0.2.1    cli_2.0.2           later_1.1.0.1      
[28] htmltools_0.5.0     tools_4.0.2         igraph_1.2.5       
[31] gtable_0.3.0        glue_1.4.1          reshape2_1.4.4     
[34] Rcpp_1.0.5          Biobase_2.48.0      cellranger_1.1.0   
[37] vctrs_0.3.2         Biostrings_2.56.0   multtest_2.44.0    
[40] ape_5.4             nlme_3.1-148        iterators_1.0.12   
[43] xfun_0.16           openxlsx_4.1.5      rvest_0.3.6        
[46] lifecycle_0.2.0     statmod_1.4.34      zlibbioc_1.34.0    
[49] MASS_7.3-51.6       scales_1.1.1        hms_0.5.3          
[52] promises_1.1.1      parallel_4.0.2      biomformat_1.16.0  
[55] rhdf5_2.32.2        curl_4.3            yaml_2.2.1         
[58] stringi_1.4.6       highr_0.8           S4Vectors_0.26.1   
[61] foreach_1.5.0       BiocGenerics_0.34.0 zip_2.0.4          
[64] boot_1.3-25         rlang_0.4.7         pkgconfig_2.0.3    
[67] evaluate_0.14       Rhdf5lib_1.10.1     tidyselect_1.1.0   
[70] magrittr_1.5        R6_2.4.1            IRanges_2.22.2     
[73] generics_0.0.2      DBI_1.1.0           foreign_0.8-80     
[76] pillar_1.4.6        haven_2.3.1         withr_2.2.0        
[79] mgcv_1.8-31         abind_1.4-5         survival_3.2-3     
[82] modelr_0.1.8        crayon_1.3.4        rmarkdown_2.3      
[85] grid_4.0.2          blob_1.2.1          git2r_0.27.1       
[88] reprex_0.3.0        digest_0.6.25       webshot_0.5.2      
[91] httpuv_1.5.4        numDeriv_2016.8-1.1 stats4_4.0.2       
[94] munsell_0.5.0