Commit 93afcc7d authored by mirachirkova's avatar mirachirkova
Browse files

add files for website vizualization

parent c05507dc
SEMG1
SEMG2
PIP
MUC6
AQP2
MUC6
PATE1
SERPINA5
RMRP
PCA3
CYP4F8
RMRP
PAEP
SLC26A3
PATE4
AKR1B1
CLDN2
MFSD2A
AKR1B1
SLPI
COL2A1
AMACR
KRT13
SPINK2
PDK4
TFF3
SEMA5B
PTGS2
TFF3
STAC2
PTGS2
OR51E2
HPN
ACSM1
EMX2OS
RPPH1
HPN
......@@ -2,12 +2,12 @@
"SERPINA5","+","+","+","+","+",5
"CLDN2","+","+","+","+","-",4
"SPINK2","+","+","+","+","-",4
"EMX2OS","+","+","+","+","-",4
"AQP2","+","+","+","+","-",4
"PIP","+","+","+","+","-",4
"MFSD2A","+","-","+","+","-",3
"EMX2","+","+","+","-","-",3
"HOXB8","+","+","+","-","-",3
"EMX2OS","+","+","+","-","-",3
"TMEM114","+","+","+","-","-",3
"SEMG1","-","+","+","+","-",3
"PAEP","-","+","+","+","-",3
......@@ -53,9 +53,9 @@
"DEFB112","-","+","-","-","-",1
"LCN1","-","-","+","-","-",1
"MUC6","-","-","-","+","-",1
"RMRP","-","-","-","+","-",1
"PCA3","-","-","-","+","-",1
"CYP4F8","-","-","-","+","-",1
"RMRP","-","-","-","+","-",1
"SLC26A3","-","-","-","+","-",1
"SLPI","-","-","-","+","-",1
"COL2A1","-","-","-","+","-",1
......@@ -63,10 +63,9 @@
"KRT13","-","-","-","+","-",1
"PDK4","-","-","-","+","-",1
"TFF3","-","-","-","+","-",1
"PTGS2","-","-","-","+","-",1
"STAC2","-","-","-","+","-",1
"PTGS2","-","-","-","+","-",1
"OR51E2","-","-","-","+","-",1
"ACSM1","-","-","-","+","-",1
"RPPH1","-","-","-","+","-",1
"C2orf88","-","-","-","-","+",1
"APOBEC3C","-","-","-","-","+",1
......
......@@ -11,7 +11,7 @@
"SPINK2","-","+","+","+"
"KLHL14","-","-","-","-"
"MIR4508","-","-","-","-"
"EMX2OS","-","-","+","+"
"EMX2OS","-","+","+","+"
"NDRG4","-","-","-","-"
"SPINK13","-","-","-","-"
"RASL10B","-","-","-","-"
......
No preview for this file type
No preview for this file type
......@@ -2,4 +2,4 @@ DESeq 0.790475367665374
EBSeq 0.515586137502965
edgeR 0.522764214114926
voom 0.770472302946693
NOISeq 0.765683399425221
NOISeq 0.763097311782108
No preview for this file type
......@@ -123,29 +123,47 @@ loginfo('Save top genes crossing')
crossing(out)
loginfo('Saved')
condition <- coldata$condition
pdf(file.path(out, "heatmaps.pdf"))
# Visualize using heat maps
condition <- coldata$condition
loginfo('Calculate heat maps for tools')
source("source/calculate_distmatrix_utils.R")
loginfo('Calculate DESeq heat map')
deseq_distmat <- heatmap_v (count, "DESeq", condition, out)
deseq_hm <- heatmap_v (count, "DESeq", condition, out)
loginfo('DESeq heat map is done')
loginfo('Calculate EBSeq heat map')
ebseq_distmat <- heatmap_v (count, "EBSeq", condition, out)
ebseq_hm <- heatmap_v (count, "EBSeq", condition, out)
loginfo('EBSeq heat map is done')
loginfo('Calculate edgeR heat map')
edger_distmat <- heatmap_v (count, "edgeR", condition, out)
edger_hm <- heatmap_v (count, "edgeR", condition, out)
loginfo('edgeR heat map is done')
loginfo('Calculate voom heat map')
voom_distmat <- heatmap_v (count, "voom", condition, out)
voom_hm <- heatmap_v (count, "voom", condition, out)
loginfo('voom heat map is done')
loginfo('Calculate NOISeq heat map')
noiseq_distmat <- heatmap_v (count, "NOISeq", condition, out)
noiseq_hm <- heatmap_v (count, "NOISeq", condition, out)
loginfo('NOISeq heat map is done')
loginfo('Heat maps for tools are made')
dev.off()
loginfo('Vizualize heat map')
png(file.path(out, "DESeq_heatmap.png"))
deseq_hm
dev.off()
png(file.path(out, "EBSeq_heatmap.png"))
ebseq_hm
dev.off()
png(file.path(out, "edgeR_heatmap.png"))
edger_hm
dev.off()
png(file.path(out, "voom_heatmap.png"))
voom_hm
dev.off()
png(file.path(out, "NOISeq_heatmap.png"))
noiseq_hm
dev.off()
loginfo('The end!')
loginfo('Calculate distance matrices for tools')
# Calculate dist matrices for tools
loginfo('Calculate DESeq distance matrix')
......
......@@ -45,32 +45,42 @@ noiseq_res <- readRDS(file = file.path(out, "NOISeq_res.rds"))
pdf(file.path(out, "heatmaps.pdf"))
# Visualize using heat maps
condition <- coldata$condition
loginfo('Calculate heat maps for tools')
source("source/calculate_distmatrix_utils.R")
loginfo('Calculate DESeq heat map')
deseq_distmat <- heatmap_v (count, "DESeq", condition, out)
deseq_hm <- heatmap_v (count, "DESeq", condition, out)
loginfo('DESeq heat map is done')
loginfo('Calculate EBSeq heat map')
ebseq_distmat <- heatmap_v (count, "EBSeq", condition, out)
ebseq_hm <- heatmap_v (count, "EBSeq", condition, out)
loginfo('EBSeq heat map is done')
loginfo('Calculate edgeR heat map')
edger_distmat <- heatmap_v (count, "edgeR", condition, out)
edger_hm <- heatmap_v (count, "edgeR", condition, out)
loginfo('edgeR heat map is done')
loginfo('Calculate voom heat map')
voom_distmat <- heatmap_v (count, "voom", condition, out)
voom_hm <- heatmap_v (count, "voom", condition, out)
loginfo('voom heat map is done')
loginfo('Calculate NOISeq heat map')
noiseq_distmat <- heatmap_v (count, "NOISeq", condition, out)
noiseq_hm <- heatmap_v (count, "NOISeq", condition, out)
loginfo('NOISeq heat map is done')
loginfo('Heat maps for tools are made')
dev.off()
loginfo('Vizualize heat map')
png(file.path(out, "DESeq_heatmap.png"))
deseq_hm
dev.off()
png(file.path(out, "EBSeq_heatmap.png"))
ebseq_hm
dev.off()
png(file.path(out, "edgeR_heatmap.png"))
edger_hm
dev.off()
png(file.path(out, "voom_heatmap.png"))
voom_hm
dev.off()
png(file.path(out, "NOISeq_heatmap.png"))
noiseq_hm
dev.off()
loginfo('The end!')
#pdf(file.path(out, "de_plots.pdf"))
#deseq2_v(deseq2_res, out)
#ebseq_v(ebseq_res, out)
#edger_v(edger_res, out)
#voom_v(voom_res, out)
#noiseq_v(noiseq_res, out)
#dev.off()
#loginfo('Visualization results of differential expression is done')
......@@ -20,6 +20,10 @@ calculate_distmatrix <- function(countMatrixFile, signatureFile) {
heatmap_v <- function(countMatrixFile, tool_name, condition, out) {
signatureFile <- file.path(out, paste0(tool_name, "_sig.txt"))
if (file.info(signatureFile)$size == 0) {
cat(paste0('There is no gene in ', tool_name, ' for that signature\n'))
return()
}
signature <- readLines(signatureFile)
cm <- read.table(countMatrixFile, header=T, sep=",")
cm <- read.table(count, header=T, sep=",")
......@@ -38,6 +42,6 @@ heatmap_v <- function(countMatrixFile, tool_name, condition, out) {
library('pheatmap')
pheatmap(data_subset_norm, annotation_col = my_sample_col, annotation_names_col = FALSE, annotation_legend = TRUE,
annotation_names_row = FALSE, drop_levels = FALSE, show_rownames = T, show_colnames = F,
annotation_names_row = FALSE, main = paste0(tool_name, ' differential expression analysis'), drop_levels = FALSE, show_rownames = T, show_colnames = F,
cluster_cols = F)
}
\ No newline at end of file
......@@ -63,7 +63,7 @@ edger_top <- function(results, n) {
suppressMessages(library("biomaRt"))
# Filter results by logFC > 1 or logFC < -1
filtered_results <- results[abs(results$logFC) > 1, ]
filtered_results <- results[!is.na(results$logFC) > 0 && abs(results$logFC) > 1, ]
# Extract top-n differentially expressed genes ordered by p-value
top <- head(filtered_results[order(filtered_results$PValue), ], n)
......
......@@ -121,6 +121,7 @@ draw_venn_diag <- function(out) {
filename = NULL
)
grid.draw(venn_obj)
dev.off()
}
# Make a table view of venn diagram
......
......@@ -69,7 +69,7 @@ voom_top <- function(results, n) {
suppressMessages(library("biomaRt"))
# Filter results by logFC > 1 or logFC < -1
filtered_results <- results[abs(results$logFC) > 1, ]
filtered_results <- results[!is.na(results$logFC) > 0 && abs(results$logFC) > 1, ]
# Extract top-n differentially expressed genes ordered by p-value
top <- head(filtered_results[order(filtered_results$P.Value), ], n)
......
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