Guest User

Xavi

a guest
Nov 26th, 2010
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.38 KB | None | 0 0
  1.  
  2. ###################################################
  3. ### chunk number 3: annotations
  4. ###################################################
  5. stopifnot(require(Biobase, lib.loc = mylib))
  6.  
  7. source(file.path(codeDir,"AnalysisFunctions2Pack.R"))
  8.  
  9. arrayType <- "{$f_179}"
  10.  
  11. chipPackAvailable <- "{$f_20}"       # Si existeix un paquet BioC pel xip es posa a TRUE
  12. if (chipPackAvailable){
  13.   anotPackage <- "{$f_21}"             # Pot ser per exemple 'hgu133plus2' o 'mouse4302'
  14.   anotations.FileName <- "{$f_22}"   # Si hi ha chipPackage ha de ser NULL
  15.   symbolsTable <- "{$f_23}"          # Si hi ha chipPackage ha de ser NULL
  16.   entrezTable <- "{$f_24}"           # Si hi ha chipPackage ha de ser NULL
  17. }else{
  18.                                ### Si no hi ha paquet BioC pel xip
  19.   anotPackage <- "{$f_21}"            # Un paquet d'organisme com 'org.Hs.eg' o 'org.Mm.eg'
  20.   anotations.FileName <- "{$f_22}"    # Un paquet d'anotacions fet a ma 'HEAnnotation.txt'
  21.   if (!is.null(anotations.FileName)) {
  22.     if (!(exists("symbolsTable")))
  23.       symbolsTable <- creaAnot(dataDir, anotations.FileName, "Gene.Symbol")
  24.     if (!(exists("entrezTable")))
  25.       entrezTable <- creaAnot(dataDir,  anotations.FileName, "Entrez.Gene.ID")
  26.     my.annotations<-cbind(Entrez=entrezTable, Symbols=symbolsTable)
  27.     write.table(my.annotations, file=file.path(dataDir, "my.annotations.txt"), sep="\t", quote=F)
  28.   }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment