Skip to content

Commit

Permalink
Update minor issues in the lab
Browse files Browse the repository at this point in the history
  • Loading branch information
nimarafati committed Mar 13, 2024
1 parent 3f78e9d commit 5a11cad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lab_functional.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ gene_rank <- setNames( res$log2FoldChange,casefold(rownames(res),upper=T) )
hallmark_pathways <- gmtPathways("data/MSigDB_files/h.all.v6.2.symbols.gmt.txt")
```

Once our list of genes are sorted (from highest to lowest expression in day 7), we can proceed with the enrichment itself. Here, we will be using the `fgsea()` function. This will result in a table containing information for several pathways. We can then sort and filter those pathways to visualize only the top ones. You can select/filter them by either `p-value` or normalized enrichemnet score (`NES`).
Once our list of genes are sorted (from highest to lowest expression in day 7), we can proceed with the enrichment itself. Here, we will be using the `fgsea()` function. This will result in a table containing information for several pathways. We can then sort and filter those pathways to visualize only the top ones. You can select/filter them by either `p-value` or normalized enrichment score (`NES`).

```{r,results='hide',chunk.title=TRUE,fig.height=5,fig.width=10}
# Perform enrichemnt analysis
Expand All @@ -220,7 +220,7 @@ plotGseaTable(hallmark_pathways[topPathways], gene_rank, fgseaRes, gseaParam = 0

* Which is the most significantly up-regulated pathway at day 7?
* What do the length of the black bars mean?
* Is there any pathway that is significantly down-regulated at 0? Which columns tells you what is Up of downregulated?
* Is there any pathway that is significantly down-regulated at 0?
* Which is the most enriched pathway at day 0?
* What happens if we use `-res$log2FoldChange` as gene rank ? What changes and why?

Expand All @@ -243,12 +243,12 @@ for (i in c(topPathwaysUp[1:3],topPathwaysDown[3:1])){
<i class="fas fa-comments"></i> **Exploratory Questions**

* What do the black lines in the X-axis mean?
* By looking at the green line distribution, and the comparison made (day00 - day07), at which time point is this pathways enriched.
* By looking at the green line distribution, and the comparison made (day00 - day07), at which time point is this pathways enriched?

<i class="fas fa-comments"></i> **Exploratory Questions (optional)**

* What if instead of the hallmark gene set, you use the GO? Try that.
* How different are the results from EnrichR and GSEA using GO annotation? Remember to use the same comparison (i.e. day07 vs day00).
* How different are the results from EnrichR and GSEA using GO annotation? Remember to use the same comparison (i.e. day00 vs day07).

## Online enrichment tools:

Expand Down

0 comments on commit 5a11cad

Please sign in to comment.