You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgsrc="../img/volcano_basemean.png"alt="volcano plot with points colored by log of basemean instead of significance"width="600"/>
264
+
265
+
### Volcano plot with ranked gene list
266
+
267
+
This is a great way to get an overall picture of what is going on, but we may also want to know the names of the top 10 most differentially expressed genes (by lowest padj) and where they are located on this plot. It could helpful for us in understanding if there is anything unusual about the relationship between
268
+
269
+
This same type of labeling technique can also be used to label the top lowest or highest genes sorted by any variable in our results dataframe (e.g. basemean, raw pvalue, log2foldchange etc).
265
270
266
-
This is a great way to get an overall picture of what is going on, but what if we also wanted to know where the top 10 genes (lowest padj) in our DE list are located on this plot? We could label those dots with the gene name on the Volcano plot using `geom_text_repel()`.
271
+
We are going to label those dots with the gene name on the Volcano plot using `geom_text_repel()`. Preparing for this will take a few steps in Base R:
267
272
268
-
First, we need to order the res_tableOE by `padj`, and add an additional column to it, to include on those gene names we want to use to label the plot.
273
+
- Add an additional column to our current plotting dataframe, to put those gene names we want to use to label the plot.
274
+
275
+
- We need to order the res_tableOE by `padj`
276
+
277
+
- Fill the new empty column with values from the `symbol` column just for the top 10 genes in the sorted dataframe
269
278
270
279
```r
271
-
## Create an empty column to indicate which genes to label
0 commit comments