Skip to content
Snippets Groups Projects
Commit 136916e1 authored by hpolvech's avatar hpolvech
Browse files

demonstration VolcanoPlot

parent 35829568
Branches
No related tags found
No related merge requests found
...@@ -605,12 +605,26 @@ library(ggrepel) ...@@ -605,12 +605,26 @@ library(ggrepel)
</p> </p>
</details> </details>
Let s **filter** our table into a new variable, top10, to keep only the top 10 according to the adjusted pvalue. Let s **filter** our table into a new variable, top10, to keep only the top 10 according to the adjusted pvalue. The **smaller** the adjusted pvalue, the more significant.
**Tips :** You can use the [function](https://dplyr.tidyverse.org/reference/slice.html) `slice_min()` **Tips :** You can use the [function](https://dplyr.tidyverse.org/reference/slice.html) `slice_min()`
<details><summary>Solution</summary>
<p>
```{r top10}
top10 <- tab.sig %>% top10 <- tab.sig %>%
filter(sig == TRUE) %>% filter(sig == TRUE) %>%
slice_min(n = 10, padj) slice_min(n = 10, padj)
```
</p>
</details>
The data is ready to be used to make a volcano plot!
To make the graph below, use `ggplot2`, the functions `geom_point()`, `geom_hline()`, `geom_vline()`, `theme_minimal()`, `theme()` (to remove the legend), `geom_label_repel()` and the function `scale_color_manual()` for the colors.
```{r VolcanoPlotDemo, }
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment