Skip to content

Commit 9ca61a4

Browse files
authored
Merge pull request #5 from JialinGao111/master
Refine text from tutorials and delete useless files
2 parents 97e4afd + e0b708d commit 9ca61a4

File tree

2 files changed

+323
-296
lines changed

2 files changed

+323
-296
lines changed

Tutorial/R/Tutorial_Microbiome.Rmd

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ input_features <- input_features[row.names(input_features) %in% row.names(input_
7373
```
7474

7575
## Output
76-
Here, we fit the two part model using MaAsLin2 and LOCOM( A logistic regression model for testing differential abundance in compositional microbiome data). First, we fit the models separately and then combine the two-part model using the p-value combination method CCT.
76+
Here, we fit the two part model using MaAsLin2 and LOCOM( A logistic regression model for testing differential abundance in compositional microbiome data). First, we fit the models separately and then combine the two-part model using p-value combination methods.
7777

7878
### Run MaAsLin2
7979
```{r}
@@ -172,29 +172,40 @@ paras_LO = paras_LO %>%
172172
dflist = list(paras_LO, paras_CR)
173173
```
174174

175-
After running MaAsLin2 and LOCOM, we use Vanilla, Cauchy Combination Test (CCT) and stouffer to combine p-values and calculate q-values based on combined p-values. We can use the DAssemble() from library(DAssemble).
175+
After running MaAsLin2 and LOCOM, we use Vanilla, Cauchy Combination Test (CCT) and stouffer to combine p-values and calculate q-values based on combined p-values. We can use the DAssemble() from library(DAssemble) for this step.
176176

177177
#### Vanilla
178178
```{r}
179179
# P-value: Vanilla
180180
parasVanilla = DAssemble(dflist, combine.method = "minP", correction = "BH")
181+
182+
# Sort the combined results by pval.combined
183+
parasVanilla <- parasVanilla %>%
184+
dplyr::arrange(pval.combined)
185+
181186
parasVanilla[1:10, ]
182187
```
183188
#### CCT
184189
```{r, warning=FALSE}
185190
# P-value: CCT
186191
parasCCT = DAssemble(dflist, combine.method = "CCT", correction = "BH")
187-
parasCCT[1:10,]
192+
parasCCT <- parasCCT %>%
193+
dplyr::arrange(pval.combined)
194+
parasCCT[1:10, ]
188195
```
189196
#### stouffer
190197
```{r, warning=FALSE}
191198
# P-value: stouffer
192199
parasStouffer = DAssemble(dflist, combine.method = "stouffer", correction = "BH")
200+
parasStouffer <- parasStouffer %>%
201+
dplyr::arrange(pval.combined)
193202
parasStouffer[1:10,]
194203
```
195204

196205

197206
## Results Comparison
207+
To compare LOCOM and MaAsLin2 using different combination methods, we create plots to display the top 10 genes identified based on their q-values. The left panel compares the -log10(p-values) obtained from each method, with higher values indicating greater
208+
statistical significance and providing a clearer interpretation of significance levels across genes. The right panel presents the estimated coefficients (effect sizes) from each method for the samegenes, with plus (+) and minus (-) symbols indicating positive and negative associations, respectively.
198209

199210
### LOCOM vs MaAsLin2(CCT)
200211
```{r, fig.width=7, fig.height=5.5, warning=FALSE}

0 commit comments

Comments
 (0)