################################################### ### chunk number 1: eval=FALSE ################################################### ## #line 31 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ## annotation_HGU133Plus2<-read.csv('HG-U133_Plus_2_annot.csv',colClasses='character',comment.char='#') ################################################### ### chunk number 2: ################################################### #line 37 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" annotationFile<-system.file('extdata','HG-U133_Plus_2_annot_part.csv',package='annotationTools') annotation_HGU133Plus2<-read.csv(annotationFile,colClasses='character',comment.char='#') ################################################### ### chunk number 3: ################################################### #line 44 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" myPS<-c('117_at','1007_s_at') ################################################### ### chunk number 4: ################################################### #line 50 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" library(annotationTools) ################################################### ### chunk number 5: ################################################### #line 54 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" getGENESYMBOL(myPS,annotation_HGU133Plus2) ################################################### ### chunk number 6: ################################################### #line 62 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" getGENEONTOLOGY(myPS,annotation_HGU133Plus2) ################################################### ### chunk number 7: ################################################### #line 68 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" getGENEONTOLOGY(myPS,annotation_HGU133Plus2,specifics=2) ################################################### ### chunk number 8: ################################################### #line 76 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ls(grep('annotationTools',search())) ################################################### ### chunk number 9: ################################################### #line 82 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" colnames(annotation_HGU133Plus2) ################################################### ### chunk number 10: ################################################### #line 93 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" homologeneFile<-system.file('extdata','homologene_part.data',package='annotationTools') homologene<-read.delim(homologeneFile,header=FALSE) ################################################### ### chunk number 11: ################################################### #line 100 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" myGenes<-c(5982,93587) getHOMOLOG(myGenes,10090,homologene) ################################################### ### chunk number 12: ################################################### #line 109 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ps_human<-'1053_at' geneID_human<-getGENEID(ps_human,annotation_HGU133Plus2) geneID_mouse<-getHOMOLOG(geneID_human,10090,homologene) annotationFile<-system.file('extdata','Mouse430_2_annot_part.csv',package='annotationTools') annotation_Mouse4302<-read.csv(annotationFile,colClasses='character') geneID_mouse<-unlist(geneID_mouse) ps_mouse<-getPROBESET(geneID_mouse,annotation_Mouse4302) ps_mouse ################################################### ### chunk number 13: ################################################### #line 124 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" affyOrthologFile<-system.file('extdata','HG-U133_Plus_2_ortholog_part.csv',package='annotationTools') orthologs_HGU133Plus2<-read.csv(affyOrthologFile,colClasses='character') ################################################### ### chunk number 14: ################################################### #line 131 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" getHOMOLOG('1053_at','Mouse430_2',orthologs_HGU133Plus2,cluster=TRUE,clusterCol=1,speciesCol=4,idCol=3) ################################################### ### chunk number 15: eval=FALSE ################################################### ## #line 142 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ## orthoTable<-ps2ps(annotation_HGU133Plus2,annotation_Mouse4302,homologene,10090) ################################################### ### chunk number 16: eval=FALSE ################################################### ## #line 148 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ## annotation_HGU133Plus2<-read.csv('HG-U133_Plus_2_annot.csv',colClasses='character',comment.char='#') ## annotation_Mouse4302<-read.csv('Mouse430_2_annot.csv',colClasses='character',comment.char='#') ## homologene<-read.delim('homologene.data',header=F) ## target_species<-10090 ## ## ps_HGU133Plus2<-annotation_HGU133Plus2[,1] ## gid_HGU133Plus2<-getGENEID(ps_HGU133Plus2,annotation_HGU133Plus2) ## length_gid_HGU133Plus2<-sapply(gid_HGU133Plus2,function(x) {length(x)}) ## gid_Mouse4302<-getHOMOLOG(unlist(gid_HGU133Plus2),target_species,homologene) ## length_gid_Mouse4302<-sapply(gid_Mouse4302,function(x) {length(x)}) ## ps_Mouse4302<-getPROBESET(unlist(gid_Mouse4302),annotation_Mouse4302) ## ## ps_Mouse4302_1<-compactList(ps_Mouse4302,length_gid_Mouse4302) ## ps_Mouse4302_2<-compactList(ps_Mouse4302_1,length_gid_HGU133Plus2) ## gid_Mouse4302_1<-compactList(gid_Mouse4302,length_gid_HGU133Plus2) ################################################### ### chunk number 17: eval=FALSE ################################################### ## #line 168 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ## ps_Mouse4302_2<-lapply(ps_Mouse4302_2,function(x) {unique(x)}) ## ps_Mouse4302_2<-lapply(ps_Mouse4302_2,function(x) {if (length(x)>1) na.omit(x) else x}) ## gid_Mouse4302_1<-lapply(gid_Mouse4302_1,function(x) {unique(x)}) ## gid_Mouse4302_1<-lapply(gid_Mouse4302_1,function(x) {if (length(x)>1) na.omit(x) else x}) ################################################### ### chunk number 18: eval=FALSE ################################################### ## #line 177 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ## orthoTable<-cbind(ps_HGU133Plus2,listToCharacterVector(gid_HGU133Plus2,sep=','),listToCharacterVector(gid_Mouse4302_1,sep=','),listToCharacterVector(ps_Mouse4302_2,sep=',')) ## colnames(orthoTable)<-c('ps_HGU133Plus2','gid_HGU133Plus2','gid_Mouse4302','ps_Mouse4302') ## write.table(orthoTable,file='HGU133Plus2_Mouse4302.txt',sep='\t',col.names=T,row.names=F) ################################################### ### chunk number 19: eval=FALSE ################################################### ## #line 185 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ## orthoTable<-ps2ps(annotation_HGU133Plus2,annotation_Mouse4302,homologene,10090) ## write.table(orthoTable,file='HGU133Plus2_Mouse4302.txt',sep='\t',col.names=T,row.names=F) ################################################### ### chunk number 20: ################################################### #line 200 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" data(orthologs_example) ################################################### ### chunk number 21: ################################################### #line 206 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" selection<-1:8 ps_mouse<-table_mouse$Probe.Set.ID[selection] table_mouse[selection,] ################################################### ### chunk number 22: ################################################### #line 214 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" orthops<-getOrthologousProbesets(ps_mouse,table_human,ortho) orthops[[1]] ################################################### ### chunk number 23: ################################################### #line 221 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" table_human_absM<-data.frame(I(table_human[,1]),I(abs(table_human[,2]))) ################################################### ### chunk number 24: ################################################### #line 227 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" orthops_maxAbsM<-getOrthologousProbesets(ps_mouse,table_human_absM,ortho,max,forceProbesetSelection=TRUE) orthops_maxAbsM[[1]] ################################################### ### chunk number 25: ################################################### #line 234 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" orthops_maxAbsM_ind<-match(unlist(orthops_maxAbsM[[1]]),table_human[,1]) table_human[orthops_maxAbsM_ind,2] ################################################### ### chunk number 26: ################################################### #line 243 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" table_human_absT<-data.frame(I(table_human[,1]),I(abs(table_human[,3]))) orthops_maxAbsT<-getOrthologousProbesets(ps_mouse,table_human_absT,ortho,max,forceProbesetSelection=TRUE) orthops_maxAbsT_ind<-match(unlist(orthops_maxAbsT[[1]]),table_human[,1]) plot(table_mouse[selection,2],table_human[orthops_maxAbsM_ind,2],pch=19,col='gray',cex=1.5,xlab='log fold change in mouse',ylab='log fold change in human') abline(h=0) abline(v=0) abline(0,1) points(table_mouse[selection,2],table_human[orthops_maxAbsT_ind,2],pch=3,col=1) ################################################### ### chunk number 27: ################################################### #line 260 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ps_human<-ortho[match(ps_mouse,ortho[,1]),4] ps_human ################################################### ### chunk number 28: ################################################### #line 267 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ps_human<-lapply(ps_human,function(x){strsplit(x,',')[[1]]}) length_ps_human<-sapply(ps_human,length) gs_human<-lapply(ps_human,function(x){listToCharacterVector(getGENESYMBOL(x,annot_HGU133A))}) gs_human ################################################### ### chunk number 29: ################################################### #line 276 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" existing_ps_human<-!is.na(ps_human) ################################################### ### chunk number 30: ################################################### #line 282 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" LFC_mouse<-table_mouse$M[rep(match(ps_mouse[existing_ps_human],table_mouse$Probe.Set.ID),length_ps_human[existing_ps_human])] ################################################### ### chunk number 31: ################################################### #line 288 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" LFC_human<-table_human$log2FC.HD.caudate.grade.0.2.vs.controls[match(unlist(ps_human[existing_ps_human]),table_human$Probe.Set.ID)] ################################################### ### chunk number 32: eval=FALSE ################################################### ## #line 294 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" ## plot(LFC_mouse,LFC_human,col=rep(1:length(ps_human[existing_ps_human]),length_ps_human[existing_ps_human]),pch=16,cex=1.5,xlab='log fold change in mouse',ylab='log fold change in human') ## abline(h=0) ## abline(v=0) ## abline(0,1) ## legend(x=0.25,y=-0.77,legend=lapply(gs_human[existing_ps_human],function(x){paste(unique(x),sep=',')}),text.col=1:length(ps_human[existing_ps_human])) ################################################### ### chunk number 33: ################################################### #line 304 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" plot(LFC_mouse,LFC_human,col=rep(1:length(ps_human[existing_ps_human]),length_ps_human[existing_ps_human]),pch=16,cex=1.5,xlab='log fold change in mouse',ylab='log fold change in human') abline(h=0) abline(v=0) abline(0,1) legend(x=0.25,y=-0.77,legend=lapply(gs_human[existing_ps_human],function(x){paste(unique(x),collapse=',')}),text.col=1:length(ps_human[existing_ps_human])) ################################################### ### chunk number 34: ################################################### #line 323 "vignettes/annotationTools/inst/doc/annotationTools.Rnw" sessionInfo()