diff --git a/rmd_analysis/expressionPC_covariate_r2.Rmd b/rmd_analysis/expressionPC_covariate_r2.Rmd
deleted file mode 100644
index e0723e0..0000000
--- a/rmd_analysis/expressionPC_covariate_r2.Rmd
+++ /dev/null
@@ -1,112 +0,0 @@
----
-title: "expressionPC_covariate_R2"
-output: html_notebook
----
-
-
-```{r}
-library(recount)
-library(ggplot2)
-library(RColorBrewer)
-library(reshape2)
-
-load("../data/pc_loadings.Rdata")
-load("../data/raw_protein_coding_withGC.Rdata")
-
-## none of the covariates have NA --> total sum of squares can be computed before hand
-dat.cov <- lapply(gtex.rse, function(tiss) {
- cov.dat <- tiss@colData[,c(10, 11, 21:80, 83)]
- cov.dat <- cov.dat[,-which(sapply(cov.dat, function(x) length(unique(x))) == 1)]
- cov.dat <- cov.dat[, -which(colnames(cov.dat) %in% c("smunpdrd","smpthnts", "smtstptref", "smnabtch", "smnabtchd", "smgebtch"))] ## not enought unique entries in more than one category, < 50
- cov.dat
-})
-
-pve.tissue <- mapply(function(x,y,z){
- pve.eachtiss <- matrix(ncol = z, nrow = ncol(y))
- for(i in 1:ncol(y)){
- pve.eachtiss[i,] <- sapply(summary(lm(x[,1:z]~y[,i])), function(p) p$r.squared)
- }
- colnames(pve.eachtiss) <- 1:z
- rownames(pve.eachtiss) <- colnames(y)
- pve.eachtiss
-}, pc.loadings, dat.cov, num.pc.estimates, SIMPLIFY = FALSE)
-
-plot.r2 <- lapply(pve.tissue, melt)
-```
-
-```{r}
-myPalette <- colorRampPalette(brewer.pal(9,'Blues'), space = "Lab")
-
-tiss<- "Subcutaneous"
-
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-```
-```{r}
-tiss<- "Lung"
-
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-```
-
-```{r}
-tiss<- "Thyroid"
-
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-```
-
-```{r}
-tiss<- "Muscle"
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-```
-
-```{r}
-tiss<- "Blood"
-
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-```
-
-Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Cmd+Option+I*.
-
-When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Cmd+Shift+K* to preview the HTML file).
-
-The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
-
diff --git a/rmd_analysis/expressionPC_covariate_r2.nb.html b/rmd_analysis/expressionPC_covariate_r2.nb.html
deleted file mode 100644
index 6d7f92c..0000000
--- a/rmd_analysis/expressionPC_covariate_r2.nb.html
+++ /dev/null
@@ -1,345 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-expressionPC_covariate_R2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
library(recount)
-library(ggplot2)
-library(RColorBrewer)
-library(reshape2)
-load("../data/pc_loadings.Rdata")
-load("../data/raw_protein_coding_withGC.Rdata")
-## none of the covariates have NA --> total sum of squares can be computed before hand
-dat.cov <- lapply(gtex.rse, function(tiss) {
- cov.dat <- tiss@colData[,c(10, 11, 21:80, 83)]
- cov.dat <- cov.dat[,-which(sapply(cov.dat, function(x) length(unique(x))) == 1)]
- cov.dat <- cov.dat[, -which(colnames(cov.dat) %in% c("smunpdrd","smpthnts", "smtstptref", "smnabtch", "smnabtchd", "smgebtch"))] ## not enought unique entries in more than one category, < 50
- cov.dat
-})
-pve.tissue <- mapply(function(x,y,z){
- pve.eachtiss <- matrix(ncol = z, nrow = ncol(y))
- for(i in 1:ncol(y)){
- pve.eachtiss[i,] <- sapply(summary(lm(x[,1:z]~y[,i])), function(p) p$r.squared)
- }
- colnames(pve.eachtiss) <- 1:z
- rownames(pve.eachtiss) <- colnames(y)
- pve.eachtiss
-}, pc.loadings, dat.cov, num.pc.estimates, SIMPLIFY = FALSE)
-plot.r2 <- lapply(pve.tissue, melt)
-
-
-
-
-
-
-
myPalette <- colorRampPalette(brewer.pal(9,'Blues'), space = "Lab")
-tiss<- "Subcutaneous"
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-
-
-
-
-
-
-
-
tiss<- "Lung"
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-
-
-
-
-
-
-
-
-
-
tiss<- "Thyroid"
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-
-
-
-
-
-
-
-
-
-
tiss<- "Muscle"
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-
-
-
-
-
-
-
-
-
-
tiss<- "Blood"
-ggplot(plot.r2[[tiss]], aes(Var2, Var1)) + geom_tile(aes(fill = value),
- colour = "white") +
- # geom_text(size = 2, aes(label = prettyNum(value, digits=3, width=4, format="fg"))) +
- scale_fill_gradientn(colours = myPalette(10)[1:6]
- , limits = c(0,1)
- , values = c(0, 0.1, 0.2, 0.3, 1)
- ) +
- xlab("") + ylab("Principal Components") + theme(axis.text.x=element_text(colour="black"), axis.text.y=element_text(colour="black"))+
- ggtitle(tiss)
-
-
-
-
-
-
-
Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Cmd+Option+I .
-
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).
-
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit , Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
-
-
-
LS0tCnRpdGxlOiAiZXhwcmVzc2lvblBDX2NvdmFyaWF0ZV9SMiIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKCmBgYHtyfQpsaWJyYXJ5KHJlY291bnQpCmxpYnJhcnkoZ2dwbG90MikKbGlicmFyeShSQ29sb3JCcmV3ZXIpCmxpYnJhcnkocmVzaGFwZTIpCgpsb2FkKCIuLi9kYXRhL3BjX2xvYWRpbmdzLlJkYXRhIikKbG9hZCgiLi4vZGF0YS9yYXdfcHJvdGVpbl9jb2Rpbmdfd2l0aEdDLlJkYXRhIikKCiMjIG5vbmUgb2YgdGhlIGNvdmFyaWF0ZXMgaGF2ZSBOQSAtLT4gdG90YWwgc3VtIG9mIHNxdWFyZXMg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lbnRfdGV4dChjb2xvdXI9ImJsYWNrIikpKwoJCWdndGl0bGUodGlzcykKYGBgCgpBZGQgYSBuZXcgY2h1bmsgYnkgY2xpY2tpbmcgdGhlICpJbnNlcnQgQ2h1bmsqIGJ1dHRvbiBvbiB0aGUgdG9vbGJhciBvciBieSBwcmVzc2luZyAqQ21kK09wdGlvbitJKi4KCldoZW4geW91IHNhdmUgdGhlIG5vdGVib29rLCBhbiBIVE1MIGZpbGUgY29udGFpbmluZyB0aGUgY29kZSBhbmQgb3V0cHV0IHdpbGwgYmUgc2F2ZWQgYWxvbmdzaWRlIGl0IChjbGljayB0aGUgKlByZXZpZXcqIGJ1dHRvbiBvciBwcmVzcyAqQ21kK1NoaWZ0K0sqIHRvIHByZXZpZXcgdGhlIEhUTUwgZmlsZSkuIAoKVGhlIHByZXZpZXcgc2hvd3MgeW91IGEgcmVuZGVyZWQgSFRNTCBjb3B5IG9mIHRoZSBjb250ZW50cyBvZiB0aGUgZWRpdG9yLiBDb25zZXF1ZW50bHksIHVubGlrZSAqS25pdCosICpQcmV2aWV3KiBkb2VzIG5vdCBydW4gYW55IFIgY29kZSBjaHVua3MuIEluc3RlYWQsIHRoZSBvdXRwdXQgb2YgdGhlIGNodW5rIHdoZW4gaXQgd2FzIGxhc3QgcnVuIGluIHRoZSBlZGl0b3IgaXMgZGlzcGxheWVkLgoK
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rmd_analysis/genes_assigned_plots.Rmd b/rmd_analysis/genes_assigned_plots.Rmd
deleted file mode 100644
index b144950..0000000
--- a/rmd_analysis/genes_assigned_plots.Rmd
+++ /dev/null
@@ -1,52 +0,0 @@
----
-title: "WGCNA - # genes assigned to a module (non-gray)"
-output: html_notebook
----
-
-```{r "setup", include=FALSE}
-require("knitr")
-opts_knit$set(root.dir = "/work-zfs/abattle4/parsana/networks_correction_v/networks/")
-```
-
-```{r}
-rm(list = ls())
-library(reshape2)
-library(ggplot2)
-load("raw/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("Raw")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-```
-
-```{r}
-load("rin/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("RIN")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-```
-
-```{r}
-load("quarterpc/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("quarter-PC")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-```
-
-```{r}
-load("halfpc//wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("halfPC")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-```
-
-```{r}
-load("pc//wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("PC")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-```
diff --git a/rmd_analysis/genes_assigned_plots.nb.html b/rmd_analysis/genes_assigned_plots.nb.html
deleted file mode 100644
index 9efc696..0000000
--- a/rmd_analysis/genes_assigned_plots.nb.html
+++ /dev/null
@@ -1,292 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-WGCNA - # genes assigned to a module (non-gray)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
rm(list = ls())
-library(reshape2)
-library(ggplot2)
-load("raw/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("Raw")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-
-
-
-
-
-
-
-
-
-
load("rin/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("RIN")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-
-
-
-
-
-
-
-
-
-
load("quarterpc/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("quarter-PC")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-
-
-
-
-
-
-
-
-
-
load("halfpc//wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("halfPC")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-
-
-
-
-
-
-
-
-
-
load("pc//wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(which(x$colors!=0))))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("PC")+
- xlab("cut-height") + ylab("# genes assigned to modules")
-
-
-
-
-
-
-
LS0tCnRpdGxlOiAiV0dDTkEgLSAjIGdlbmVzIGFzc2lnbmVkIHRvIGEgbW9kdWxlIChub24tZ3JheSkiCm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KCmBgYHtyICJzZXR1cCIsIGluY2x1ZGU9RkFMU0V9CnJlcXVpcmUoImtuaXRyIikKb3B0c19rbml0JHNldChyb290LmRpciA9ICIvd29yay16ZnMvYWJhdHRsZTQvcGFyc2FuYS9uZXR3b3Jrc19jb3JyZWN0aW9uX3YvbmV0d29ya3MvIikKYGBgCgpgYGB7cn0Kcm0obGlzdCA9IGxzKCkpCmxpYnJhcnkocmVzaGFwZTIpCmxpYnJhcnkoZ2dwbG90MikKbG9hZCgicmF3L3dnY25hX25ldHdvcmtzLlJkYXRhIikKcGxvdC5tb2QgPC0gbGFwcGx5KGRhdC5uZXQsIGZ1bmN0aW9uKHkpIHNhcHBseSh5LCBmdW5jdGlvbih4KSBsZW5ndGgod2hpY2goeCRjb2xvcnMhPTApKSkpCnBsb3QubW9kIDwtIG1lbHQoZG8uY2FsbChjYmluZCwgcGxvdC5tb2QpKQpnZ3Bsb3QocGxvdC5tb2QsIGFlcyh4ID0gVmFyMSwgeSA9IHZhbHVlLCBjb2wgPSBWYXIyKSkgKyBnZW9tX3BvaW50KCkrZ2d0aXRsZSgiUmF3IikrCiAgeGxhYigiY3V0LWhlaWdodCIpICsgeWxhYigiIyBnZW5lcyBhc3NpZ25lZCB0byBtb2R1bGVzIikKYGBgCgpgYGB7cn0KbG9hZCgicmluL3dnY25hX25ldHdvcmtzLlJkYXRhIikKcGxvdC5tb2QgPC0gbGFwcGx5KGRhdC5uZXQsIGZ1bmN0aW9uKHkpIHNhcHBseSh5LCBmdW5jdGlvbih4KSBsZW5ndGgod2hpY2goeCRjb2xvcnMhPTApKSkpCnBsb3QubW9kIDwtIG1l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aGVpZ2h0IikgKyB5bGFiKCIjIGdlbmVzIGFzc2lnbmVkIHRvIG1vZHVsZXMiKQpgYGAKCmBgYHtyfQpsb2FkKCJwYy8vd2djbmFfbmV0d29ya3MuUmRhdGEiKQpwbG90Lm1vZCA8LSBsYXBwbHkoZGF0Lm5ldCwgZnVuY3Rpb24oeSkgc2FwcGx5KHksIGZ1bmN0aW9uKHgpIGxlbmd0aCh3aGljaCh4JGNvbG9ycyE9MCkpKSkKcGxvdC5tb2QgPC0gbWVsdChkby5jYWxsKGNiaW5kLCBwbG90Lm1vZCkpCmdncGxvdChwbG90Lm1vZCwgYWVzKHggPSBWYXIxLCB5ID0gdmFsdWUsIGNvbCA9IFZhcjIpKSArIGdlb21fcG9pbnQoKStnZ3RpdGxlKCJQQyIpKwogIHhsYWIoImN1dC1oZWlnaHQiKSArIHlsYWIoIiMgZ2VuZXMgYXNzaWduZWQgdG8gbW9kdWxlcyIpCmBgYAo=
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rmd_analysis/module_count_bytissue.Rmd b/rmd_analysis/module_count_bytissue.Rmd
deleted file mode 100644
index 0079a9e..0000000
--- a/rmd_analysis/module_count_bytissue.Rmd
+++ /dev/null
@@ -1,85 +0,0 @@
----
-title: "WGCNA - # genes assigned to a module (non-gray) by tissue"
-output: html_notebook
----
-
-```{r "setup", include=FALSE}
-require("knitr")
-opts_knit$set(root.dir = "/work-zfs/abattle4/parsana/networks_correction/networks/")
-```
-
-```{r}
-rm(list = ls())
-library(reshape2)
-library(ggplot2)
-load("raw/wgcna_networks.Rdata")
-tiss <- "Thyroid"
-raw <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("rin/wgcna_networks.Rdata")
-rin <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("quarterpc/wgcna_networks.Rdata")
-quarterPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("halfpc//wgcna_networks.Rdata")
-halfPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("pc//wgcna_networks.Rdata")
-pc <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-plot.mod <- melt(cbind(raw, rin, quarterPC, halfPC, pc))
-plot.mod$Var2 <- factor(plot.mod$Var2, levels = c("pc", "halfPC", "quarterPC", "rin", "raw"), labels = c("PC", "half-PC", "quarter-PC", "RIN", "uncorrected"))
-
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle(tiss)+
- xlab("cut-height") + ylab("# genes assigned to modules")
-```
-
-```{r}
-tiss <- "Subcutaneous"
-load("raw/wgcna_networks.Rdata")
-raw <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("rin/wgcna_networks.Rdata")
-rin <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("quarterpc/wgcna_networks.Rdata")
-quarterPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("halfpc//wgcna_networks.Rdata")
-halfPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("pc//wgcna_networks.Rdata")
-pc <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-plot.mod <- melt(cbind(raw, rin, quarterPC, halfPC, pc))
-plot.mod$Var2 <- factor(plot.mod$Var2, levels = c("pc", "halfPC", "quarterPC", "rin", "raw"), labels = c("PC", "half-PC", "quarter-PC", "RIN", "uncorrected"))
-
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle(tiss)+
- xlab("cut-height") + ylab("# genes assigned to modules")
-```
-
-```{r}
-tiss <- "Lung"
-load("raw/wgcna_networks.Rdata")
-raw <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("rin/wgcna_networks.Rdata")
-rin <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("quarterpc/wgcna_networks.Rdata")
-quarterPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("halfpc//wgcna_networks.Rdata")
-halfPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-load("pc//wgcna_networks.Rdata")
-pc <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-
-plot.mod <- melt(cbind(raw, rin, quarterPC, halfPC, pc))
-plot.mod$Var2 <- factor(plot.mod$Var2, levels = c("pc", "halfPC", "quarterPC", "rin", "raw"), labels = c("PC", "half-PC", "quarter-PC", "RIN", "uncorrected"))
-
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle(tiss)+
- xlab("cut-height") + ylab("# genes assigned to modules")
-```
-
diff --git a/rmd_analysis/module_count_bytissue.nb.html b/rmd_analysis/module_count_bytissue.nb.html
deleted file mode 100644
index 9f3f483..0000000
--- a/rmd_analysis/module_count_bytissue.nb.html
+++ /dev/null
@@ -1,296 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-WGCNA - # genes assigned to a module (non-gray) by tissue
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
rm(list = ls())
-library(reshape2)
-library(ggplot2)
-load("raw/wgcna_networks.Rdata")
-tiss <- "Thyroid"
-raw <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("rin/wgcna_networks.Rdata")
-rin <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("quarterpc/wgcna_networks.Rdata")
-quarterPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("halfpc//wgcna_networks.Rdata")
-halfPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("pc//wgcna_networks.Rdata")
-pc <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-plot.mod <- melt(cbind(raw, rin, quarterPC, halfPC, pc))
-plot.mod$Var2 <- factor(plot.mod$Var2, levels = c("pc", "halfPC", "quarterPC", "rin", "raw"), labels = c("PC", "half-PC", "quarter-PC", "RIN", "uncorrected"))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle(tiss)+
- xlab("cut-height") + ylab("# genes assigned to modules")
-
-
-
-
-
-
-
-
-
-
tiss <- "Subcutaneous"
-load("raw/wgcna_networks.Rdata")
-raw <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("rin/wgcna_networks.Rdata")
-rin <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("quarterpc/wgcna_networks.Rdata")
-quarterPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("halfpc//wgcna_networks.Rdata")
-halfPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("pc//wgcna_networks.Rdata")
-pc <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-plot.mod <- melt(cbind(raw, rin, quarterPC, halfPC, pc))
-plot.mod$Var2 <- factor(plot.mod$Var2, levels = c("pc", "halfPC", "quarterPC", "rin", "raw"), labels = c("PC", "half-PC", "quarter-PC", "RIN", "uncorrected"))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle(tiss)+
- xlab("cut-height") + ylab("# genes assigned to modules")
-
-
-
-
-
-
-
-
-
-
tiss <- "Lung"
-load("raw/wgcna_networks.Rdata")
-raw <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("rin/wgcna_networks.Rdata")
-rin <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("quarterpc/wgcna_networks.Rdata")
-quarterPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("halfpc//wgcna_networks.Rdata")
-halfPC <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-load("pc//wgcna_networks.Rdata")
-pc <- sapply(dat.net[[tiss]], function(x) length(which(x$colors!=0)))
-plot.mod <- melt(cbind(raw, rin, quarterPC, halfPC, pc))
-plot.mod$Var2 <- factor(plot.mod$Var2, levels = c("pc", "halfPC", "quarterPC", "rin", "raw"), labels = c("PC", "half-PC", "quarter-PC", "RIN", "uncorrected"))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle(tiss)+
- xlab("cut-height") + ylab("# genes assigned to modules")
-
-
-
-
-
-
-
-
-
LS0tCnRpdGxlOiAiV0dDTkEgLSAjIGdlbmVzIGFzc2lnbmVkIHRvIGEgbW9kdWxlIChub24tZ3JheSkgYnkgdGlzc3VlIgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgpgYGB7ciAic2V0dXAiLCBpbmNsdWRlPUZBTFNFfQpyZXF1aXJlKCJrbml0ciIpCm9wdHNfa25pdCRzZXQocm9vdC5kaXIgPSAiL3dvcmstemZzL2FiYXR0bGU0L3BhcnNhbmEvbmV0d29ya3NfY29ycmVjdGlvbi9uZXR3b3Jrcy8iKQpgYGAKCmBgYHtyfQpybShsaXN0ID0gbHMoKSkKbGlicmFyeShyZXNoYXBlMikKbGlicmFyeShnZ3Bsb3QyKQpsb2FkKCJyYXcvd2djbmFfbmV0d29ya3MuUmRhdGEiKQp0aXNzIDwtICJUaHlyb2lkIgpyYXcgPC0gc2FwcGx5KGRhdC5uZXRbW3Rpc3NdXSwgZnVuY3Rpb24oeCkgbGVuZ3RoKHdoaWNoKHgkY29sb3JzIT0wKSkpCgpsb2FkKCJyaW4vd2djbmFfbmV0d29ya3MuUmRhdGEiKQpyaW4gPC0gc2FwcGx5KGRhdC5uZXRbW3Rpc3NdXSwgZnVuY3Rpb24oeCkgbGVuZ3RoKHdoaWNoKHgkY29sb3JzIT0wKSkpCgpsb2FkKCJxdWFydGVycGMvd2djbmFfbmV0d29ya3MuUmRhdGEiKQpxdWFydGVyUEMgPC0gc2FwcGx5KGRhdC5uZXRbW3Rpc3NdXSwgZnVu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b21fcG9pbnQoKStnZ3RpdGxlKHRpc3MpKwogIHhsYWIoImN1dC1oZWlnaHQiKSArIHlsYWIoIiMgZ2VuZXMgYXNzaWduZWQgdG8gbW9kdWxlcyIpCmBgYAoK
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rmd_analysis/module_count_plots.Rmd b/rmd_analysis/module_count_plots.Rmd
deleted file mode 100644
index 1a88a22..0000000
--- a/rmd_analysis/module_count_plots.Rmd
+++ /dev/null
@@ -1,55 +0,0 @@
----
-title: "WGCNA module distribution"
-output: html_notebook
----
-
-```{r "setup", include=FALSE}
-require("knitr")
-opts_knit$set(root.dir = "/work-zfs/abattle4/parsana/networks_correction_v/networks/")
-```
-
-```{r}
-rm(list = ls())
-library(reshape2)
-library(ggplot2)
-load("raw/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("Raw")+
- xlab("cut-height") + ylab("# modules")
-```
-
-```{r}
-load("rin/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("RIN")+
- xlab("cut-height") + ylab("# modules")
-```
-
-```{r}
-load("quarterpc/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("quarter-PC")+
- xlab("cut-height") + ylab("# modules")
-```
-
-```{r}
-load("halfpc//wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("halfPC")+
- xlab("cut-height") + ylab("# modules")
-```
-
-```{r}
-load("pc//wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("PC")+
- xlab("cut-height") + ylab("# modules")
-```
diff --git a/rmd_analysis/module_count_plots.nb.html b/rmd_analysis/module_count_plots.nb.html
deleted file mode 100644
index 83ceb42..0000000
--- a/rmd_analysis/module_count_plots.nb.html
+++ /dev/null
@@ -1,285 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-WGCNA module distribution
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
load("rin/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("RIN")+
- xlab("cut-height") + ylab("# modules")
-
-
-
-
-
-
-
-
-
-
load("quarterpc/wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("quarter-PC")+
- xlab("cut-height") + ylab("# modules")
-
-
-
-
-
-
-
-
-
-
load("halfpc//wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("halfPC")+
- xlab("cut-height") + ylab("# modules")
-
-
-
-
-
-
-
-
-
-
load("pc//wgcna_networks.Rdata")
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- lapply(dat.net, function(y) sapply(y, function(x) length(unique(x$colors))-1))
-plot.mod <- melt(do.call(cbind, plot.mod))
-ggplot(plot.mod, aes(x = Var1, y = value, col = Var2)) + geom_point()+ggtitle("PC")+
- xlab("cut-height") + ylab("# modules")
-
-
-
-
-
-
-
LS0tCnRpdGxlOiAiV0dDTkEgbW9kdWxlIGRpc3RyaWJ1dGlvbiIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3IgInNldHVwIiwgaW5jbHVkZT1GQUxTRX0KcmVxdWlyZSgia25pdHIiKQpvcHRzX2tuaXQkc2V0KHJvb3QuZGlyID0gIi93b3JrLXpmcy9hYmF0dGxlNC9wYXJzYW5hL25ldHdvcmtzX2NvcnJlY3Rpb25fdi9uZXR3b3Jrcy8iKQpgYGAKCmBgYHtyfQpybShsaXN0ID0gbHMoKSkKbGlicmFyeShyZXNoYXBlMikKbGlicmFyeShnZ3Bsb3QyKQpsb2FkKCJyYXcvd2djbmFfbmV0d29ya3MuUmRhdGEiKQpwbG90Lm1vZCA8LSBsYXBwbHkoZGF0Lm5ldCwgZnVuY3Rpb24oeSkgc2FwcGx5KHksIGZ1bmN0aW9uKHgpIGxlbmd0aCh1bmlxdWUoeCRjb2xvcnMpKS0xKSkKcGxvdC5tb2QgPC0gbWVsdChkby5jYWxsK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ID0gVmFyMikpICsgZ2VvbV9wb2ludCgpK2dndGl0bGUoIlBDIikrCiAgeGxhYigiY3V0LWhlaWdodCIpICsgeWxhYigiIyBtb2R1bGVzIikKYGBgCg==
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rmd_analysis/plots/correlation_networks_Blood.pdf b/rmd_analysis/plots/correlation_networks_Blood.pdf
deleted file mode 100644
index 718c8aa..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Blood.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Blood.png b/rmd_analysis/plots/correlation_networks_Blood.png
deleted file mode 100644
index 60bcde7..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Blood.png and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Lung.pdf b/rmd_analysis/plots/correlation_networks_Lung.pdf
deleted file mode 100644
index b822617..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Lung.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Lung.png b/rmd_analysis/plots/correlation_networks_Lung.png
deleted file mode 100644
index 003c42a..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Lung.png and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Muscle.pdf b/rmd_analysis/plots/correlation_networks_Muscle.pdf
deleted file mode 100644
index 156682a..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Muscle.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Muscle.png b/rmd_analysis/plots/correlation_networks_Muscle.png
deleted file mode 100644
index 5489944..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Muscle.png and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Subcutaneous.pdf b/rmd_analysis/plots/correlation_networks_Subcutaneous.pdf
deleted file mode 100644
index da1939c..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Subcutaneous.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Subcutaneous.png b/rmd_analysis/plots/correlation_networks_Subcutaneous.png
deleted file mode 100644
index a118a68..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Subcutaneous.png and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Thyroid.pdf b/rmd_analysis/plots/correlation_networks_Thyroid.pdf
deleted file mode 100644
index 4b4af5a..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Thyroid.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/correlation_networks_Thyroid.png b/rmd_analysis/plots/correlation_networks_Thyroid.png
deleted file mode 100644
index 2b1e912..0000000
Binary files a/rmd_analysis/plots/correlation_networks_Thyroid.png and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Blood.pdf b/rmd_analysis/plots/wgcna_networks_Blood.pdf
deleted file mode 100644
index ee447ec..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Blood.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Blood.png b/rmd_analysis/plots/wgcna_networks_Blood.png
deleted file mode 100644
index 3e8b644..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Blood.png and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Lung.pdf b/rmd_analysis/plots/wgcna_networks_Lung.pdf
deleted file mode 100644
index fa07e37..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Lung.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Lung.png b/rmd_analysis/plots/wgcna_networks_Lung.png
deleted file mode 100644
index adf88f1..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Lung.png and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Muscle.pdf b/rmd_analysis/plots/wgcna_networks_Muscle.pdf
deleted file mode 100644
index 2e4b60b..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Muscle.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Muscle.png b/rmd_analysis/plots/wgcna_networks_Muscle.png
deleted file mode 100644
index 43c657c..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Muscle.png and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Subcutaneous.pdf b/rmd_analysis/plots/wgcna_networks_Subcutaneous.pdf
deleted file mode 100644
index 446d05b..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Subcutaneous.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Subcutaneous.png b/rmd_analysis/plots/wgcna_networks_Subcutaneous.png
deleted file mode 100644
index 27f1a4b..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Subcutaneous.png and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Thyroid.pdf b/rmd_analysis/plots/wgcna_networks_Thyroid.pdf
deleted file mode 100644
index c3de11a..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Thyroid.pdf and /dev/null differ
diff --git a/rmd_analysis/plots/wgcna_networks_Thyroid.png b/rmd_analysis/plots/wgcna_networks_Thyroid.png
deleted file mode 100644
index 582e59c..0000000
Binary files a/rmd_analysis/plots/wgcna_networks_Thyroid.png and /dev/null differ
diff --git a/rmd_analysis/plots/zoomed_correlation_networks_Blood.png b/rmd_analysis/plots/zoomed_correlation_networks_Blood.png
deleted file mode 100644
index 4976151..0000000
Binary files a/rmd_analysis/plots/zoomed_correlation_networks_Blood.png and /dev/null differ
diff --git a/rmd_analysis/plots/zoomed_correlation_networks_Lung.png b/rmd_analysis/plots/zoomed_correlation_networks_Lung.png
deleted file mode 100644
index 6163e10..0000000
Binary files a/rmd_analysis/plots/zoomed_correlation_networks_Lung.png and /dev/null differ
diff --git a/rmd_analysis/plots/zoomed_correlation_networks_Muscle.png b/rmd_analysis/plots/zoomed_correlation_networks_Muscle.png
deleted file mode 100644
index 8d75a65..0000000
Binary files a/rmd_analysis/plots/zoomed_correlation_networks_Muscle.png and /dev/null differ
diff --git a/rmd_analysis/plots/zoomed_correlation_networks_Subcutaneous.png b/rmd_analysis/plots/zoomed_correlation_networks_Subcutaneous.png
deleted file mode 100644
index 597e7e8..0000000
Binary files a/rmd_analysis/plots/zoomed_correlation_networks_Subcutaneous.png and /dev/null differ
diff --git a/rmd_analysis/plots/zoomed_correlation_networks_Thyroid.png b/rmd_analysis/plots/zoomed_correlation_networks_Thyroid.png
deleted file mode 100644
index 4ab904b..0000000
Binary files a/rmd_analysis/plots/zoomed_correlation_networks_Thyroid.png and /dev/null differ
diff --git a/rmd_analysis/thyroid_pc_foxe1.Rmd b/rmd_analysis/thyroid_pc_foxe1.Rmd
deleted file mode 100644
index 091a558..0000000
--- a/rmd_analysis/thyroid_pc_foxe1.Rmd
+++ /dev/null
@@ -1,56 +0,0 @@
----
-title: "Thyroid"
-output:
- pdf_document: default
- html_notebook: default
----
-
-Association of PC with FOXE1. Ensembl ID for FOXE1 = ENSG00000178919
-```{r}
-rm(list = ls())
-tiss <- "Thyroid"
-ensid <- "ENSG00000178919"
-## load subsetted raw expression data for thyroid
-load("../data/raw_subset.Rdata")
-
-## we only care about thyroid for this analysis - set dat.expr to thyroid
-dat.tiss.raw <- dat.expr[[tiss]]
-
-## which row is FOXE1?
-grep(ensid, rownames(dat.tiss.raw))
-ensid.dat <- rownames(dat.tiss.raw)[grep(ensid, rownames(dat.tiss.raw))]
-
-## load pc corrected data
-load("../data/pc_corrected.Rdata")
-## we only care about thyroid for this analysis - set dat.expr to thyroid
-dat.tiss.pc <- dat.expr[[tiss]]
-
-## which row is FOXE1?
-grep(ensid, rownames(dat.tiss.pc))
-print(ensid)
-print(rownames(dat.tiss.pc)[grep(ensid, rownames(dat.tiss.pc))])
-print(ensid.dat)
-```
-
-```{r}
-foxe.raw <- dat.tiss.raw[ensid.dat,]@assays$data$counts
-foxe.pc <- dat.tiss.pc[ensid.dat, ]@assays$data$counts
-```
-Association between raw foxe expression and PC
-```{r}
-# load PC loadings
-load("../data/pc_loadings.Rdata")
-raw.pve <- sapply(summary(lm(pc.loadings[[tiss]][,1:num.pc.estimates[[tiss]]]~t(foxe.raw))), function(x) x$r.squared)
-plot(c(1:num.pc.estimates[[tiss]]), raw.pve, col = "blue", pch = "*", xlab = "PC")
-```
-```{r}
-pc.pve <- sapply(summary(lm(pc.loadings[[tiss]][,1:num.pc.estimates[[tiss]]]~t(foxe.pc))), function(x) x$r.squared)*100
-plot(c(1:num.pc.estimates[[tiss]]), pc.pve, col = "red", pch = "*", xlab = "PC")
-```
-
-Add a new chunk by clicking the *Insert Chunk* button on the toolbar or by pressing *Cmd+Option+I*.
-
-When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the *Preview* button or press *Cmd+Shift+K* to preview the HTML file).
-
-The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike *Knit*, *Preview* does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
-
diff --git a/rmd_analysis/thyroid_pc_foxe1.nb.html b/rmd_analysis/thyroid_pc_foxe1.nb.html
deleted file mode 100644
index f7d69f0..0000000
--- a/rmd_analysis/thyroid_pc_foxe1.nb.html
+++ /dev/null
@@ -1,292 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-Thyroid
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Association of PC with FOXE1. Ensembl ID for FOXE1 = ENSG00000178919
-
-
-
-
rm(list = ls())
-tiss <- "Thyroid"
-ensid <- "ENSG00000178919"
-## load subsetted raw expression data for thyroid
-load("../data/raw_subset.Rdata")
-## we only care about thyroid for this analysis - set dat.expr to thyroid
-dat.tiss.raw <- dat.expr[[tiss]]
-## which row is FOXE1?
-grep(ensid, rownames(dat.tiss.raw))
-
-
-
[1] 3000
-
-
-
ensid.dat <- rownames(dat.tiss.raw)[grep(ensid, rownames(dat.tiss.raw))]
-## load pc corrected data
-load("../data/pc_corrected.Rdata")
-## we only care about thyroid for this analysis - set dat.expr to thyroid
-dat.tiss.pc <- dat.expr[[tiss]]
-## which row is FOXE1?
-grep(ensid, rownames(dat.tiss.pc))
-
-
-
[1] 3000
-
-
-
print(ensid)
-
-
-
[1] "ENSG00000178919"
-
-
-
print(rownames(dat.tiss.pc)[grep(ensid, rownames(dat.tiss.pc))])
-
-
-
[1] "ENSG00000178919.8"
-
-
-
print(ensid.dat)
-
-
-
[1] "ENSG00000178919.8"
-
-
-
-
-
-
-
foxe.raw <- dat.tiss.raw[ensid.dat,]@assays$data$counts
-foxe.pc <- dat.tiss.pc[ensid.dat, ]@assays$data$counts
-
-
-
-
Association between raw foxe expression and PC
-
-
-
-
-
-
-
-
-
-
-
-
-
Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Cmd+Option+I .
-
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).
-
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit , Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
-
-
-
LS0tCnRpdGxlOiAiVGh5cm9pZCIKb3V0cHV0OgogIHBkZl9kb2N1bWVudDogZGVmYXVsdAogIGh0bWxfbm90ZWJvb2s6IGRlZmF1bHQKLS0tCgpBc3NvY2lhdGlvbiBvZiBQQyB3aXRoIEZPWEUxLiBFbnNlbWJsIElEIGZvciBGT1hFMSA9IEVOU0cwMDAwMDE3ODkxOQpgYGB7cn0Kcm0obGlzdCA9IGxzKCkpCnRpc3MgPC0gIlRoeXJvaWQiCmVuc2lkIDwtICJFTlNHMDAwMDAxNzg5MTkiCiMjIGxvYWQgc3Vic2V0dGVkIHJhdyBleHByZXNzaW9uIGRhdGEgZm9yIHRoeXJvaWQKbG9hZCgiLi4vZGF0YS9yYXdfc3Vic2V0LlJkYXRhIikKCiMjIHdlIG9ubHkgY2FyZSBhYm91dCB0aHlyb2lkIGZvciB0aGlzIGFuYWx5c2lzIC0gc2V0IGRhdC5leHByIHRvIHRoeXJvaWQKZGF0LnRpc3MucmF3IDwtIGRhdC5leHByW1t0aXNzXV0KCiMjIHdoaWNoIHJvdyB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
-
-
-
-
-
-
-
-
-
diff --git a/rmd_analysis/total_expressionPVE_allcovariates.Rmd b/rmd_analysis/total_expressionPVE_allcovariates.Rmd
deleted file mode 100644
index d6bf381..0000000
--- a/rmd_analysis/total_expressionPVE_allcovariates.Rmd
+++ /dev/null
@@ -1,53 +0,0 @@
----
-title: "Total PVE by all covariates"
-output:
- html_notebook: default
- pdf_document: default
----
-
-
-```{r}
-rm(list = ls())
-library(RcppEigen)
-load("../data/raw_protein_coding_withGC.Rdata")
-
-## none of the covariates have NA --> total sum of squares can be computed before hand
-dat.cov <- lapply(gtex.rse, function(tiss) {
- cov.dat <- tiss@colData[,c(10, 11, 21:80, 83)]
- cov.dat <- cov.dat[,-which(sapply(cov.dat, function(x) length(unique(x))) == 1)]
- cov.dat <- cov.dat[, -which(colnames(cov.dat) %in% c("smunpdrd","smpthnts", "smtstptref", "smnabtch", "smnabtchd", "smgebtch"))] ## not enought unique entries in more than one category, < 50
- cov.dat
- })
-dat.expr <- lapply(gtex.rse, function(tiss) tiss@assays$data$counts)
-
-## compute the residuals
-residual.expr.dof <- mapply(function(x,y){
- x <- t(x)
- res.expr <- matrix(ncol = ncol(x), nrow = nrow(x))
- print(paste("begin"))
- for(i in 1:ncol(x)){
- lm.out <- fastLm(x[,i]~1+. , data = y)
- res.expr[,i] <- lm.out$residuals
- }
- list(residual_expression = res.expr, dof = lm.out$df.residual)
-}, dat.expr, dat.cov)
-
-residual.expr <- lapply(residual.expr.dof[1,], function(x) x)
-model.dof <- lapply(residual.expr.dof[2,], function(x) x)
-
-```
-Now that we have the expression data, residuals from the regression and dof - we can compute the adjusted r^2.
-```{r}
-tss <- lapply(dat.expr, function(x) (norm(x - rowMeans(x), type = "F"))^2)
-rss <- lapply(residual.expr, function(x) (norm(x, type = "F"))^2)
-
-total.covariate.pve <- vector("numeric", length = length(dat.expr))
-names(total.covariate.pve) <- names(dat.expr)
-for(i in 1:length(total.covariate.pve)){
- n <- ncol(dat.expr[[i]])
- r2 <- (tss[[i]] - rss[[i]])/tss[[i]]
- total.covariate.pve[i] <- 1 - ((1-r2) * ((n - 1) / model.dof[[i]]))
-}
-
-total.covariate.pve
-```
diff --git a/rmd_analysis/total_expressionPVE_allcovariates.nb.html b/rmd_analysis/total_expressionPVE_allcovariates.nb.html
deleted file mode 100644
index 643a398..0000000
--- a/rmd_analysis/total_expressionPVE_allcovariates.nb.html
+++ /dev/null
@@ -1,264 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-Total PVE by all covariates
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
rm(list = ls())
-library(RcppEigen)
-load("../data/raw_protein_coding_withGC.Rdata")
-
-## none of the covariates have NA --> total sum of squares can be computed before hand
-dat.cov <- lapply(gtex.rse, function(tiss) {
- cov.dat <- tiss@colData[,c(10, 11, 21:80, 83)]
- cov.dat <- cov.dat[,-which(sapply(cov.dat, function(x) length(unique(x))) == 1)]
- cov.dat <- cov.dat[, -which(colnames(cov.dat) %in% c("smunpdrd","smpthnts", "smtstptref", "smnabtch", "smnabtchd", "smgebtch"))] ## not enought unique entries in more than one category, < 50
- cov.dat
- })
-dat.expr <- lapply(gtex.rse, function(tiss) tiss@assays$data$counts)
-
-## compute the residuals
-residual.expr.dof <- mapply(function(x,y){
- x <- t(x)
- res.expr <- matrix(ncol = ncol(x), nrow = nrow(x))
- print(paste("begin"))
- for(i in 1:ncol(x)){
- lm.out <- fastLm(x[,i]~1+. , data = y)
- res.expr[,i] <- lm.out$residuals
- }
- list(residual_expression = res.expr, dof = lm.out$df.residual)
-}, dat.expr, dat.cov)
-
-residual.expr <- lapply(residual.expr.dof[1,], function(x) x)
-model.dof <- lapply(residual.expr.dof[2,], function(x) x)
-
-
-
-
-
Now that we have the expression data, residuals from the regression and dof - we can compute the adjusted r^2.
-
-
-
-
total.covariate.pve
-
-
-
-
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