[BioC] Using htmlpage

Holger Schwender holger.schw at gmx.de
Thu Feb 5 12:27:04 CET 2009


Hi John,

::: does the trick. If you, e.g., would like to call the function make.tablecode from the siggenes package (which is not exported, i.e. not available by simply calling make.tablecode), then you can use this function by calling

siggenes:::make.tablecode

Best,
Holger


-------- Original-Nachricht --------
> Datum: Thu, 5 Feb 2009 10:58:38 -0000
> Von: "john seers \\(IFR\\)" <john.seers at bbsrc.ac.uk>
> An: "James W. MacDonald" <jmacdon at med.umich.edu>
> CC: bioconductor at stat.math.ethz.ch
> Betreff: Re: [BioC] Using htmlpage

> 
> Hi Jim
> 
> >True. However, nothing comes free. The cost of having a namespace is 
> >that it is not simple to add functionality. The benefit is the 
> >minimization of function masking by other packages and/or things in the
> 
> >workspace.
> 
> Is there no way to call a user function from a namespaced package?    
> 
> >But then again, I could be completely wrong.
> 
> No, you have it spot on. 
> 
> 
> >I can divine that you want something like
> >getQuery4ENS(ids, species)
> 
> I wondered if using the "..." notation would be a good idea.
> 
> I am not sure how it works exactly but:
> 
> getQuery4ENS(ids, ...)
> 
> would mean you could pass through whatever you wanted, I think.
> 
> 
> If you think adding the functionality is a good idea then great and
> thank you. You will be the better judge of whether it fits with your
> design and is a sensible thing to do. I will definitely use it if it
> comes available. 
>   
>    
> 
> 
> Regards
> 
> 
> John
> 
> 
> 
> -----Original Message-----
> From: bioconductor-bounces at stat.math.ethz.ch
> [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of James W.
> MacDonald
> Sent: 04 February 2009 20:17
> To: john seers (IFR)
> Cc: bioconductor at stat.math.ethz.ch
> Subject: Re: [BioC] Using htmlpage
> 
> Hi John,
> 
> john seers (IFR) wrote:
> > Hi Jim
> > 
> > Thanks for the reply.
> > 
> >> Easily is in the eye of the beholder.
> > 
> > Easily is in the eye of the user. It could be easier. 
> 
> True. However, nothing comes free. The cost of having a namespace is 
> that it is not simple to add functionality. The benefit is the 
> minimization of function masking by other packages and/or things in the 
> workspace.
> 
> The other side of the coin is the poor soul in a world without 
> namespaces who wonders why htmlpage() doesn't work, unaware that the 
> object getCells in his workspace is clobbering the getCells() function 
> that he knows nothing about.
> 
> > 
> >> you will need to add the functions to the source package and then 
> >> build/install.
> > 
> > I thought that might be the answer. I do not really want to do that
> > because I do not build R from source. It would also create a
> maintenance
> > problem.  
> > 
> >> What repository are you trying to add?
> > 
> > I was building links to www.ensembl.org. 
> > 
> >
> ########################################################################
> > ###################
> > 
> > I notice that you are one of the authors Jim, so can I add a further
> > question/suggested enhancement.
> > 
> > One of the links that I am building for www.ensembl.org needs more
> than
> > the id to build the query. So I need the helper function to use the id
> > plus further information from one of the other columns. Is there a
> > recognised way to do this? That is pass the columns/lists through to
> > getCells/getQueryLink/helper function so it can build the link from
> > multiple values?
> 
> I could probably add the functionality for you, but you will have to be 
> less mysterious about what you want.
> 
> I can divine that you want something like
> 
> getQuery4ENS(ids, species)
> 
> so that
> 
> getQuery4ENS("ENSG00000064961", "Homo_sapiens")
> 
> will build
> 
> http://www.ensembl.org/Homo_sapiens/Search/Summary?species=Homo_sapiens;
> idx=;q=ENSG00000064961
> 
> But then again, I could be completely wrong.
> 
> Best,
> 
> Jim
> 
> > 
> > Regards
> > 
> > 
> > John  
> > 
> > 
> > 
> > 
> > 
> >  
> > ---
> > -----Original Message-----
> > From: James W. MacDonald [mailto:jmacdon at med.umich.edu] 
> > Sent: 04 February 2009 15:47
> > To: john seers (IFR)
> > Cc: bioconductor at stat.math.ethz.ch
> > Subject: Re: [BioC] Using htmlpage
> > 
> > Hi John,
> > 
> > john seers (IFR) wrote:
> >> Hello Bioconductor people
> >>
> >> I am trying to use htmlpage (from the annotate package) so it can
> >> generate html links in addition to the types of links already
> > provided. 
> >> >From the documentation of htmlpage it says:
> >>
> >> "Additional repositories can easily be added. See getQueryLink for
> > more
> >> information."
> > 
> > Easily is in the eye of the beholder. It is actually quite easy, but
> you
> > 
> > will need to add the functions to the source package and then 
> > build/install. As you have noted, the namespace prevents you from
> easily
> > 
> >   modifying the package by dumping new functions in the workspace.
> > 
> > What repository are you trying to add? It might be easiest to just add
> 
> > the repository to the package itself, if it is something that others 
> > might want to use.
> > 
> > Best,
> > 
> > Jim
> > 
> > 
> >> But it does not seem as straightforward as I hoped. Trying to modify
> > the
> >> scripts hits difficulties with namespaces and local names. Can anyone
> >> tell me if there is a simpler way? 
> >>
> >> I defined my own copy of getQueryLink but htmlpage still called the
> >> namespace version. This I could change using:
> >>
> >> assignInNamespace("getQueryLink", getQueryLink, ns="annotate")
> >>
> >> But then it did not work because getQueryLink could not see the
> > original
> >> internal scripts such as getQuery4Affy. So I modified the script
> again
> >> to remove all the repositories I did not need. But I still needed the
> >> getQuery4Affy helper script so I had to redefine that and use
> >> assignInNamespace again.  
> >>
> >> This seems too complicated. Have I missed an easier way? Any
> >> suggestions? 
> >>
> >>
> >>
> >>
> >> Regards
> >>
> >>
> >> John
> >>
> >>
> >>
> >>
> >
> ########################################################################
> >> ################################
> >>
> >>
> >>> sessionInfo()
> >> R version 2.8.1 (2008-12-22) 
> >> i386-pc-mingw32 
> >>
> >> locale:
> >> LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United
> >> Kingdom.1252;LC_MONETARY=English_United
> >> Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252
> >>
> >> attached base packages:
> >> [1] tools     stats     graphics  grDevices datasets  utils
> > methods
> >> [8] base     
> >>
> >> other attached packages:
> >> [1] annotate_1.20.1     xtable_1.5-4        AnnotationDbi_1.4.2
> >> [4] Biobase_2.2.1       RWinEdt_1.8-0      
> >>
> >> loaded via a namespace (and not attached):
> >> [1] DBI_0.2-4     RSQLite_0.7-1
> >>
> >>
> >>
> >>
> >> ---
> >>
> >> _______________________________________________
> >> 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
> > 
> 
> -- 
> James W. MacDonald, M.S.
> Biostatistician
> Hildebrandt Lab
> 8220D MSRB III
> 1150 W. Medical Center Drive
> Ann Arbor MI 48109-0646
> 734-936-8662
> 
> _______________________________________________
> 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

--



More information about the Bioconductor mailing list