How to load annotations for pkgENTREZID, pkgGENENAME dynamically?
1
0
Entering edit mode
@saurin-d-jani-944
Last seen 9.7 years ago
Dear BioC, Here is my R script code which is running on server in background. ################################## chiptype <- annotation(affy_batch_object); if(chiptype == "hu6800") { library(hu6800cdf); library(hu6800probe); library(hu6800); library(humanCHRLOC); library(humanLLMappings); envGeneNames <- hu6800GENENAME; # very important envPath2Probes <- hu6800PATH2PROBE; envGO2AllPROBES <- hu6800GO2ALLPROBES; envGENEIDS <- hu6800ENTREZID; # very important } and so on for commonly used AFFY Chips.... ################################## I have written this manually, how can I load annotations and packageENGREZID, packageGENENAME..etc. dynamically? I am currently working with Affy chips but I also like to work on Agilent chips in futureI. OR I just write a perl/php scripts which prints above information...thats my thinking. Thank you so much in advance, Saurin |------------------------------------------------ | Saurin D. Jani | Bioinformatician | | Department of Cell Biology and Anatomy | Medical University of South Carolina (MUSC) | 173 Ashley Ave | Charleston,SC - 29425 | | Email: jani at musc.edu | Phone: (843)792-1340 | Website: http://www.musc.edu/~jani |------------------------------------------------
affy affy • 735 views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
On Sat, Sep 27, 2008 at 9:57 AM, Jani, Saurin D <jani at="" musc.edu=""> wrote: > Dear BioC, > > Here is my R script code which is running on server in background. > ################################## > chiptype <- annotation(affy_batch_object); > > if(chiptype == "hu6800") > { > library(hu6800cdf); > library(hu6800probe); > library(hu6800); > library(humanCHRLOC); > library(humanLLMappings); > envGeneNames <- hu6800GENENAME; # very important > envPath2Probes <- hu6800PATH2PROBE; > envGO2AllPROBES <- hu6800GO2ALLPROBES; > envGENEIDS <- hu6800ENTREZID; # very important > } > > and so on for commonly used AFFY Chips.... > ################################## > > I have written this manually, how can I load annotations and packageENGREZID, packageGENENAME..etc. dynamically? > > I am currently working with Affy chips but I also like to work on Agilent chips in futureI. Hi, Saurin. You didn't give your sessionInfo(), but you will want to be using the .db packages and R-2.7 if possible, since those are now the standard for distributing annotation packages. You can look at the AnnotationDbi package vignette for details. That said, this will work for the older environment-base packages, if you like, thanks to the environment API. > annot <- 'hu6800' > l <- paste(annot,'.db',sep="") > library(l,character.only=TRUE) > geneNames <- as.list(get(paste(annot,'GENENAME',sep=""))) > geneNames[1:5] $A28102_at [1] "gamma-aminobutyric acid (GABA) A receptor, alpha 3" $AB000114_at [1] "osteomodulin" $AB000115_at [1] "interferon-induced protein 44-like" $AB000220_at [1] "sema domain, immunoglobulin domain (Ig), short basic domain, secreted, (semaphorin) 3C" $AB000381_s_at [1] "glycosylphosphatidylinositol anchored molecule like protein" > geneIDs <- as.list(get(paste(annot,'ENTREZID',sep=""))) > geneIDs[1:5] $A28102_at [1] "2556" $AB000114_at [1] "4958" $AB000115_at [1] "10964" $AB000220_at [1] "10512" $AB000381_s_at [1] "2765" > I just write a perl/php scripts which prints above information...thats my thinking. You could certainly do that, also, but I challenge you to do what was done above in 4 lines of code. : ) Sean
ADD COMMENT

Login before adding your answer.

Traffic: 654 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6