Last updated: 2021-01-14
Checks: 7 0
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.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
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 e6b4c7f. 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/
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.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/data-check-for-RNAscope.Rmd
) and HTML (docs/data-check-for-RNAscope.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | e6b4c7f | noah-padgett | 2021-01-14 | meeting update |
html | e6b4c7f | noah-padgett | 2021-01-14 | meeting update |
The goal here is to double check that there is indeed no microbiome data for those samples that say N/A
. To help with this, I recoded the N/A
values from the excel sheet to -999
so that R
’s internal NA system doesn’t confuse us.
# melt data down for use
dat.16s <- psmelt(phylo.data.nci.umd)
# subset to fuso. nuc. only
# Streptococcus sanguinis
# Campylobacter concisus
# Prevotella spp.
dat.16s <- filter(
dat.16s,
OTU %in% c(
"Fusobacterium_nucleatum",
unique(dat.16s$OTU[dat.16s$OTU %like% "Streptococcus_"]),
unique(dat.16s$OTU[dat.16s$OTU %like% "Campylobacter_"]),
"Prevotella_melaninogenica")
)
# rename bacteria
dat.16s$OTU <- factor(
dat.16s$OTU,
levels = c(
"Fusobacterium_nucleatum",
"Streptococcus_dentisani:Streptococcus_infantis:Streptococcus_mitis:Streptococcus_oligofermentans:Streptococcus_oralis:Streptococcus_pneumoniae:Streptococcus_pseudopneumoniae:Streptococcus_sanguinis",
"Campylobacter_rectus:Campylobacter_showae",
"Prevotella_melaninogenica"
),
labels = c(
"Fusobacterium_nucleatum",
"Streptococcus_spp.",
"Campylobacter_concisus",
"Prevotella_melaninogenica"
)
)
# make tumor vs normal variable
dat.16s$tumor.cat <- factor(dat.16s$tissue, levels=c("BO", "N", "T"), labels = c("Non-Tumor", "Non-Tumor", "Tumor"))
# relabel as (0/1) for analysis
dat.16s$tumor <- as.numeric(factor(dat.16s$tissue, levels=c("BO", "N", "T"), labels = c("Non-Tumor", "Non-Tumor", "Tumor"))) - 1
# presence- absence
dat.16s$pres <- ifelse(dat.16s$Abundance > 0, 1, 0)
dat.16s$pres[is.na(dat.16s$pres)] <- 0
# make wide
dat.16s2 <- dat.16s %>%
pivot_wider(
id_cols = c(Sample, accession.number, tissue, tumor.cat),
names_from = OTU,
values_from = Abundance
) %>%
mutate(
Accession = accession.number
)
dat.16s2 <- dat.16s2[, c(1,2,3,6)]
colnames(dat.16s2) <- c("Sample", "Accession", "Tissue", "Fusobacterium_nucleatum_biomfile")
# data from scope
dat.scope <- readxl::read_xlsx("data/EAC tumors for RNAscope.xlsx", sheet = 2)
dat.scope$Fusobacterium_nucleatum[is.na(dat.scope$Fusobacterium_nucleatum)] <- -999
dat.scope <- dat.scope[, c(1,2,16, 19)]
colnames(dat.scope) <- c("Accession", "Tissue", "Fusobacterium_nucleatum_RNAscopefile", "BLACKLINE")
# merge the two files together to see (non)overlap of -999 to NA
dat.16s3 <- full_join(dat.16s2, dat.scope, keep=T)
Joining, by = c("Accession", "Tissue")
dat.16s3 %>%
arrange(-desc(Accession.x)) %>%
kable(format="html", digits=2)%>%
kable_styling(full_width = T)%>%
scroll_box(width = "100%", height = "500px")
Sample | Accession.x | Tissue.x | Fusobacterium_nucleatum_biomfile | Accession.y | Tissue.y | Fusobacterium_nucleatum_RNAscopefile | BLACKLINE |
---|---|---|---|---|---|---|---|
18.S35.Jun172016 | 10147 | N | 0 | NA | NA | NA | NA |
7.A08.S8.Jul202017 | 10153 | N | 0 | NA | NA | NA | NA |
17.S14.Jun172016 | 10215 | N | 0 | NA | NA | NA | NA |
4.S13.Jun172016 | 10215 | T | 0 | NA | NA | NA | NA |
11.B08.S20.Jun232016 | 10245 | N | 0 | NA | NA | NA | NA |
5.S4.Jun172016 | 11049 | N | 1 | NA | NA | NA | NA |
2.S16.Jun172016 | 11049 | T | 2 | NA | NA | NA | NA |
19.S25.Jun172016 | 11229 | N | 2 | NA | NA | NA | NA |
8.S8.Jun172016 | 11267 | T | 0 | 11267 | T | 0.0 | Above |
16.S38.Jun172016 | 11271 | T | 190 | 11271 | T | 37.2 | Above |
1.S37.Jun172016 | 11271 | N | 62 | NA | NA | NA | NA |
13.S20.Jun172016 | 11362 | N | 0 | NA | NA | NA | NA |
20.A09.S9.Jun232016 | 11394 | N | 0 | NA | NA | NA | NA |
6.A10.S10.Jun232016 | 11394 | T | 0 | NA | NA | NA | NA |
26.H04.S88.Jun232016 | 11639 | N | 0 | NA | NA | NA | NA |
28.S87.Jun172016 | 11677 | N | 0 | NA | NA | NA | NA |
42.A04.S4.Jul202017 | 11738 | T | 4 | NA | NA | NA | NA |
35.A03.S3.Jul202017 | 11738 | N | 0 | NA | NA | NA | NA |
43.S49.Jun172016 | 11743 | T | 0 | NA | NA | NA | NA |
29.S31.Jun172016 | 11816 | N | 0 | NA | NA | NA | NA |
37.S32.Jun172016 | 11816 | T | 0 | NA | NA | NA | NA |
38.C09.S33.Jun232016 | 11833 | T | 28 | NA | NA | NA | NA |
34.C10.S34.Jun232016 | 11833 | N | 0 | NA | NA | NA | NA |
46.C04.S28.Jul202017 | 11839 | T | 37 | NA | NA | NA | NA |
25.C03.S27.Jul202017 | 11839 | N | 4 | NA | NA | NA | NA |
48.S43.Jun172016 | 11949 | T | 0 | 11949 | T | 0.0 | Above |
47.S44.Jun172016 | 11949 | N | 0 | NA | NA | NA | NA |
239.D09.S45.Jun232016 | 11952 | BO | 0 | 11952 | BO | 0.0 | Above |
49.S47.Jun172016 | 11987 | N | 0 | NA | NA | NA | NA |
23.S75.Jun172016 | 12023 | T | 5 | NA | NA | NA | NA |
22.C07.S31.Jun232016 | 12262 | N | 1 | NA | NA | NA | NA |
31.C08.S32.Jun232016 | 12262 | T | 5 | NA | NA | NA | NA |
50.S56.Jun172016 | 12291 | N | 0 | NA | NA | NA | NA |
51.S55.Jun172016 | 12291 | T | 0 | 12291 | T | -999.0 | Below |
51.S55.Jun172016 | 12291 | T | 0 | 12291 | T | -999.0 | Below |
53.E09.S57.Jun232016 | 12306 | T | 0 | 12306 | T | 0.0 | Above |
52.E10.S58.Jun232016 | 12306 | N | 0 | NA | NA | NA | NA |
54.G11.S83.Jul202017 | 12328 | N | 0 | NA | NA | NA | NA |
55.E03.S51.Jul202017 | 12460 | T | 42 | NA | NA | NA | NA |
57.S68.Jun172016 | 12631 | N | 0 | NA | NA | NA | NA |
58.S67.Jun172016 | 12631 | T | 2 | NA | NA | NA | NA |
59.S72.Jun172016 | 12637 | N | 1 | NA | NA | NA | NA |
27.F09.S69.Jun232016 | 12672 | N | 53 | NA | NA | NA | NA |
32.S52.Jun172016 | 12672 | T | 0 | 12672 | T | 0.0 | Above |
60.C10.S34.Jul202017 | 12705 | N | 0 | NA | NA | NA | NA |
62.G10.S82.Jun232016 | 12733 | T | 1 | 12733 | T | -999.0 | Below |
61.G09.S81.Jun232016 | 12733 | N | 0 | NA | NA | NA | NA |
36.F04.S64.Jul202017 | 12758 | T | 4 | NA | NA | NA | NA |
33.F03.S63.Jul202017 | 12758 | N | 0 | NA | NA | NA | NA |
226.S50.Jun172016 | 12767 | BO | 0 | 12767 | BO | 0.0 | Above |
229.S79.Jun172016 | 12779 | T | 0 | NA | NA | NA | NA |
63.D03.S39.Jul202017 | 12779 | N | 0 | NA | NA | NA | NA |
66.G04.S76.Jul202017 | 12841 | T | 0 | 12841 | T | -999.0 | Below |
67.D10.S46.Jul202017 | 12897 | N | 1 | NA | NA | NA | NA |
24.S92.Jun172016 | 12936 | T | 30 | NA | NA | NA | NA |
68.S91.Jun172016 | 12936 | N | 0 | NA | NA | NA | NA |
71.H10.S94.Jun232016 | 12944 | T | 330 | NA | NA | NA | NA |
70.H09.S93.Jun232016 | 12944 | N | 0 | NA | NA | NA | NA |
74.H03.S87.Jul202017 | 13008 | T | 236 | 13008 | T | 32.2 | Above |
73.H04.S88.Jul202017 | 13008 | N | 224 | NA | NA | NA | NA |
77.S10.Jun172016 | 13103 | N | 2 | NA | NA | NA | NA |
79.S3.Jun172016 | 13128 | T | 0 | NA | NA | NA | NA |
81.A02.S2.Jun232016 | 13202 | T | 15 | NA | NA | NA | NA |
80.A01.S1.Jun232016 | 13202 | N | 1 | NA | NA | NA | NA |
83.A06.S6.Jul202017 | 13211 | T | 0 | NA | NA | NA | NA |
82.A05.S5.Jul202017 | 13211 | N | 0 | NA | NA | NA | NA |
84.S22.Jun172016 | 13220 | N | 0 | NA | NA | NA | NA |
86.B02.S14.Jun232016 | 13266 | N | 4 | NA | NA | NA | NA |
87.B01.S13.Jun232016 | 13266 | T | 21 | NA | NA | NA | NA |
88.B05.S17.Jul202017 | 13270 | N | 0 | NA | NA | NA | NA |
89.B06.S18.Jul202017 | 13270 | T | 0 | 13270 | T | 0.0 | Above |
90.S33.Jun172016 | 13318 | N | 0 | NA | NA | NA | NA |
95.C06.S30.Jul202017 | 13367 | T | 0 | NA | NA | NA | NA |
97.S45.Jun172016 | 13406 | T | 80 | NA | NA | NA | NA |
96.S46.Jun172016 | 13406 | N | 3 | NA | NA | NA | NA |
99.D01.S37.Jun232016 | 13430 | T | 0 | NA | NA | NA | NA |
98.D02.S38.Jun232016 | 13430 | N | 0 | NA | NA | NA | NA |
100.D06.S42.Jul202017 | 13460 | N | 0 | NA | NA | NA | NA |
102.S57.Jun172016 | 13462 | N | 1 | NA | NA | NA | NA |
103.S58.Jun172016 | 13462 | T | 19 | NA | NA | NA | NA |
104.S23.Jun172016 | 13523 | N | 12 | NA | NA | NA | NA |
106.E02.S50.Jun232016 | 13553 | T | 0 | 13553 | T | 0.0 | Above |
106.E02.S50.Jun232016 | 13553 | T | 0 | 13553 | T | 0.0 | Below |
108.E06.S54.Jul202017 | 13622 | BO | 6 | 13622 | BO | 0.0 | Above |
110.S69.Jun172016 | 13658 | T | 0 | NA | NA | NA | NA |
109.S70.Jun172016 | 13658 | N | 1 | NA | NA | NA | NA |
112.F02.S62.Jun232016 | 13702 | N | 24 | NA | NA | NA | NA |
113.F01.S61.Jun232016 | 13702 | T | 6 | 13702 | T | 0.0 | Above |
118.S82.Jun172016 | 13850 | T | 0 | NA | NA | NA | NA |
234.C07.S31.Jul202017 | 13922 | BO | 4 | 13922 | BO | 0.8 | Above |
119.G01.S73.Jun232016 | 13927 | N | 0 | NA | NA | NA | NA |
121.G05.S77.Jul202017 | 13987 | N | 0 | NA | NA | NA | NA |
124.S93.Jun172016 | 14033 | T | 38 | NA | NA | NA | NA |
125.H06.S90.Jul202017 | 14066 | N | 0 | NA | NA | NA | NA |
128.S5.Jun172016 | 14081 | T | 11 | NA | NA | NA | NA |
127.S6.Jun172016 | 14081 | N | 22 | NA | NA | NA | NA |
130.A02.S2.Jul202017 | 14130 | T | 9 | NA | NA | NA | NA |
129.A01.S1.Jul202017 | 14130 | N | 0 | NA | NA | NA | NA |
131.S62.Jun172016 | 14146 | T | 3 | NA | NA | NA | NA |
134.F11.S71.Jun172016 | 14378 | T | 0 | NA | NA | NA | NA |
135.B06.S18.Jun232016 | 14403 | N | 92 | NA | NA | NA | NA |
137.F09.S69.Jul202017 | 14423 | N | 0 | NA | NA | NA | NA |
139.F07.S67.Jun232016 | 14466 | N | 10 | NA | NA | NA | NA |
140.B02.S14.Jul202017 | 14495 | N | 1 | NA | NA | NA | NA |
142.E08.S56.Jul202017 | 14510 | N | 0 | NA | NA | NA | NA |
143.G08.S80.Jul202017 | 14523 | N | 0 | NA | NA | NA | NA |
146.S29.Jun172016 | 14717 | N | 1 | NA | NA | NA | NA |
148.S30.Jun172016 | 14717 | T | 0 | NA | NA | NA | NA |
145.D09.S45.Jul202017 | 14751 | T | 0 | NA | NA | NA | NA |
150.C06.S30.Jun232016 | 14827 | T | 3 | NA | NA | NA | NA |
149.C05.S29.Jun232016 | 14827 | N | 0 | NA | NA | NA | NA |
151.E03.S51.Jun232016 | 15180 | N | 0 | NA | NA | NA | NA |
152.H07.S91.Jun232016 | 15232 | T | 0 | NA | NA | NA | NA |
154.C02.S26.Jul202017 | 15239 | T | 4 | 15239 | T | 0.8 | Above |
155.C09.S33.Jul202017 | 15501 | T | 1 | NA | NA | NA | NA |
114.S41.Jun172016 | 15707 | N | 72 | NA | NA | NA | NA |
156.S42.Jun172016 | 15707 | T | 168 | NA | NA | NA | NA |
157.D05.S41.Jun232016 | 15725 | N | 2 | NA | NA | NA | NA |
158.D06.S42.Jun232016 | 15725 | T | 70 | NA | NA | NA | NA |
159.B10.S22.Jul202017 | 15752 | T | 6 | NA | NA | NA | NA |
160.E04.S52.Jun232016 | 15770 | N | 0 | NA | NA | NA | NA |
162.G04.S76.Jun232016 | 15876 | N | 1 | NA | NA | NA | NA |
165.S54.Jun172016 | 16210 | T | 0 | NA | NA | NA | NA |
167.E05.S53.Jun232016 | 16243 | T | 19 | 16243 | T | 0.0 | Below |
166.E06.S54.Jun232016 | 16243 | N | 1 | NA | NA | NA | NA |
168.S59.Jun172016 | 16418 | N | 3 | NA | NA | NA | NA |
170.E02.S50.Jul202017 | 16549 | N | 0 | NA | NA | NA | NA |
173.S66.Jun172016 | 16590 | T | 97 | NA | NA | NA | NA |
172.S65.Jun172016 | 16590 | N | 11 | NA | NA | NA | NA |
174.S76.Jun172016 | 16592 | N | 61 | NA | NA | NA | NA |
175.S88.Jun172016 | 16592 | T | 39 | 16592 | T | 7.6 | Above |
175.S88.Jun172016 | 16592 | T | 39 | 16592 | T | 7.6 | Below |
176.H07.S91.Jul202017 | 16608 | N | 0 | NA | NA | NA | NA |
179.F01.S61.Jul202017 | 16736 | T | 12 | NA | NA | NA | NA |
178.F02.S62.Jul202017 | 16736 | N | 0 | NA | NA | NA | NA |
181.D02.S38.Jul202017 | 16745 | T | 0 | NA | NA | NA | NA |
227.S74.Jun172016 | 16745 | N | 1 | NA | NA | NA | NA |
184.S61.Jun172016 | 16981 | N | 5 | NA | NA | NA | NA |
185.G08.S80.Jun232016 | 17002 | N | 0 | NA | NA | NA | NA |
186.S77.Jun172016 | 17206 | N | 21 | NA | NA | NA | NA |
187.S78.Jun172016 | 17206 | T | 0 | 17206 | T | 0.0 | Below |
189.G05.S77.Jun232016 | 17223 | T | 0 | 17223 | T | -999.0 | Below |
188.G06.S78.Jun232016 | 17223 | N | 1 | NA | NA | NA | NA |
191.G02.S74.Jul202017 | 17285 | T | 4 | NA | NA | NA | NA |
190.G01.S73.Jul202017 | 17285 | N | 0 | NA | NA | NA | NA |
194.H05.S89.Jun232016 | 17304 | N | 0 | NA | NA | NA | NA |
195.H06.S90.Jun232016 | 17304 | T | 0 | 17304 | T | 0.0 | Above |
196.D08.S44.Jun232016 | 17353 | N | 0 | NA | NA | NA | NA |
197.G07.S79.Jul202017 | 17435 | N | 0 | NA | NA | NA | NA |
198.F03.S63.Jun232016 | 17493 | N | 0 | NA | NA | NA | NA |
199.A11.S11.Jun232016 | 17512 | N | 11 | NA | NA | NA | NA |
200.S96.Jun172016 | 17525 | N | 0 | NA | NA | NA | NA |
201.H02.S86.Jun242016 | 17525 | T | 0 | NA | NA | NA | NA |
202.D07.S43.Jul202017 | 17606 | N | 0 | NA | NA | NA | NA |
205.S2.Jun172016 | 17683 | T | 385 | 17683 | T | 0.0 | Below |
204.S1.Jun172016 | 17683 | N | 159 | NA | NA | NA | NA |
206.S51.Jun172016 | 17698 | N | 0 | NA | NA | NA | NA |
233.G07.S79.Jun232016 | 17799 | BO | 5 | 17799 | BO | 0.4 | Above |
208.D03.S39.Jun232016 | 17842 | N | 1 | NA | NA | NA | NA |
211.A07.S7.Jun232016 | 17918 | N | 0 | NA | NA | NA | NA |
212.A08.S8.Jun232016 | 17918 | T | 0 | 17918 | T | 0.0 | Above |
NA | NA | NA | NA | 13732 | BO | -999.0 | Above |
NA | NA | NA | NA | 16555 | BO | -999.0 | Above |
NA | NA | NA | NA | 16976 | BO | -999.0 | Above |
NA | NA | NA | NA | 11802 | BO | -999.0 | Above |
NA | NA | NA | NA | 14130 | BO | -999.0 | Above |
NA | NA | NA | NA | 11267 | NT | -999.0 | Above |
NA | NA | NA | NA | 11271 | NT | -999.0 | Above |
NA | NA | NA | NA | 11455 | NT | -999.0 | Above |
NA | NA | NA | NA | 11455 | T | -999.0 | Above |
NA | NA | NA | NA | 11949 | NT | -999.0 | Above |
NA | NA | NA | NA | 12306 | NT | -999.0 | Above |
NA | NA | NA | NA | 12672 | NT | -999.0 | Above |
NA | NA | NA | NA | 13008 | NT | -999.0 | Above |
NA | NA | NA | NA | 13103 | NT | -999.0 | Above |
NA | NA | NA | NA | 13103 | T | -999.0 | Above |
NA | NA | NA | NA | 13270 | NT | -999.0 | Above |
NA | NA | NA | NA | 13318 | NT | -999.0 | Above |
NA | NA | NA | NA | 13318 | T | -999.0 | Above |
NA | NA | NA | NA | 13553 | NT | -999.0 | Above |
NA | NA | NA | NA | 13702 | NT | -999.0 | Above |
NA | NA | NA | NA | 13927 | NT | -999.0 | Above |
NA | NA | NA | NA | 13927 | T | -999.0 | Above |
NA | NA | NA | NA | 14719 | NT | -999.0 | Above |
NA | NA | NA | NA | 14719 | T | -999.0 | Above |
NA | NA | NA | NA | 15180 | NT | -999.0 | Above |
NA | NA | NA | NA | 15180 | T | -999.0 | Above |
NA | NA | NA | NA | 15239 | NT | -999.0 | Above |
NA | NA | NA | NA | 16034 | NT | -999.0 | Above |
NA | NA | NA | NA | 16034 | T | -999.0 | Above |
NA | NA | NA | NA | 16592 | NT | -999.0 | Above |
NA | NA | NA | NA | 17304 | NT | -999.0 | Above |
NA | NA | NA | NA | 17918 | NT | -999.0 | Above |
NA | NA | NA | NA | 13553 | NT | -999.0 | Below |
NA | NA | NA | NA | 12733 | NT | -999.0 | Below |
NA | NA | NA | NA | 12291 | NT | -999.0 | Below |
NA | NA | NA | NA | 12291 | NT | -999.0 | Below |
NA | NA | NA | NA | 12841 | NT | -999.0 | Below |
NA | NA | NA | NA | 12997 | NT | -999.0 | Below |
NA | NA | NA | NA | 12997 | T | -999.0 | Below |
NA | NA | NA | NA | 13103 | NT | -999.0 | Below |
NA | NA | NA | NA | 13103 | T | -999.0 | Below |
NA | NA | NA | NA | 16243 | NT | 0.2 | Below |
NA | NA | NA | NA | 16592 | NT | 0.0 | Below |
NA | NA | NA | NA | 16642 | NT | 0.0 | Below |
NA | NA | NA | NA | 16642 | T | 76.6 | Below |
NA | NA | NA | NA | 17206 | NT | -999.0 | Below |
NA | NA | NA | NA | 17223 | NT | 0.0 | Below |
NA | NA | NA | NA | 17683 | NT | -999.0 | Below |
This is to double check how the .biom file was in read. It appears as nearly all NA values from the
meta.data <- read_excel(
"data/NCI-UMD/UMD Esoph dataset from EB_2019_08_06_AV edits.xlsx",
sheet = "FOR STATA"
)
# subset to unique "sample ids
meta.data <- meta.data %>% distinct(`Sample ID`, .keep_all = T)
#read_xlsx("data/NCI-UMD/NCI_UMD_metadata_2020_09_17.xlsx")
# change "_" in sampleid to "." to match .biome file
meta.data$sampleid <- meta.data$`Sample ID`
meta.data$ID <- stringr::str_replace_all(meta.data$sampleid, "_", ".")
# get microbiome data
biom.file <- import_biom("data/NCI-UMD/otu_table_even500.biom")
tree.file <- read_tree("data/NCI-UMD/reps_even500.tre")
# create phyloseq object
meta <- sample_data(meta.data)
sample_names(meta) <- meta.data$ID
# update otu table to include "zeros" for non-found samples
phylo.data0 <- merge_phyloseq(biom.file, tree.file, meta)
dat.16s.raw <- psmelt(phylo.data0)
dat.16s.raw <- filter(dat.16s.raw, OTU == "Fusobacterium_nucleatum")
dat.16s.raw <- dat.16s.raw %>% select(Sample, accession.number, tissue, Abundance)
colnames(dat.16s.raw) <- c("Sample", "Accession", "Tissue", "Fusobacterium_nucleatum_biomfile")
# scope data
dat.scope <- readxl::read_xlsx("data/EAC tumors for RNAscope.xlsx", sheet = 2)
dat.scope$Fusobacterium_nucleatum[is.na(dat.scope$Fusobacterium_nucleatum)] <- -999
dat.scope <- dat.scope[, c(1,2,16, 19)]
colnames(dat.scope) <- c("Accession", "Tissue", "Fusobacterium_nucleatum_RNAscopefile", "BLACKLINE")
# merge with the "scope data"
dat.16s.raw2 <- full_join(dat.16s.raw, dat.scope, keep = T)
Joining, by = c("Accession", "Tissue")
dat.16s.raw2 %>%
arrange(-desc(Accession.x)) %>%
kable(format="html", digits=2)%>%
kable_styling(full_width = T)%>%
scroll_box(width = "100%", height = "500px")
Sample | Accession.x | Tissue.x | Fusobacterium_nucleatum_biomfile | Accession.y | Tissue.y | Fusobacterium_nucleatum_RNAscopefile | BLACKLINE |
---|---|---|---|---|---|---|---|
18.S35.Jun172016 | 10147 | N | 0 | NA | NA | NA | NA |
7.A08.S8.Jul202017 | 10153 | N | 0 | NA | NA | NA | NA |
4.S13.Jun172016 | 10215 | T | 0 | NA | NA | NA | NA |
17.S14.Jun172016 | 10215 | N | 0 | NA | NA | NA | NA |
11.B08.S20.Jun232016 | 10245 | N | 0 | NA | NA | NA | NA |
2.S16.Jun172016 | 11049 | T | 2 | NA | NA | NA | NA |
5.S4.Jun172016 | 11049 | N | 0 | NA | NA | NA | NA |
19.S25.Jun172016 | 11229 | N | 0 | NA | NA | NA | NA |
8.S8.Jun172016 | 11267 | T | 0 | 11267 | T | 0.0 | Above |
16.S38.Jun172016 | 11271 | T | 186 | 11271 | T | 37.2 | Above |
1.S37.Jun172016 | 11271 | N | 41 | NA | NA | NA | NA |
13.S20.Jun172016 | 11362 | N | 0 | NA | NA | NA | NA |
20.A09.S9.Jun232016 | 11394 | N | 0 | NA | NA | NA | NA |
6.A10.S10.Jun232016 | 11394 | T | 0 | NA | NA | NA | NA |
26.H04.S88.Jun232016 | 11639 | N | 0 | NA | NA | NA | NA |
28.S87.Jun172016 | 11677 | N | 0 | NA | NA | NA | NA |
42.A04.S4.Jul202017 | 11738 | T | 1 | NA | NA | NA | NA |
35.A03.S3.Jul202017 | 11738 | N | 0 | NA | NA | NA | NA |
43.S49.Jun172016 | 11743 | T | 0 | NA | NA | NA | NA |
29.S31.Jun172016 | 11816 | N | 0 | NA | NA | NA | NA |
37.S32.Jun172016 | 11816 | T | 0 | NA | NA | NA | NA |
38.C09.S33.Jun232016 | 11833 | T | 12 | NA | NA | NA | NA |
34.C10.S34.Jun232016 | 11833 | N | 0 | NA | NA | NA | NA |
25.C03.S27.Jul202017 | 11839 | N | 4 | NA | NA | NA | NA |
46.C04.S28.Jul202017 | 11839 | T | 0 | NA | NA | NA | NA |
48.S43.Jun172016 | 11949 | T | 0 | 11949 | T | 0.0 | Above |
47.S44.Jun172016 | 11949 | N | 0 | NA | NA | NA | NA |
239.D09.S45.Jun232016 | 11952 | BO | 0 | 11952 | BO | 0.0 | Above |
49.S47.Jun172016 | 11987 | N | 0 | NA | NA | NA | NA |
23.S75.Jun172016 | 12023 | T | 4 | NA | NA | NA | NA |
22.C07.S31.Jun232016 | 12262 | N | 0 | NA | NA | NA | NA |
31.C08.S32.Jun232016 | 12262 | T | 0 | NA | NA | NA | NA |
50.S56.Jun172016 | 12291 | N | 0 | NA | NA | NA | NA |
51.S55.Jun172016 | 12291 | T | 0 | 12291 | T | -999.0 | Below |
51.S55.Jun172016 | 12291 | T | 0 | 12291 | T | -999.0 | Below |
53.E09.S57.Jun232016 | 12306 | T | 0 | 12306 | T | 0.0 | Above |
52.E10.S58.Jun232016 | 12306 | N | 0 | NA | NA | NA | NA |
54.G11.S83.Jul202017 | 12328 | N | 0 | NA | NA | NA | NA |
55.E03.S51.Jul202017 | 12460 | T | 0 | NA | NA | NA | NA |
57.S68.Jun172016 | 12631 | N | 0 | NA | NA | NA | NA |
58.S67.Jun172016 | 12631 | T | 0 | NA | NA | NA | NA |
59.S72.Jun172016 | 12637 | N | 1 | NA | NA | NA | NA |
32.S52.Jun172016 | 12672 | T | 0 | 12672 | T | 0.0 | Above |
27.F09.S69.Jun232016 | 12672 | N | 0 | NA | NA | NA | NA |
60.C10.S34.Jul202017 | 12705 | N | 0 | NA | NA | NA | NA |
62.G10.S82.Jun232016 | 12733 | T | 1 | 12733 | T | -999.0 | Below |
61.G09.S81.Jun232016 | 12733 | N | 0 | NA | NA | NA | NA |
36.F04.S64.Jul202017 | 12758 | T | 1 | NA | NA | NA | NA |
33.F03.S63.Jul202017 | 12758 | N | 0 | NA | NA | NA | NA |
226.S50.Jun172016 | 12767 | BO | 0 | 12767 | BO | 0.0 | Above |
229.S79.Jun172016 | 12779 | T | 0 | NA | NA | NA | NA |
63.D03.S39.Jul202017 | 12779 | N | 0 | NA | NA | NA | NA |
66.G04.S76.Jul202017 | 12841 | T | 0 | 12841 | T | -999.0 | Below |
67.D10.S46.Jul202017 | 12897 | N | 1 | NA | NA | NA | NA |
24.S92.Jun172016 | 12936 | T | 1 | NA | NA | NA | NA |
68.S91.Jun172016 | 12936 | N | 0 | NA | NA | NA | NA |
71.H10.S94.Jun232016 | 12944 | T | 324 | NA | NA | NA | NA |
70.H09.S93.Jun232016 | 12944 | N | 0 | NA | NA | NA | NA |
74.H03.S87.Jul202017 | 13008 | T | 161 | 13008 | T | 32.2 | Above |
73.H04.S88.Jul202017 | 13008 | N | 149 | NA | NA | NA | NA |
77.S10.Jun172016 | 13103 | N | 2 | NA | NA | NA | NA |
79.S3.Jun172016 | 13128 | T | 0 | NA | NA | NA | NA |
81.A02.S2.Jun232016 | 13202 | T | 14 | NA | NA | NA | NA |
80.A01.S1.Jun232016 | 13202 | N | 0 | NA | NA | NA | NA |
82.A05.S5.Jul202017 | 13211 | N | 0 | NA | NA | NA | NA |
83.A06.S6.Jul202017 | 13211 | T | 0 | NA | NA | NA | NA |
84.S22.Jun172016 | 13220 | N | 0 | NA | NA | NA | NA |
87.B01.S13.Jun232016 | 13266 | T | 20 | NA | NA | NA | NA |
86.B02.S14.Jun232016 | 13266 | N | 4 | NA | NA | NA | NA |
88.B05.S17.Jul202017 | 13270 | N | 0 | NA | NA | NA | NA |
89.B06.S18.Jul202017 | 13270 | T | 0 | 13270 | T | 0.0 | Above |
90.S33.Jun172016 | 13318 | N | 0 | NA | NA | NA | NA |
95.C06.S30.Jul202017 | 13367 | T | 0 | NA | NA | NA | NA |
96.S46.Jun172016 | 13406 | N | 3 | NA | NA | NA | NA |
97.S45.Jun172016 | 13406 | T | 0 | NA | NA | NA | NA |
99.D01.S37.Jun232016 | 13430 | T | 0 | NA | NA | NA | NA |
98.D02.S38.Jun232016 | 13430 | N | 0 | NA | NA | NA | NA |
100.D06.S42.Jul202017 | 13460 | N | 0 | NA | NA | NA | NA |
103.S58.Jun172016 | 13462 | T | 19 | NA | NA | NA | NA |
102.S57.Jun172016 | 13462 | N | 1 | NA | NA | NA | NA |
104.S23.Jun172016 | 13523 | N | 4 | NA | NA | NA | NA |
106.E02.S50.Jun232016 | 13553 | T | 0 | 13553 | T | 0.0 | Above |
106.E02.S50.Jun232016 | 13553 | T | 0 | 13553 | T | 0.0 | Below |
108.E06.S54.Jul202017 | 13622 | BO | 0 | 13622 | BO | 0.0 | Above |
110.S69.Jun172016 | 13658 | T | 0 | NA | NA | NA | NA |
109.S70.Jun172016 | 13658 | N | 0 | NA | NA | NA | NA |
113.F01.S61.Jun232016 | 13702 | T | 0 | 13702 | T | 0.0 | Above |
112.F02.S62.Jun232016 | 13702 | N | 0 | NA | NA | NA | NA |
118.S82.Jun172016 | 13850 | T | 0 | NA | NA | NA | NA |
234.C07.S31.Jul202017 | 13922 | BO | 4 | 13922 | BO | 0.8 | Above |
119.G01.S73.Jun232016 | 13927 | N | 0 | NA | NA | NA | NA |
121.G05.S77.Jul202017 | 13987 | N | 0 | NA | NA | NA | NA |
124.S93.Jun172016 | 14033 | T | 38 | NA | NA | NA | NA |
125.H06.S90.Jul202017 | 14066 | N | 0 | NA | NA | NA | NA |
127.S6.Jun172016 | 14081 | N | 1 | NA | NA | NA | NA |
128.S5.Jun172016 | 14081 | T | 0 | NA | NA | NA | NA |
130.A02.S2.Jul202017 | 14130 | T | 1 | NA | NA | NA | NA |
129.A01.S1.Jul202017 | 14130 | N | 0 | NA | NA | NA | NA |
131.S62.Jun172016 | 14146 | T | 1 | NA | NA | NA | NA |
134.F11.S71.Jun172016 | 14378 | T | 0 | NA | NA | NA | NA |
135.B06.S18.Jun232016 | 14403 | N | 0 | NA | NA | NA | NA |
137.F09.S69.Jul202017 | 14423 | N | 0 | NA | NA | NA | NA |
139.F07.S67.Jun232016 | 14466 | N | 0 | NA | NA | NA | NA |
140.B02.S14.Jul202017 | 14495 | N | 1 | NA | NA | NA | NA |
142.E08.S56.Jul202017 | 14510 | N | 0 | NA | NA | NA | NA |
143.G08.S80.Jul202017 | 14523 | N | 0 | NA | NA | NA | NA |
146.S29.Jun172016 | 14717 | N | 1 | NA | NA | NA | NA |
148.S30.Jun172016 | 14717 | T | 0 | NA | NA | NA | NA |
145.D09.S45.Jul202017 | 14751 | T | 0 | NA | NA | NA | NA |
150.C06.S30.Jun232016 | 14827 | T | 3 | NA | NA | NA | NA |
149.C05.S29.Jun232016 | 14827 | N | 0 | NA | NA | NA | NA |
151.E03.S51.Jun232016 | 15180 | N | 0 | NA | NA | NA | NA |
152.H07.S91.Jun232016 | 15232 | T | 0 | NA | NA | NA | NA |
154.C02.S26.Jul202017 | 15239 | T | 4 | 15239 | T | 0.8 | Above |
155.C09.S33.Jul202017 | 15501 | T | 0 | NA | NA | NA | NA |
156.S42.Jun172016 | 15707 | T | 133 | NA | NA | NA | NA |
114.S41.Jun172016 | 15707 | N | 54 | NA | NA | NA | NA |
158.D06.S42.Jun232016 | 15725 | T | 5 | NA | NA | NA | NA |
157.D05.S41.Jun232016 | 15725 | N | 0 | NA | NA | NA | NA |
159.B10.S22.Jul202017 | 15752 | T | 2 | NA | NA | NA | NA |
160.E04.S52.Jun232016 | 15770 | N | 0 | NA | NA | NA | NA |
162.G04.S76.Jun232016 | 15876 | N | 0 | NA | NA | NA | NA |
165.S54.Jun172016 | 16210 | T | 0 | NA | NA | NA | NA |
166.E06.S54.Jun232016 | 16243 | N | 0 | NA | NA | NA | NA |
167.E05.S53.Jun232016 | 16243 | T | 0 | 16243 | T | 0.0 | Below |
168.S59.Jun172016 | 16418 | N | 1 | NA | NA | NA | NA |
170.E02.S50.Jul202017 | 16549 | N | 0 | NA | NA | NA | NA |
172.S65.Jun172016 | 16590 | N | 0 | NA | NA | NA | NA |
173.S66.Jun172016 | 16590 | T | 0 | NA | NA | NA | NA |
174.S76.Jun172016 | 16592 | N | 61 | NA | NA | NA | NA |
175.S88.Jun172016 | 16592 | T | 38 | 16592 | T | 7.6 | Above |
175.S88.Jun172016 | 16592 | T | 38 | 16592 | T | 7.6 | Below |
176.H07.S91.Jul202017 | 16608 | N | 0 | NA | NA | NA | NA |
179.F01.S61.Jul202017 | 16736 | T | 5 | NA | NA | NA | NA |
178.F02.S62.Jul202017 | 16736 | N | 0 | NA | NA | NA | NA |
227.S74.Jun172016 | 16745 | N | 1 | NA | NA | NA | NA |
181.D02.S38.Jul202017 | 16745 | T | 0 | NA | NA | NA | NA |
184.S61.Jun172016 | 16981 | N | 4 | NA | NA | NA | NA |
185.G08.S80.Jun232016 | 17002 | N | 0 | NA | NA | NA | NA |
186.S77.Jun172016 | 17206 | N | 0 | NA | NA | NA | NA |
187.S78.Jun172016 | 17206 | T | 0 | 17206 | T | 0.0 | Below |
189.G05.S77.Jun232016 | 17223 | T | 0 | 17223 | T | -999.0 | Below |
188.G06.S78.Jun232016 | 17223 | N | 0 | NA | NA | NA | NA |
191.G02.S74.Jul202017 | 17285 | T | 4 | NA | NA | NA | NA |
190.G01.S73.Jul202017 | 17285 | N | 0 | NA | NA | NA | NA |
194.H05.S89.Jun232016 | 17304 | N | 0 | NA | NA | NA | NA |
195.H06.S90.Jun232016 | 17304 | T | 0 | 17304 | T | 0.0 | Above |
196.D08.S44.Jun232016 | 17353 | N | 0 | NA | NA | NA | NA |
197.G07.S79.Jul202017 | 17435 | N | 0 | NA | NA | NA | NA |
198.F03.S63.Jun232016 | 17493 | N | 0 | NA | NA | NA | NA |
199.A11.S11.Jun232016 | 17512 | N | 3 | NA | NA | NA | NA |
200.S96.Jun172016 | 17525 | N | 0 | NA | NA | NA | NA |
201.H02.S86.Jun242016 | 17525 | T | 0 | NA | NA | NA | NA |
202.D07.S43.Jul202017 | 17606 | N | 0 | NA | NA | NA | NA |
205.S2.Jun172016 | 17683 | T | 383 | 17683 | T | 0.0 | Below |
204.S1.Jun172016 | 17683 | N | 158 | NA | NA | NA | NA |
206.S51.Jun172016 | 17698 | N | 0 | NA | NA | NA | NA |
233.G07.S79.Jun232016 | 17799 | BO | 2 | 17799 | BO | 0.4 | Above |
208.D03.S39.Jun232016 | 17842 | N | 0 | NA | NA | NA | NA |
212.A08.S8.Jun232016 | 17918 | T | 0 | 17918 | T | 0.0 | Above |
211.A07.S7.Jun232016 | 17918 | N | 0 | NA | NA | NA | NA |
NA | NA | NA | NA | 13732 | BO | -999.0 | Above |
NA | NA | NA | NA | 16555 | BO | -999.0 | Above |
NA | NA | NA | NA | 16976 | BO | -999.0 | Above |
NA | NA | NA | NA | 11802 | BO | -999.0 | Above |
NA | NA | NA | NA | 14130 | BO | -999.0 | Above |
NA | NA | NA | NA | 11267 | NT | -999.0 | Above |
NA | NA | NA | NA | 11271 | NT | -999.0 | Above |
NA | NA | NA | NA | 11455 | NT | -999.0 | Above |
NA | NA | NA | NA | 11455 | T | -999.0 | Above |
NA | NA | NA | NA | 11949 | NT | -999.0 | Above |
NA | NA | NA | NA | 12306 | NT | -999.0 | Above |
NA | NA | NA | NA | 12672 | NT | -999.0 | Above |
NA | NA | NA | NA | 13008 | NT | -999.0 | Above |
NA | NA | NA | NA | 13103 | NT | -999.0 | Above |
NA | NA | NA | NA | 13103 | T | -999.0 | Above |
NA | NA | NA | NA | 13270 | NT | -999.0 | Above |
NA | NA | NA | NA | 13318 | NT | -999.0 | Above |
NA | NA | NA | NA | 13318 | T | -999.0 | Above |
NA | NA | NA | NA | 13553 | NT | -999.0 | Above |
NA | NA | NA | NA | 13702 | NT | -999.0 | Above |
NA | NA | NA | NA | 13927 | NT | -999.0 | Above |
NA | NA | NA | NA | 13927 | T | -999.0 | Above |
NA | NA | NA | NA | 14719 | NT | -999.0 | Above |
NA | NA | NA | NA | 14719 | T | -999.0 | Above |
NA | NA | NA | NA | 15180 | NT | -999.0 | Above |
NA | NA | NA | NA | 15180 | T | -999.0 | Above |
NA | NA | NA | NA | 15239 | NT | -999.0 | Above |
NA | NA | NA | NA | 16034 | NT | -999.0 | Above |
NA | NA | NA | NA | 16034 | T | -999.0 | Above |
NA | NA | NA | NA | 16592 | NT | -999.0 | Above |
NA | NA | NA | NA | 17304 | NT | -999.0 | Above |
NA | NA | NA | NA | 17918 | NT | -999.0 | Above |
NA | NA | NA | NA | 13553 | NT | -999.0 | Below |
NA | NA | NA | NA | 12733 | NT | -999.0 | Below |
NA | NA | NA | NA | 12291 | NT | -999.0 | Below |
NA | NA | NA | NA | 12291 | NT | -999.0 | Below |
NA | NA | NA | NA | 12841 | NT | -999.0 | Below |
NA | NA | NA | NA | 12997 | NT | -999.0 | Below |
NA | NA | NA | NA | 12997 | T | -999.0 | Below |
NA | NA | NA | NA | 13103 | NT | -999.0 | Below |
NA | NA | NA | NA | 13103 | T | -999.0 | Below |
NA | NA | NA | NA | 16243 | NT | 0.2 | Below |
NA | NA | NA | NA | 16592 | NT | 0.0 | Below |
NA | NA | NA | NA | 16642 | NT | 0.0 | Below |
NA | NA | NA | NA | 16642 | T | 76.6 | Below |
NA | NA | NA | NA | 17206 | NT | -999.0 | Below |
NA | NA | NA | NA | 17223 | NT | 0.0 | Below |
NA | NA | NA | NA | 17683 | NT | -999.0 | Below |
sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
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.19 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 whisker_0.4
[79] withr_2.2.0 mgcv_1.8-31 abind_1.4-5
[82] survival_3.2-3 modelr_0.1.8 crayon_1.3.4
[85] rmarkdown_2.5 grid_4.0.2 blob_1.2.1
[88] git2r_0.27.1 reprex_0.3.0 digest_0.6.25
[91] webshot_0.5.2 httpuv_1.5.4 numDeriv_2016.8-1.1
[94] stats4_4.0.2 munsell_0.5.0