Created
November 4, 2021 12:30
-
-
Save tbrittoborges/4f925e1a43fccf446857cd4a0f869e2c to your computer and use it in GitHub Desktop.
leafcutter result exploratory analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(ggrepel) | |
# load the data to variable x | |
x <- read_csv('leafcutter_junctions.csv') | |
x %>% | |
# filters the dataframe to keep only significant called junctions | |
filter(abs(deltapsi) > 0.1 & p.adjust < 0.05) %>% | |
# groups junctions by comparison | |
group_by(comparison) %>% | |
# show the counts of genes or introns per group | |
summarise( | |
genes = n_distinct(genes), | |
events = n_distinct(intron)) | |
# this plots a generic/bad volcano plot | |
p <- x %>% | |
ggplot(aes(deltapsi, -log10(p.adjust))) + | |
geom_point() | |
# show the plot | |
p | |
# break it down by comparison | |
p + facet_wrap(vars(comparison)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment