Skip to content

Commit 7442f42

Browse files
authored
Merge pull request #24 from AleruDivine/main
Updated vignettes
2 parents 245892e + 4da9b9e commit 7442f42

7 files changed

Lines changed: 38 additions & 17 deletions

bugSigSimple.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: b8714a68-b332-4c39-88f2-49fdba065555
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

vignettes/c-section_meconium_shaimaa.Rmd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,14 @@ subset.final <-
8686
arrange(PMID)
8787
```
8888
Show key characteristics of the included signatures:
89+
90+
```{r}
91+
detach("package:dplyr", unload = TRUE)
92+
library(dplyr)
93+
```
94+
8995
```{r}
90-
select(subset.final, all_of(c("PMID", "Source", "Group 0 name", "Group 1 name", "Abundance in Group 1")))
96+
select(subset.final, "PMID", "Source", "Group 0 name", "Group 1 name", "Abundance in Group 1")
9197
```
9298

9399
Are any studies missing?

vignettes/capstoneanalysis_clare.rmd

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,22 @@ covid_all <- bugsigdbr::subsetByOntology(dat, column = "Condition", "COVID-19",
4444
mutate(studyexp = paste(Study, Experiment, sep = "_")) %>%
4545
mutate(
4646
site = recode(`Body site`,
47-
"feces" = "Gut",
48-
"rectal" = "Gut",
49-
"nasopharynx" = "aURT",
50-
"oropharynx" = "aURT",
51-
"nasopharynx,oropharynx" = "aURT",
52-
"tongue" = "aURT"
47+
"Feces" = "Gut",
48+
"Rectum" = "Gut",
49+
"Nasopharynx" = "aURT",
50+
"Oropharynx" = "aURT",
51+
"Nasopharynx,Oropharynx" = "aURT",
52+
"Nasal cavity" = "aURT",
53+
"Surface of tongue" = "aURT",
54+
"Nasopharynx,Throat" = "aURT",
55+
"Throat" = "aURT",
56+
"Tongue" = "aURT",
57+
"Lung" = "LRT",
58+
"Sputum" = "LRT"
5359
)
5460
) %>%
5561
mutate(comparison1 = paste(`Group 0 name`, `Group 1 name`, sep = " vs "))
5662
```
57-
5863

5964
## Table of studies
6065

@@ -73,6 +78,10 @@ gut_sigs <- filter(covid_all,
7378
7479
naso_sigs <- filter(covid_all,
7580
site == "aURT") %>%
81+
drop_na(Source)
82+
83+
resp_sigs <- filter(covid_all,
84+
site == "LRT") %>%
7685
drop_na(Source)
7786
```
7887

@@ -88,6 +97,10 @@ kableExtra::kbl(bugSigSimple::createTaxonTable(gut_sigs))
8897
kableExtra::kbl(bugSigSimple::createTaxonTable(naso_sigs))
8998
```
9099

100+
```{r}
101+
kableExtra::kbl(bugSigSimple::createTaxonTable(resp_sigs))
102+
```
103+
91104
# gut microbiota analysis
92105

93106
Look specifically at case-control comparisons

vignettes/capstoneanalysis_fatima.rmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ dim(dat)
3939
```{r}
4040
my.dat <- subsetByCurator(dat, curator="Fatima Zohra")
4141
table(my.dat[,"Condition"])
42-
condsnew <-c("bipolar disorder","unipolar depression")
42+
condsnew <-c("bipolar disorder","major depressive disorder")
4343
condsnew <-c("bipolar disorder")
4444
4545
efo <- bugsigdbr::getOntology("efo")
4646
dat.bpd <- bugsigdbr::subsetByOntology(dat, column = "Condition", "bipolar disorder", efo)
47-
dat.upd <- bugsigdbr::subsetByOntology(dat, column = "Condition", "unipolar depression", efo)
47+
dat.upd <- bugsigdbr::subsetByOntology(dat, column = "Condition", "major depressive disorder", efo)
4848
my.dat.cond <- rbind(dat.bpd, dat.upd)
4949
table(my.dat.cond[,"Condition"])
5050
@@ -104,9 +104,9 @@ my.dat.mdd <- my.dat.cond[!ind,]
104104
dim(my.dat.mdd)
105105
table(my.dat.mdd[,"Condition"])
106106
107-
getMostFrequentTaxa(my.dat.mdd, n=20)
108-
getMostFrequentTaxa(my.dat.mdd,sig.type= "increased")
109-
getMostFrequentTaxa(my.dat.mdd,sig.type= "decreased")
107+
getMostFrequentTaxa(my.dat.mdd, n= 20)
108+
getMostFrequentTaxa(my.dat.mdd,, "UP")
109+
getMostFrequentTaxa(my.dat.mdd,, "DOWN")
110110
```
111111

112112
## Binomial test "Increased in bipolar"

vignettes/capstoneanalysis_kweku.rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ bugSigSimple::createStudyTable(dat_condition)
5757

5858
```{r}
5959
gut_sigs <- filter(dat_condition,
60-
`Body site` %in% c("feces,mucosa of small intestine", "feces"))
60+
`Body site` %in% c("Feces, Mucosa of small intestine", "Feces"))
6161
```
6262

6363
In this table, the Binomial Test p-value corresponds to the null hypothesis

vignettes/fieldworkanalysis_samara.Rmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,12 @@ fit.negbin <-
221221
data = df,
222222
control = glm.control(
223223
epsilon = 1e-8,
224-
maxit = 70,
224+
maxit = 50,
225225
trace = FALSE
226226
)
227227
)
228-
summary(fit.negbin)
228+
library(broom)
229+
tidy(fit.negbin)
229230
230231
fit.ZInegbin <- zeroinfl(Streptococcus ~ Lactobacillus + age + BMI | 1,
231232
data = df,

vignettes/healthysig.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ overlap0_increased<- merge(x = bugall_increased, y = paircheck0_increased, by =c
175175
overlap0_increased[is.na(overlap0_increased)] <- 0
176176
```
177177

178-
179178
#```{r comparison-increased_vs_decrease}
179+
```
180180
t.test(overlap0_increased$overlap, overlap0_decreased$overlap)
181181
wilcox.test(overlap0_increased$overlap, overlap0_decreased$overlap)
182182

0 commit comments

Comments
 (0)