How to retrieve environment variables from custom build annotation packages
1
0
Entering edit mode
@chanchal-kumar-2465
Last seen 10.2 years ago
Dear Bioconductor Developers and Users, I have a custom annotation package which I created using "AnnBuilder" package. The package named "ipihs324" has annotation for IPI identifiers and contains mappings to Entrez ids in the environment variable ipihs324ENTREZID. Now when I provide this environment directly like : l <- mget("IPI00000948",ipihs324ENTREZID,ifnotfound=list("FALSE")) then I get result. > l $IPI00000948 [1] 26608 But if I try as following: > env<-paste("ipihs324","ENTREZID",sep="") > l <- mget("IPI00000948",env,ifnotfound=list("FALSE")) I get this error: ########################## Error in mget("IPI00000948", env, ifnotfound = list("FALSE")) : second argument must be an environment ########################## As I want to write a generic code for loading any data package and then retrieve its environment for Entrez ids mappings, so I need to do it this second way. Can anyone suggest how to convert the string type to an environment type? I have tried as.environment() but that too doesn't work. Any suggestions and comments will be very helpful. Best Regards, Chanchal =============================== Chanchal Kumar, Ph.D. Candidate Dept. of Proteomics and Signal Transduction Max Planck Institute of Biochemistry Am Klopferspitz 18 82152 D-Martinsried (near Munich) Germany e-mail: chanchal at biochem.mpg.de Phone: (Office) +49 (0) 89 8578 2296 Fax:(Office) +49 (0) 89 8578 2219 http://www.biochem.mpg.de/mann/ ===============================
Proteomics Annotation convert Proteomics Annotation convert • 1.1k views
ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 3 months ago
EMBL European Molecular Biology Laborat…
Dear Chanchal, try env = get(paste("ipihs324","ENTREZID",sep="")) l = mget("IPI00000948",env,ifnotfound=list("FALSE")) ? get Best wishes Wolfgang ------------------------------------------------------------------ Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber > Dear Bioconductor Developers and Users, > > I have a custom annotation package which I created using "AnnBuilder" > package. The package named "ipihs324" has annotation for IPI identifiers > and contains mappings to Entrez ids in the environment variable > ipihs324ENTREZID. > > Now when I provide this environment directly like : > l <- mget("IPI00000948",ipihs324ENTREZID,ifnotfound=list("FALSE")) > > then I get result. > >> l > $IPI00000948 > [1] 26608 > > But if I try as following: >> env<-paste("ipihs324","ENTREZID",sep="") > >> l <- mget("IPI00000948",env,ifnotfound=list("FALSE")) > > I get this error: > ########################## > Error in mget("IPI00000948", env, ifnotfound = list("FALSE")) : > second argument must be an environment > ########################## > > As I want to write a generic code for loading any data package and then > retrieve its environment for Entrez ids mappings, so I need to do it > this second way. Can anyone suggest how to convert the string type to an > environment type? I have tried as.environment() but that too doesn't > work. Any suggestions and comments will be very helpful. > > Best Regards, > Chanchal > =============================== > Chanchal Kumar, Ph.D. Candidate > Dept. of Proteomics and Signal Transduction > Max Planck Institute of Biochemistry > Am Klopferspitz 18 > 82152 D-Martinsried (near Munich) > Germany > e-mail: chanchal at biochem.mpg.de > Phone: (Office) +49 (0) 89 8578 2296 > Fax:(Office) +49 (0) 89 8578 2219 > http://www.biochem.mpg.de/mann/ > =============================== > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Dear Dr. Huber, Thank you very much for your suggestion. It really helped. Best Regards, Chanchal =============================== Chanchal Kumar, Ph.D. Candidate Dept. of Proteomics and Signal Transduction Max Planck Institute of Biochemistry Am Klopferspitz 18 82152 D-Martinsried (near Munich) Germany e-mail: chanchal at biochem.mpg.de Phone: (Office) +49 (0) 89 8578 2296 Fax:(Office) +49 (0) 89 8578 2219 http://www.biochem.mpg.de/mann/ =============================== -----Original Message----- From: Wolfgang Huber [mailto:huber@ebi.ac.uk] Sent: Sunday, December 09, 2007 6:04 PM To: Chanchal Kumar Cc: bioconductor at stat.math.ethz.ch Subject: Re: [BioC] How to retrieve environment variables from custom build annotation packages Dear Chanchal, try env = get(paste("ipihs324","ENTREZID",sep="")) l = mget("IPI00000948",env,ifnotfound=list("FALSE")) ? get Best wishes Wolfgang ------------------------------------------------------------------ Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber > Dear Bioconductor Developers and Users, > > I have a custom annotation package which I created using "AnnBuilder" > package. The package named "ipihs324" has annotation for IPI identifiers > and contains mappings to Entrez ids in the environment variable > ipihs324ENTREZID. > > Now when I provide this environment directly like : > l <- mget("IPI00000948",ipihs324ENTREZID,ifnotfound=list("FALSE")) > > then I get result. > >> l > $IPI00000948 > [1] 26608 > > But if I try as following: >> env<-paste("ipihs324","ENTREZID",sep="") > >> l <- mget("IPI00000948",env,ifnotfound=list("FALSE")) > > I get this error: > ########################## > Error in mget("IPI00000948", env, ifnotfound = list("FALSE")) : > second argument must be an environment > ########################## > > As I want to write a generic code for loading any data package and then > retrieve its environment for Entrez ids mappings, so I need to do it > this second way. Can anyone suggest how to convert the string type to an > environment type? I have tried as.environment() but that too doesn't > work. Any suggestions and comments will be very helpful. > > Best Regards, > Chanchal > =============================== > Chanchal Kumar, Ph.D. Candidate > Dept. of Proteomics and Signal Transduction > Max Planck Institute of Biochemistry > Am Klopferspitz 18 > 82152 D-Martinsried (near Munich) > Germany > e-mail: chanchal at biochem.mpg.de > Phone: (Office) +49 (0) 89 8578 2296 > Fax:(Office) +49 (0) 89 8578 2219 > http://www.biochem.mpg.de/mann/ > =============================== > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY

Login before adding your answer.

Traffic: 547 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