Question: How to retrieve environment variables from custom build annotation packages
0
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 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