Skip to content

Commit

Permalink
Merge pull request #22 from Folakunmi21/main
Browse files Browse the repository at this point in the history
vignette buid errors resolve attempt
  • Loading branch information
cmirzayi authored Aug 15, 2024
2 parents a3c1e99 + 89a52e5 commit 448d7fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions vignettes/fieldworkanalysis_samara.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ library(dplyr)
```

```{r}
library(bugSigSimple)
dat <- bugsigdbr::importBugSigDB(cache= TRUE)
dim(dat)
names(dat)
Expand Down Expand Up @@ -72,8 +73,8 @@ Summary of studies and most frequent taxa increased and decreased in endometrios
bugSigSimple::createStudyTable(subset.dat)
getMostFrequentTaxa(subset.dat,n=30)
getMostFrequentTaxa(subset.dat,sig.type="increased")
getMostFrequentTaxa(subset.dat,sig.type="decreased")
getMostFrequentTaxa(subset.dat,direction="UP")
getMostFrequentTaxa(subset.dat,direction="DOWN")
```

Expand Down Expand Up @@ -222,7 +223,7 @@ fit.negbin <-
data = df,
control = glm.control(
epsilon = 1e-8,
maxit = 25,
maxit = 70,
trace = FALSE
)
)
Expand Down
10 changes: 5 additions & 5 deletions vignettes/healthysig.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ healthysig50 <- bugsigdbr::getSignatures(bugs50)
head(healthysig50)
```

```{r healthy0}
#prevalence threshold=0
```#{r healthy0}
prevalence threshold=0
bugs0<- (dat) %>%
filter (Study=='Study 562') %>%
filter (Experiment=="Experiment 10") %>%
Expand Down Expand Up @@ -128,7 +128,7 @@ bugall_decreased <- merge(x = diseasesig_decreased2, y = bugdisease_decreased2,
```

## Calculate pairwise overlaps
```{r overlap_prevelance=0}
#```{r overlap_prevelance=0} experiment 10 has no signatures
library(purrr)
list0_decreased <- c(healthysig0, diseasesig_decreased)
paircomp0_decreased <- calcPairwiseOverlaps(list0_decreased)
Expand Down Expand Up @@ -157,7 +157,7 @@ paircheck0_increased <- paircomp0_increased %>%
## merge jacard scores with disease study data
The issue why I need to merge overlap score back with all disease budsigdb studies is that calcPairwiseOverlaps drops all 0 intersect pairs
```{r merge overlap scores with all disease study data}
#```{r merge overlap scores with all disease study data}
overlap0_decreased<- merge(x = bugall_decreased, y = paircheck0_decreased, by =c('study_id','experiment_id','signature_id'), all.x = TRUE) %>%
mutate(type="decreased")%>%
filter(length_set2>4) #keep only bugsigdb studies that tested more than 4 increased or decreased
Expand All @@ -169,7 +169,7 @@ overlap0_increased<- merge(x = bugall_increased, y = paircheck0_increased, by =c
overlap0_increased[is.na(overlap0_increased)] <- 0
```

```{r comparison-increased_vs_decrease}
```#{r comparison-increased_vs_decrease}
t.test(overlap0_increased$overlap, overlap0_decreased$overlap)
wilcox.test(overlap0_increased$overlap, overlap0_decreased$overlap)
Expand Down

0 comments on commit 448d7fb

Please sign in to comment.