# We need to have gex, the exprs for all cell lines # and ec50, the ec50 values processOVCACellLineGenes<-function(gex, ec50, threshold=0.85) { affy.control<-grep("AFFX",rownames(gex),value=T) XX<-gex[which(!rownames(gex) %in% affy.control),] #-- C13 C13.exprs<-XX[,c("C13","C13_1.3.3","C13_3.3.6", "C13_2.3.3","C13_4.3.6", "C13_3.3.3","C13_5.3.6")] C13.ec50<-ec50["C13",c("baseline","X133","X336", "X233","X436","X333","X536")] # Get range of expression per gene C13.range<-apply(C13.exprs,1,function(y){max(y)-min(y)}) # Keep only 2-fold or greater genes C13.real.exprs<-C13.exprs[which(C13.range>1),] # Get correlations from these with ec50 values C13.cor<<-apply(C13.real.exprs,1,function(y){ cor(y,C13.ec50)}) # Finally record the values C13.genes<<-C13.cor[which(abs(C13.cor)>threshold)] write.table(C13.genes,file="C13.genes.txt",sep="\t",quote=F) #-- OV2008 OV2008.exprs<-XX[,c("OV2008","OV2008_1.3.3","OV2008_3.3.6", "OV2008_2.3.3","OV2008_4.3.6", "OV2008_3.3.3","OV2008_5.3.6")] OV2008.ec50<-ec50["OV2008",c("baseline","X133","X336", "X233","X436","X333","X536")] # Get range of expression per gene OV2008.range<-apply(OV2008.exprs,1,function(y){max(y)-min(y)}) # Keep only 2-fold or greater genes OV2008.real.exprs<-OV2008.exprs[which(OV2008.range>1),] # Get correlations from these with ec50 values OV2008.cor<<-apply(OV2008.real.exprs,1,function(y){ cor(y,OV2008.ec50)}) # Finally record the values OV2008.genes<<-OV2008.cor[which(abs(OV2008.cor)>threshold)] write.table(OV2008.genes,file="OV2008.genes.txt",sep="\t",quote=F) #-- IGROV1 IGROV1.exprs<-XX[,c("IGROV1","IGROV1_1.3.3","IGROV1_3.3.6", "IGROV1_2.3.3","IGROV1_4.3.6", "IGROV1_3.3.3","IGROV1_5.3.6")] IGROV1.ec50<-ec50["IGROV1",c("baseline","X133","X336", "X233","X436","X333","X536")] # Get range of expression per gene IGROV1.range<-apply(IGROV1.exprs,1,function(y){max(y)-min(y)}) # Keep only 2-fold or greater genes IGROV1.real.exprs<-IGROV1.exprs[which(IGROV1.range>1),] # Get correlations from these with ec50 values IGROV1.cor<<-apply(IGROV1.real.exprs,1,function(y){ cor(y,IGROV1.ec50)}) # Finally record the values IGROV1.genes<<-IGROV1.cor[which(abs(IGROV1.cor)>threshold)] write.table(IGROV1.genes,file="IGROV1.genes.txt",sep="\t",quote=F) #-- T8 T8.exprs<-XX[,c("T8","T8_1.3.3","T8_3.3.6", "T8_2.3.3","T8_4.3.6", "T8_3.3.3","T8_5.3.6")] T8.ec50<-ec50["T8",c("baseline","X133","X336", "X233","X436","X333","X536")] # Get range of expression per gene T8.range<-apply(T8.exprs,1,function(y){max(y)-min(y)}) # Keep only 2-fold or greater genes T8.real.exprs<-T8.exprs[which(T8.range>1),] # Get correlations from these with ec50 values T8.cor<<-apply(T8.real.exprs,1,function(y){ cor(y,T8.ec50)}) # Finally record the values T8.genes<<-T8.cor[which(abs(T8.cor)>threshold)] write.table(T8.genes,file="T8.genes.txt",sep="\t",quote=F) #-- A2008 A2008.exprs<-XX[,c("A2008","A2008_1.3.3","A2008_3.3.6", "A2008_2.3.3","A2008_4.3.6", "A2008_3.3.3","A2008_5.3.6")] A2008.ec50<-ec50["A2008",c("baseline","X133","X336", "X233","X436","X333","X536")] # Get range of expression per gene A2008.range<-apply(A2008.exprs,1,function(y){max(y)-min(y)}) # Keep only 2-fold or greater genes A2008.real.exprs<-A2008.exprs[which(A2008.range>1),] # Get correlations from these with ec50 values A2008.cor<<-apply(A2008.real.exprs,1,function(y){ cor(y,A2008.ec50)}) # Finally record the values A2008.genes<<-A2008.cor[which(abs(A2008.cor)>threshold)] write.table(A2008.genes,file="A2008.genes.txt",sep="\t",quote=F) #-- A2780S A2780S.exprs<-XX[,c("A2780S","A2780S_1.3.3","A2780S_3.3.6", "A2780S_2.3.3","A2780S_4.3.6", "A2780S_3.3.3","A2780S_5.3.6")] A2780S.ec50<-ec50["A2780S",c("baseline","X133","X336", "X233","X436","X333","X536")] # Get range of expression per gene A2780S.range<-apply(A2780S.exprs,1,function(y){max(y)-min(y)}) # Keep only 2-fold or greater genes A2780S.real.exprs<-A2780S.exprs[which(A2780S.range>1),] # Get correlations from these with ec50 values A2780S.cor<<-apply(A2780S.real.exprs,1,function(y){ cor(y,A2780S.ec50)}) # Finally record the values A2780S.genes<<-A2780S.cor[which(abs(A2780S.cor)>threshold)] write.table(A2780S.genes,file="A2780S.genes.txt",sep="\t",quote=F) #-- A2780CP A2780CP.exprs<-XX[,c("A2780CP","A2780CP_1.3.3","A2780CP_3.3.6", "A2780CP_2.3.3","A2780CP_4.3.6", "A2780CP_3.3.3","A2780CP_5.3.6")] A2780CP.ec50<-ec50["A2780CP",c("baseline","X133","X336", "X233","X436","X333","X536")] # Get range of expression per gene A2780CP.range<-apply(A2780CP.exprs,1,function(y){max(y)-min(y)}) # Keep only 2-fold or greater genes A2780CP.real.exprs<-A2780CP.exprs[which(A2780CP.range>1),] # Get correlations from these with ec50 values A2780CP.cor<<-apply(A2780CP.real.exprs,1,function(y){ cor(y,A2780CP.ec50)}) # Finally record the values A2780CP.genes<<-A2780CP.cor[which(abs(A2780CP.cor)>threshold)] write.table(A2780CP.genes,file="A2780CP.genes.txt",sep="\t",quote=F) #-- OVCAR5 OVCAR5.exprs<-XX[,c("OVCAR5","OVCAR5_1.3.3","OVCAR5_3.3.6", "OVCAR5_2.3.3","OVCAR5_4.3.6", "OVCAR5_3.3.3","OVCAR5_5.3.6")] OVCAR5.ec50<-ec50["OVCAR5",c("baseline","X133","X336", "X233","X436","X333","X536")] # Get range of expression per gene OVCAR5.range<-apply(OVCAR5.exprs,1,function(y){max(y)-min(y)}) # Keep only 2-fold or greater genes OVCAR5.real.exprs<-OVCAR5.exprs[which(OVCAR5.range>1),] # Get correlations from these with ec50 values OVCAR5.cor<<-apply(OVCAR5.real.exprs,1,function(y){ cor(y,OVCAR5.ec50)}) # Finally record the values OVCAR5.genes<<-OVCAR5.cor[which(abs(OVCAR5.cor)>threshold)] write.table(OVCAR5.genes,file="OVCAR5.genes.txt",sep="\t",quote=F) }