Examples outdated in "Bioinformatics and Computational Biology Solutions Using R and Bioconductor"
1
0
Entering edit mode
Heidi Dvinge ★ 2.0k
@heidi-dvinge-2195
Last seen 10.3 years ago
Hello Peng, please keep discussions to the list, so that other people can chime in as well. I'm not familiar with the details of xtable, but in the example you link to below it seems like the function xtable.matrix() does exist, but it's not exported by the name space. However, simply using xtable() works fine for me, and gives the same result at calling xtable.matrix() specifically (code shown below). There might be an updated version of the examples from "Bioinformatics and Computational Biology Solutions Using R and Bioconductor" somewhere; someone else can probably tell you. My best advice though is, that when something doesn't work, simply do a search for that function/package ;) Typing ?xtable.matrix gives you the xtable help page, which a.o. says "The available method functions for xtable are given by methods(xtable)." Regards \Heidi > library(GO.db) > library(xtable) > methods(xtable) [1] xtable.anova* xtable.aov* xtable.aovlist* xtable.coxph* [5] xtable.data.frame* xtable.glm* xtable.lm* xtable.matrix* [9] xtable.prcomp* xtable.summary.aov* xtable.summary.aovlist* xtable.summary.glm* [13] xtable.summary.lm* xtable.summary.prcomp* xtable.table* xtable.ts* [17] xtable.zoo* Non-visible functions are asterisked > goTerms <- contents(GOTERM) > goCats <- sapply(goTerms, Ontology) > gCnums <- table(goCats)[c("BP","CC", "MF")] > gCmat <- matrix(as.integer(gCnums), dimnames=list(c("BP","CC","MF"), "Number of terms")) > xtable.matrix(gCmat, display=c("d","d"), caption="Number of GO terms per ontology.", label="ta:GOprops") Error: could not find function "xtable.matrix" > xtable:::xtable.matrix(gCmat, display=c("d","d"), caption="Number of GO terms per ontology.", label="ta:GOprops") % latex table generated in R 2.9.0 by xtable 1.5-5 package % Sun Aug 9 13:17:48 2009 \begin{table}[ht] \begin{center} \begin{tabular}{rr} \hline & Number of terms \\ \hline BP & 16067 \\ CC & 2297 \\ MF & 8506 \\ \hline \end{tabular} \caption{Number of GO terms per ontology.} \label{ta:GOprops} \end{center} \end{table} > xtable(gCmat, display=c("d","d"), caption="Number of GO terms per ontology.", label="ta:GOprops") % latex table generated in R 2.9.0 by xtable 1.5-5 package % Sun Aug 9 13:17:59 2009 \begin{table}[ht] \begin{center} \begin{tabular}{rr} \hline & Number of terms \\ \hline BP & 16067 \\ CC & 2297 \\ MF & 8506 \\ \hline \end{tabular} \caption{Number of GO terms per ontology.} \label{ta:GOprops} \end{center} \end{table} > sessionInfo() R version 2.9.0 (2009-04-17) i386-apple-darwin8.11.1 locale: en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] xtable_1.5-5 GO.db_2.2.11 RSQLite_0.7-1 DBI_0.2-4 AnnotationDbi_1.6.0 [6] Biobase_2.4.1 loaded via a namespace (and not attached): [1] tools_2.9.0 > Hi Heidi, > > I have figured out how to change the package names. But there are > still some command that is not running, for example 'xtable.matrix' in > the script that I pointed out in my orginal post. > > Could you please take a look how to correct these commands? > > Regards, > Peng > > On Sun, Aug 9, 2009 at 2:58 AM, Heidi Dvinge<heidi at="" ebi.ac.uk=""> wrote: >> Hi Peng, >> >> in general, all the annotation package now have an ".db" ending to >> reflect >> an underlying change to a database structure. In this particular case >> you'd therefore want GO.db, but the same would apply to e.g. KEGG.db, >> and >> all the chip annotation packages (moe430a.db, hgu133a.db, >> mogene10stprobeset.db etc.). >> >> Please see >> http://www.bioconductor.org/packages/release/AnnotationData.html for all >> the annotation packages. >> >> Best >> \Heidi >> >> >>> Hi, >>> >>> The examples in "Bioinformatics and Computational Biology Solutions >>> Using R and Bioconductor" are outdated. For example, I don't find the >>> package "GO" in >>> http://www.bioconductor.org/mogr/chapter-code/metaOverview.R >>> >>> I'm wondering if somebody can help updated the examples to reflect the >>> changes in BioC in the last 4 years. >>> >>> Regards, >>> Peng >>> >>> _______________________________________________ >>> 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 >>> >> >> >> >
Annotation GO hgu133a Annotation GO hgu133a • 1.6k views
ADD COMMENT
0
Entering edit mode
Peng Yu ▴ 940
@peng-yu-3586
Last seen 10.3 years ago
Hi, I still run into other problems with the following fixes. Can some more experienced BioC user help update these files and post them on BioC website? All new users will appreciate your help! Regards, Peng On Sun, Aug 9, 2009 at 7:30 AM, Heidi Dvinge<heidi at="" ebi.ac.uk=""> wrote: > Hello Peng, > > please keep discussions to the list, so that other people can chime in as > well. > > I'm not familiar with the details of xtable, but in the example you link > to below it seems like the function xtable.matrix() does exist, but it's > not exported by the name space. However, simply using xtable() works fine > for me, and gives the same result at calling xtable.matrix() specifically > (code shown below). > > There might be an updated version of the examples from "Bioinformatics and > Computational Biology Solutions Using R and Bioconductor" somewhere; > someone else can probably tell you. My best advice though is, that when > something doesn't work, simply do a search for that function/package ;) > Typing ?xtable.matrix gives you the xtable help page, which a.o. says "The > available method functions for xtable are given by methods(xtable)." > > Regards > \Heidi > >> library(GO.db) >> library(xtable) >> methods(xtable) > ?[1] xtable.anova* ? ? ? ? ? xtable.aov* ? ? ? ? ? ? xtable.aovlist* > ?xtable.coxph* > ?[5] xtable.data.frame* ? ? ?xtable.glm* ? ? ? ? ? ? xtable.lm* > ?xtable.matrix* > ?[9] xtable.prcomp* ? ? ? ? ?xtable.summary.aov* > xtable.summary.aovlist* xtable.summary.glm* > [13] xtable.summary.lm* ? ? ?xtable.summary.prcomp* ?xtable.table* > ?xtable.ts* > [17] xtable.zoo* > > ? Non-visible functions are asterisked >> ?goTerms <- contents(GOTERM) >> goCats <- sapply(goTerms, Ontology) >> ?gCnums <- table(goCats)[c("BP","CC", "MF")] >> gCmat <- matrix(as.integer(gCnums), dimnames=list(c("BP","CC","MF"), > "Number of terms")) >> ?xtable.matrix(gCmat, display=c("d","d"), caption="Number of GO terms > per ontology.", label="ta:GOprops") > Error: could not find function "xtable.matrix" >> xtable:::xtable.matrix(gCmat, display=c("d","d"), caption="Number of GO > terms per ontology.", label="ta:GOprops") > % latex table generated in R 2.9.0 by xtable 1.5-5 package > % Sun Aug ?9 13:17:48 2009 > \begin{table}[ht] > \begin{center} > \begin{tabular}{rr} > ?\hline > ?& Number of terms \\ > ?\hline > BP & 16067 \\ > ?CC & 2297 \\ > ?MF & 8506 \\ > ? \hline > \end{tabular} > \caption{Number of GO terms per ontology.} > \label{ta:GOprops} > \end{center} > \end{table} >> xtable(gCmat, display=c("d","d"), caption="Number of GO terms per > ontology.", label="ta:GOprops") > % latex table generated in R 2.9.0 by xtable 1.5-5 package > % Sun Aug ?9 13:17:59 2009 > \begin{table}[ht] > \begin{center} > \begin{tabular}{rr} > ?\hline > ?& Number of terms \\ > ?\hline > BP & 16067 \\ > ?CC & 2297 \\ > ?MF & 8506 \\ > ? \hline > \end{tabular} > \caption{Number of GO terms per ontology.} > \label{ta:GOprops} > \end{center} > \end{table} >> sessionInfo() > R version 2.9.0 (2009-04-17) > i386-apple-darwin8.11.1 > > locale: > en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8 > > attached base packages: > [1] stats ? ? graphics ?grDevices utils ? ? datasets ?methods ? base > > other attached packages: > [1] xtable_1.5-5 ? ? ? ?GO.db_2.2.11 ? ? ? ?RSQLite_0.7-1 ? ? ? DBI_0.2-4 > ? ? ? ? AnnotationDbi_1.6.0 > [6] Biobase_2.4.1 > > loaded via a namespace (and not attached): > [1] tools_2.9.0 > > > > >> Hi Heidi, >> >> I have figured out how to change the package names. But there are >> still some command that is not running, for example 'xtable.matrix' in >> the script that I pointed out in my orginal post. >> >> Could you please take a look how to correct these commands? >> >> Regards, >> Peng >> >> On Sun, Aug 9, 2009 at 2:58 AM, Heidi Dvinge<heidi at="" ebi.ac.uk=""> wrote: >>> Hi Peng, >>> >>> in general, all the annotation package now have an ".db" ending to >>> reflect >>> an underlying change to a database structure. In this particular case >>> you'd therefore want GO.db, but the same would apply to e.g. KEGG.db, >>> and >>> all the chip annotation packages (moe430a.db, hgu133a.db, >>> mogene10stprobeset.db etc.). >>> >>> Please see >>> http://www.bioconductor.org/packages/release/AnnotationData.html for all >>> the annotation packages. >>> >>> Best >>> \Heidi >>> >>> >>>> Hi, >>>> >>>> The examples in "Bioinformatics and Computational Biology Solutions >>>> Using R and Bioconductor" are outdated. For example, I don't find the >>>> package "GO" in >>>> http://www.bioconductor.org/mogr/chapter-code/metaOverview.R >>>> >>>> I'm wondering if somebody can help updated the examples to reflect the >>>> changes in BioC in the last 4 years. >>>> >>>> Regards, >>>> Peng >>>> >>>> _______________________________________________ >>>> 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
Peng Yu wrote: > Hi, > > I still run into other problems with the following fixes. Can some > more experienced BioC user help update these files and post them on > BioC website? All new users will appreciate your help! To follow the book verbatim, use R version 2.4 and correctly installed Bioconductor packages (i.e., appropriate for R 2.4, as provided by biocLite()). For a more recent treatment of similar material see http://bioconductor.org/pub/biocases/. For the problem below, see ?xtable and "An Introduction to R", for instance section 10.9 (hint: invoke as xtable(gcMat, ...) but take the time to understand why this works. Martin > > Regards, > Peng > > On Sun, Aug 9, 2009 at 7:30 AM, Heidi Dvinge<heidi at="" ebi.ac.uk=""> wrote: >> Hello Peng, >> >> please keep discussions to the list, so that other people can chime in as >> well. >> >> I'm not familiar with the details of xtable, but in the example you link >> to below it seems like the function xtable.matrix() does exist, but it's >> not exported by the name space. However, simply using xtable() works fine >> for me, and gives the same result at calling xtable.matrix() specifically >> (code shown below). >> >> There might be an updated version of the examples from "Bioinformatics and >> Computational Biology Solutions Using R and Bioconductor" somewhere; >> someone else can probably tell you. My best advice though is, that when >> something doesn't work, simply do a search for that function/package ;) >> Typing ?xtable.matrix gives you the xtable help page, which a.o. says "The >> available method functions for xtable are given by methods(xtable)." >> >> Regards >> \Heidi >> >>> library(GO.db) >>> library(xtable) >>> methods(xtable) >> [1] xtable.anova* xtable.aov* xtable.aovlist* >> xtable.coxph* >> [5] xtable.data.frame* xtable.glm* xtable.lm* >> xtable.matrix* >> [9] xtable.prcomp* xtable.summary.aov* >> xtable.summary.aovlist* xtable.summary.glm* >> [13] xtable.summary.lm* xtable.summary.prcomp* xtable.table* >> xtable.ts* >> [17] xtable.zoo* >> >> Non-visible functions are asterisked >>> goTerms <- contents(GOTERM) >>> goCats <- sapply(goTerms, Ontology) >>> gCnums <- table(goCats)[c("BP","CC", "MF")] >>> gCmat <- matrix(as.integer(gCnums), dimnames=list(c("BP","CC","MF"), >> "Number of terms")) >>> xtable.matrix(gCmat, display=c("d","d"), caption="Number of GO terms >> per ontology.", label="ta:GOprops") >> Error: could not find function "xtable.matrix" >>> xtable:::xtable.matrix(gCmat, display=c("d","d"), caption="Number of GO >> terms per ontology.", label="ta:GOprops") >> % latex table generated in R 2.9.0 by xtable 1.5-5 package >> % Sun Aug 9 13:17:48 2009 >> \begin{table}[ht] >> \begin{center} >> \begin{tabular}{rr} >> \hline >> & Number of terms \\ >> \hline >> BP & 16067 \\ >> CC & 2297 \\ >> MF & 8506 \\ >> \hline >> \end{tabular} >> \caption{Number of GO terms per ontology.} >> \label{ta:GOprops} >> \end{center} >> \end{table} >>> xtable(gCmat, display=c("d","d"), caption="Number of GO terms per >> ontology.", label="ta:GOprops") >> % latex table generated in R 2.9.0 by xtable 1.5-5 package >> % Sun Aug 9 13:17:59 2009 >> \begin{table}[ht] >> \begin{center} >> \begin{tabular}{rr} >> \hline >> & Number of terms \\ >> \hline >> BP & 16067 \\ >> CC & 2297 \\ >> MF & 8506 \\ >> \hline >> \end{tabular} >> \caption{Number of GO terms per ontology.} >> \label{ta:GOprops} >> \end{center} >> \end{table} >>> sessionInfo() >> R version 2.9.0 (2009-04-17) >> i386-apple-darwin8.11.1 >> >> locale: >> en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8 >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] xtable_1.5-5 GO.db_2.2.11 RSQLite_0.7-1 DBI_0.2-4 >> AnnotationDbi_1.6.0 >> [6] Biobase_2.4.1 >> >> loaded via a namespace (and not attached): >> [1] tools_2.9.0 >> >> >> >> >>> Hi Heidi, >>> >>> I have figured out how to change the package names. But there are >>> still some command that is not running, for example 'xtable.matrix' in >>> the script that I pointed out in my orginal post. >>> >>> Could you please take a look how to correct these commands? >>> >>> Regards, >>> Peng >>> >>> On Sun, Aug 9, 2009 at 2:58 AM, Heidi Dvinge<heidi at="" ebi.ac.uk=""> wrote: >>>> Hi Peng, >>>> >>>> in general, all the annotation package now have an ".db" ending to >>>> reflect >>>> an underlying change to a database structure. In this particular case >>>> you'd therefore want GO.db, but the same would apply to e.g. KEGG.db, >>>> and >>>> all the chip annotation packages (moe430a.db, hgu133a.db, >>>> mogene10stprobeset.db etc.). >>>> >>>> Please see >>>> http://www.bioconductor.org/packages/release/AnnotationData.html for all >>>> the annotation packages. >>>> >>>> Best >>>> \Heidi >>>> >>>> >>>>> Hi, >>>>> >>>>> The examples in "Bioinformatics and Computational Biology Solutions >>>>> Using R and Bioconductor" are outdated. For example, I don't find the >>>>> package "GO" in >>>>> http://www.bioconductor.org/mogr/chapter-code/metaOverview.R >>>>> >>>>> I'm wondering if somebody can help updated the examples to reflect the >>>>> changes in BioC in the last 4 years. >>>>> >>>>> Regards, >>>>> Peng >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>> >>>> >> >> > > _______________________________________________ > 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 -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD REPLY
0
Entering edit mode
On Mon, Aug 10, 2009 at 5:13 PM, Martin Morgan<mtmorgan at="" fhcrc.org=""> wrote: > Peng Yu wrote: >> >> Hi, >> >> I still run into other problems with the following fixes. Can some >> more experienced BioC user help update these files and post them on >> BioC website? All new users will appreciate your help! > > To follow the book verbatim, use R version 2.4 and correctly installed > Bioconductor packages (i.e., appropriate for R 2.4, as provided by > biocLite()). For a more recent treatment of similar material see > http://bioconductor.org/pub/biocases/. For the problem below, see ?xtable > and "An Introduction to R", for instance section 10.9 (hint: invoke as > xtable(gcMat, ...) but take the time to understand why this works. Unfortunately, I don't have access to the book biocases. I think that you misunderstood a little about my previous post. What I meant was that I had known how to fix xtable and the .db files. But there were still remaining problems that need to be fixed. Since I am still in the learning stage of R, I don't think that I could fix all the problems myself. I would appreciate if those R scripts accompany the book in the subject of the email be fixed. I can then learn all the examples in those scripts. Regards, Peng
ADD REPLY

Login before adding your answer.

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