Commit ac01ebbe authored by Thomas Schwarzl's avatar Thomas Schwarzl
Browse files

merge

Merge branch 'master' of https://git.embl.de/schwarzl/RBPbaseAnalysis2CRIC

# Conflicts:
#	2C-RIC-Analysis.Rmd
#	2C-Seq-Analysis.Rmd
parents 4926ffec c777358f
......@@ -643,10 +643,18 @@ RA$save_euler(selection_ids = c(TRIC, TRIC_2, SRIC_2),
```{r}
RA$save_venn(selection_ids = c(TRIC, anyScExpTRAPP_id, TRAPP_id),
names = c("TRIC", "any Sc RIC", "any TRAPP"),
file_root = file.path(output_dir, "TRIC_anySc_TRAPP"),
file_root = file.path(output_dir, "TRIC_anySc_TRAPP_venn"),
fill = cbbPalette[c(6,7,3)])
```
```{r}
RA$save_euler(selection_ids = c(TRIC, anyScExpTRAPP_id, TRAPP_id),
names = c("TRIC", "any Sc RIC", "any TRAPP"),
file_root = file.path(output_dir, "TRIC_anySc_TRAPP_euler"),
fill = cbbPalette[c(6,7,3)])
```
### Short
```{r}
......
......@@ -14,6 +14,8 @@ Load libraries
```{r}
library(edgeR)
library(csaw)
require(tidyverse)
library(IHW)
```
......@@ -362,7 +364,6 @@ merged_res_ip[["T3_ProtA"]]
```{r}
library(tidyverse)
ANNO <- read_tsv("Saccharomyces_cerevisiae.R64-1-1.84.bed.gz",
col_names = c("chr", "start", "end", "name", "score", "strand"),
quote = "#") %>%
......@@ -395,29 +396,41 @@ Y <- bind_cols(ANNO[qr,], as.data.frame(rowRanges(counts_norm[["ip"]])), results
```{r}
library(IHW)
ihwRes <- ihw(PValue ~ logCPM, data = X, alpha = 0.1)
ihwResX <- ihw(PValue ~ logCPM, data = X, alpha = 0.1)
ihwResY <- ihw(PValue ~ logCPM, data = X, alpha = 0.1)
```
```{r}
X$qval <- adj_pvalues(ihwRes)
X$qval <- adj_pvalues(ihwResX)
table(X$qval < 0.05)
```
```{r}
Y$qval <- adj_pvalues(ihwResY)
table(Y$qval < 0.05)
```
```{r}
ggplot(X, aes(logFC, -log10(PValue), label = name, col = qval < 0.01 & abs(logFC) > 2)) + geom_point(alpha = 0.8) +
# geom_text(data = ( X %>% dplyr::filter(qval < 0.001) %>% dplyr::filter(abs(logFC) > 3 )), aes(logFC, -log10(PValue)), col = "black", size = 2, alpha = 1) +
scale_color_manual(values = c("grey", "red"))
geom_text(data = ( X %>% dplyr::filter(-log10(PValue) > 20) %>%
dplyr::mutate(name = ifelse(is.na(name) & grepl(seqnames, pattern = "^t", perl = T), as.character(seqnames), name))), # %>% dplyr::filter(abs(logFC) > 3 )
aes(logFC, -log10(PValue)),
col = "black",
size = 2,
alpha = 1) +
scale_color_manual(values = c("grey", "red"))
```
```{r}
ggplot(Y, aes(logFC, -log10(PValue), label = name, col = qval < 0.01 & abs(logFC) > 2)) + geom_point(alpha = 0.8) +
# geom_text(data = ( X %>% dplyr::filter(qval < 0.001) %>% dplyr::filter(abs(logFC) > 3 )), aes(logFC, -log10(PValue)), col = "black", size = 2, alpha = 1) +
geom_text(data = ( Y %>% dplyr::filter(-log10(PValue) > 10) %>%
dplyr::mutate(name = ifelse(is.na(name) & grepl(seqnames, pattern = "^t", perl = T), as.character(seqnames), name))), # %>% dplyr::filter(abs(logFC) > 3 )
aes(logFC, -log10(PValue)),
col = "black",
size = 2,
alpha = 1) +
scale_color_manual(values = c("grey", "red"))
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment