Skip to content
Snippets Groups Projects

Develop

Merged Gervaise Henry requested to merge develop into master
Viewing commit 0188ef5d
Next
Show latest version
1 file
+ 28
0
Preferences
File browser
Compare changes
+ 28
0
library(methods)
library(optparse)
library(Seurat)
library(readr)
library(fBasics)
library(pastecs)
library(qusage)
library(RColorBrewer)
load("./analysis/sc10x.Stress.Rda")
sc10x.Stress <- SetAllIdent(object=sc10x.Stress,id="ALL")
gene.exp <- as.data.frame(as.matrix(sc10x.Stress@raw.data[,colnames(sc10x.Stress@data)]))
genes.stress <- read_csv("./genesets/DEG_C2.CGP.M10970.txt")
genes.stress <- genes.stress[2:nrow(genes.stress),]
genes.stress <- as.list(genes.stress)
gene.stress.pct <- apply(gene.exp,2,function(x) sum(x[rownames(gene.exp) %in% unlist(genes.stress)])/sum(x))
histo <- hist(gene.stress.pct,breaks=100,prob=TRUE,plot=TRUE,main="Distribution of Stress Gene Expression in Transcriptome",xlab="% of transcriptome associated to stress genes")
abline(v=.00575,col="red")
sc10x.Stress <- SetAllIdent(object=sc10x.Stress,id="ALL+Stress")
cell.index.stress <- names(sc10x.Stress@ident[sc10x.Stress@ident=="Stress"])
cell.index.stress <- which(colnames(gene.exp) %in% cell.index.stress)
cell.index.ntstress <- names(sc10x.Stress@ident[sc10x.Stress@ident=="ALL"])
cell.index.ntstress <- which(colnames(gene.exp) %in% cell.index.ntstress)