Question: How to retrieve environment variables from custom build annotation packages
0
gravatar for Chanchal Kumar
11.9 years ago by
Chanchal Kumar130 wrote:
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 • 435 views
ADD COMMENTlink modified 11.9 years ago by Wolfgang Huber13k • written 11.9 years ago by Chanchal Kumar130
Answer: How to retrieve environment variables from custom build annotation packages
0
gravatar for Wolfgang Huber
11.9 years ago by
EMBL European Molecular Biology Laboratory
Wolfgang Huber13k wrote:
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 COMMENTlink written 11.9 years ago by Wolfgang Huber13k
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 REPLYlink written 11.9 years ago by Chanchal Kumar130
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 125 users visited in the last hour