Problem with hgu133plus2.db package
1
0
Entering edit mode
@morten-hansen-3508
Last seen 9.6 years ago
I have a problem with the hgu133plus2.db package. Usually when I want to use the data from hgu133plus2GO2PROBE , I do the following: > a <- as.list( hgu133plus2GO2PROBE ) Works fine. Now I am making a package and need to do the same. When running a function inside the package that does the same as above I get the following error: Error in as.list.default(hgu133plus2GO2PROBE) : no method for coercing this S4 class to a vector > I also tried using mappedkeys() as explained in the example in help, but I get the same error. I have tested it on a clean R and Bioconductor installation. Any suggestions? My sessionInfo(): > sessionInfo() R version 2.9.0 (2009-04-17) x86_64-pc-linux-gnu locale: LC_CTYPE=en_DK.UTF-8;LC_NUMERIC=C;LC_TIME=en_DK.UTF-8;LC_COLLATE=en_DK .UTF-8;LC_MONETARY=C;LC_MESSAGES=en_DK.UTF-8;LC_PAPER=en_DK.UTF-8;LC_N AME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_DK.UTF-8;LC_IDENTI FICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] icmmUtils_1.0.0 biomaRt_2.0.0 hgu133plus2.db_2.2.11 annotate_1.22.0 annaffy_1.16.0 KEGG.db_2.2.11 [7] GO.db_2.2.11 RSQLite_0.7-1 DBI_0.2-4 AnnotationDbi_1.6.0 Biobase_2.4.1 loaded via a namespace (and not attached): [1] RCurl_0.98-1 XML_2.5-1 xtable_1.5-5 > Br - Morten Hansen
GO hgu133plus2 GO hgu133plus2 • 825 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 days ago
United States
Hi Morten -- Does your package have a namespace? Maybe you need to have Imports: AnnotationDbi in the DESCRIPTION file and importMethodsFrom(AnnotationDbi, as.list) in the NAMESPACE file. But is this really what you want to do? Maybe it's better to use the standard AnnotationDbi interface to extract just the information you're interested in, instead of making everything into a list? Martin Morten Hansen wrote: > I have a problem with the hgu133plus2.db package. > > Usually when I want to use the data from hgu133plus2GO2PROBE , I do the following: > >> a <- as.list( hgu133plus2GO2PROBE ) > > Works fine. > > Now I am making a package and need to do the same. When running a function inside the package that does the same as above I get the following error: > > Error in as.list.default(hgu133plus2GO2PROBE) : > no method for coercing this S4 class to a vector > > I also tried using mappedkeys() as explained in the example in help, but I get the same error. > > I have tested it on a clean R and Bioconductor installation. > > Any suggestions? > > My sessionInfo(): >> sessionInfo() > R version 2.9.0 (2009-04-17) > x86_64-pc-linux-gnu > > locale: > LC_CTYPE=en_DK.UTF-8;LC_NUMERIC=C;LC_TIME=en_DK.UTF-8;LC_COLLATE=en_ DK.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_DK.UTF-8;LC_PAPER=en_DK.UTF-8;LC _NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_DK.UTF-8;LC_IDEN TIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] icmmUtils_1.0.0 biomaRt_2.0.0 hgu133plus2.db_2.2.11 annotate_1.22.0 annaffy_1.16.0 KEGG.db_2.2.11 > [7] GO.db_2.2.11 RSQLite_0.7-1 DBI_0.2-4 AnnotationDbi_1.6.0 Biobase_2.4.1 > > loaded via a namespace (and not attached): > [1] RCurl_0.98-1 XML_2.5-1 xtable_1.5-5 > > Br - Morten Hansen > > _______________________________________________ > 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
Hi Martin Yes - my package is using a namespace. Everything worked fine after adding your suggestions to the DESCRIPTION and NAMESPACE files. I need all the info in the hgu133plus2GO2PROBE - I think... Which function from AnnotationDbi can you suggest to extract information with? Br - Morten ________________________________________ Fra: Martin Morgan [mtmorgan at fhcrc.org] Sendt: 16. juni 2009 13:41 Til: Morten Hansen Cc: bioconductor at stat.math.ethz.ch Emne: Re: [BioC] Problem with hgu133plus2.db package Hi Morten -- Does your package have a namespace? Maybe you need to have Imports: AnnotationDbi in the DESCRIPTION file and importMethodsFrom(AnnotationDbi, as.list) in the NAMESPACE file. But is this really what you want to do? Maybe it's better to use the standard AnnotationDbi interface to extract just the information you're interested in, instead of making everything into a list? Martin Morten Hansen wrote: > I have a problem with the hgu133plus2.db package. > > Usually when I want to use the data from hgu133plus2GO2PROBE , I do the following: > >> a <- as.list( hgu133plus2GO2PROBE ) > > Works fine. > > Now I am making a package and need to do the same. When running a function inside the package that does the same as above I get the following error: > > Error in as.list.default(hgu133plus2GO2PROBE) : > no method for coercing this S4 class to a vector > > I also tried using mappedkeys() as explained in the example in help, but I get the same error. > > I have tested it on a clean R and Bioconductor installation. > > Any suggestions? > > My sessionInfo(): >> sessionInfo() > R version 2.9.0 (2009-04-17) > x86_64-pc-linux-gnu > > locale: > LC_CTYPE=en_DK.UTF-8;LC_NUMERIC=C;LC_TIME=en_DK.UTF-8;LC_COLLATE=en_ DK.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_DK.UTF-8;LC_PAPER=en_DK.UTF-8;LC _NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_DK.UTF-8;LC_IDEN TIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] icmmUtils_1.0.0 biomaRt_2.0.0 hgu133plus2.db_2.2.11 annotate_1.22.0 annaffy_1.16.0 KEGG.db_2.2.11 > [7] GO.db_2.2.11 RSQLite_0.7-1 DBI_0.2-4 AnnotationDbi_1.6.0 Biobase_2.4.1 > > loaded via a namespace (and not attached): > [1] RCurl_0.98-1 XML_2.5-1 xtable_1.5-5 > > Br - Morten Hansen > > _______________________________________________ > 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
0
Entering edit mode
Hi Morten -- Morten Hansen wrote: > Hi Martin > > Yes - my package is using a namespace. > > Everything worked fine after adding your suggestions to the DESCRIPTION and NAMESPACE files. > > I need all the info in the hgu133plus2GO2PROBE - I think... I don't know what the function does, but I was supposing that you were going to look at only a subset of the GO ids in the table, and then perhaps you would subset the map using [, and perhaps mappedLkeys or the like to extract information mappedLkeys(hgu133plus2GO2PROBE[goids]) Basically, thinking that you only want a subset of the available information, and that it would pay to get only the information you want. Martin > Which function from AnnotationDbi can you suggest to extract information with? > > Br - Morten > > ________________________________________ > Fra: Martin Morgan [mtmorgan at fhcrc.org] > Sendt: 16. juni 2009 13:41 > Til: Morten Hansen > Cc: bioconductor at stat.math.ethz.ch > Emne: Re: [BioC] Problem with hgu133plus2.db package > > Hi Morten -- > > Does your package have a namespace? Maybe you need to have > > Imports: AnnotationDbi > > in the DESCRIPTION file and > > importMethodsFrom(AnnotationDbi, as.list) > > in the NAMESPACE file. But is this really what you want to do? Maybe > it's better to use the standard AnnotationDbi interface to extract just > the information you're interested in, instead of making everything into > a list? > > Martin > > Morten Hansen wrote: >> I have a problem with the hgu133plus2.db package. >> >> Usually when I want to use the data from hgu133plus2GO2PROBE , I do the following: >> >>> a <- as.list( hgu133plus2GO2PROBE ) >> Works fine. >> >> Now I am making a package and need to do the same. When running a function inside the package that does the same as above I get the following error: >> >> Error in as.list.default(hgu133plus2GO2PROBE) : >> no method for coercing this S4 class to a vector >> >> I also tried using mappedkeys() as explained in the example in help, but I get the same error. >> >> I have tested it on a clean R and Bioconductor installation. >> >> Any suggestions? >> >> My sessionInfo(): >>> sessionInfo() >> R version 2.9.0 (2009-04-17) >> x86_64-pc-linux-gnu >> >> locale: >> LC_CTYPE=en_DK.UTF-8;LC_NUMERIC=C;LC_TIME=en_DK.UTF-8;LC_COLLATE=en _DK.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_DK.UTF-8;LC_PAPER=en_DK.UTF-8;L C_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_DK.UTF-8;LC_IDE NTIFICATION=C >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] icmmUtils_1.0.0 biomaRt_2.0.0 hgu133plus2.db_2.2.11 annotate_1.22.0 annaffy_1.16.0 KEGG.db_2.2.11 >> [7] GO.db_2.2.11 RSQLite_0.7-1 DBI_0.2-4 AnnotationDbi_1.6.0 Biobase_2.4.1 >> >> loaded via a namespace (and not attached): >> [1] RCurl_0.98-1 XML_2.5-1 xtable_1.5-5 >> >> Br - Morten Hansen >> >> _______________________________________________ >> 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: 672 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