-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Add statistical tests and plots
- Loading branch information
Showing
3 changed files
with
107 additions
and
13 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## See the distribution of % Overlap vs. wells | ||
|
||
suppressPackageStartupMessages({ | ||
library(ggplot2) | ||
}) | ||
|
||
wells_all <- read.csv("rnai-p_values.csv") %>% | ||
mutate(significant = p_value < 0.05) | ||
binwidth <- 0.025 | ||
## Bring RNAi to the front of the level list. | ||
wells_all$type <- relevel(wells_all$type, "RNAi") | ||
|
||
ggplot(filter(wells_all, type == "RNAi"), | ||
aes(coloc, fill = significant)) + | ||
geom_histogram(binwidth = binwidth) + | ||
scale_fill_manual(values = c("grey70", "blue")) + | ||
ggtitle("Histogram of RNAi wells with significant overlap (p-value < 5%)") + | ||
xlab("% colocalization") | ||
ggsave("rnai-hist-signif.png") | ||
ggsave("rnai-hist-signif.pdf") | ||
|
||
ggplot(wells_all, aes(coloc, color = type)) + | ||
geom_freqpoly(binwidth = binwidth) + | ||
scale_y_log10() + | ||
facet_wrap(~ type) + | ||
ggtitle("Histogram of all well types") + | ||
xlab("% colocalization") | ||
ggsave("all-hist.png") | ||
ggsave("all-hist.pdf") | ||
|
||
ggplot(wells_all, aes(coloc, color = type)) + | ||
geom_density() + | ||
facet_wrap(~ type) + | ||
ggtitle("Density plot of wells to show distribution") + | ||
xlab("% colocalization") | ||
ggsave("all-density.png") | ||
ggsave("all-density.pdf") |