Commit adc16114 authored by Matteo Barcella's avatar Matteo Barcella
Browse files

Update AF_comparison.R

parent ae2fafbd
......@@ -9,7 +9,6 @@ inputdata <- list()
for (mysample in c("12_27_1","12_27_2", "10_395_3", "10_395_4")) {
inputdata[["rawcall"]][[mysample]] <- filter_variants_v3(infile = paste0(mysample, "_dbsnp_cc_cnc_dbnsfp_refseq_light_raw_filtered.fields.txt"), sampleid = mysample, dp = 50)
inputdata[["passonly"]][[mysample]] <- filter_variants_v3(infile = paste0(mysample, "_dbsnp_cc_cnc_dbnsfp_refseq_light.fields.txt"), sampleid = mysample, dp = 50)
}
source(file = "Compare_variants_AF_v3.R")
......@@ -70,48 +69,6 @@ plot_grid(AF_density_raw[["12-27_miRNA_L"]], AF_density_raw[["12-27_miRNA_H"]],
nrow = 2)
dev.off()
## PLOTTING PASS-ONLY
tmpdf_1_pass <- subset.data.frame(x = Comparison_12_27$passonly$unionannot, select = c("AF_GFP_H"), subset = AF_GFP_H > 0)
tmpdf_2_pass <- subset.data.frame(x = Comparison_12_27$passonly$unionannot, select = c("AF_GFP_L"), subset = AF_GFP_L > 0)
tmpdf_3_pass <- subset.data.frame(x = Comparison_10_395$passonly$unionannot, select = c("AF_GFP_H"), subset = AF_GFP_H > 0)
tmpdf_4_pass <- subset.data.frame(x = Comparison_10_395$passonly$unionannot, select = c("AF_GFP_L"), subset = AF_GFP_L > 0)
AF_density_pass <- list()
AF_density_pass[["12-27_miRNA_L"]] <- ggplot(data = tmpdf_1_pass,
mapping = aes(AF_GFP_H)) + ylim(0,300) +
geom_histogram(bins = 50, fill = alpha("#003366",0.8)) + xlab("miRNA_low") +
theme(axis.text = element_text(size = 14), legend.title = element_blank()) +
ggtitle("12-27_miRNA_L")
AF_density_pass[["12-27_miRNA_H"]] <- ggplot(data = tmpdf_2_pass,
mapping = aes(AF_GFP_L)) + ylim(0,300) +
geom_histogram(bins = 50, fill = alpha("#fc2803",0.8))+ xlab("miRNA_high") +
theme(axis.text = element_text(size = 14), legend.title = element_blank()) +
ggtitle("12-27_miRNA_H")
AF_density_pass[["10-395_miRNA_L"]] <- ggplot(data = tmpdf_3_pass,
mapping = aes(AF_GFP_H)) + ylim(0,300) +
geom_histogram(bins = 50, fill = alpha("#003366",0.8)) + xlab("miRNA_low") +
theme(axis.text = element_text(size = 14), legend.title = element_blank()) +
ggtitle("10-395_miRNA_L")
AF_density_pass[["10-395_miRNA_H"]] <- ggplot(data = tmpdf_4_pass,
mapping = aes(AF_GFP_L)) + ylim(0,300) +
geom_histogram(bins = 50, fill = alpha("#fc2803",0.8)) + xlab("miRNA_high") +
theme(axis.text = element_text(size = 14), legend.title = element_blank()) +
ggtitle("10-395_miRNA_H")
png(filename = "AF_density_pass_variants.png", width = 8, height = 6, units = "in", res = 300)
plot_grid(AF_density_pass[["12-27_miRNA_L"]], AF_density_pass[["12-27_miRNA_H"]],
AF_density_pass[["10-395_miRNA_L"]] , AF_density_pass[["10-395_miRNA_H"]],
nrow = 2)
dev.off()
# Histograms with PASS or clustered_events
AF_density_mildfilt <- list()
Mild_vars_12_27 <- Comparison_12_27$rawcall$unionannot
......
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