[BioC] Using htmlpage

john seers (IFR) john.seers at bbsrc.ac.uk
Fri Feb 13 14:53:43 CET 2009


Hello Jim

Thanks for this. Done impressively quickly.

>makes smart use of an environment to hold the getQuery4XX() functions,
and you 
>can add new ones to the environment, thereby bypassing the namespace.

It looks like you have found a neat way to do this and to make it a lot
easier to use. I look forward to giving it a go. I expect I will be
curious enough to look at the code and see how it was done.

>You can create links to Ensembl, using the repository 'ens'. Since 
>AFAICT Ensembl requires a species to be part of the URI, you will have 
>to pass an additional argument 'species' to htmlpage(). The form of
this 
>argument is species="Homo_sapiens" for e.g, Human.

Ensembl is a good addition. But I am not sure if this particular
addition addresses the specific problem I described. But I will have a
look and report back to you. That involved an Exon search that needs the
ensembl transcript id. My workaround for that was to duplicate my
transcript column and perform the exon search on that. Perhaps there is
another way to do it - I will have another go.  

I guess this is, or will be soon, available as a new version of
annotate. I will have a look and see if it is there. If not perhaps I
will have to give in and follow your recommendation to run from source. 

Thanks again. I will give you some feedback on your efforts.

Regards


John
  

 
---

-----Original Message-----
From: James W. MacDonald [mailto:jmacdon at med.umich.edu] 
Sent: 12 February 2009 18:39
To: john seers (IFR)
Cc: bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] Using htmlpage

Hi John,

Thanks to some help from Martin Morgan (thanks Martin!), the devel 
version of annotate now has two additions.

1.) You can create links to Ensembl, using the repository 'ens'. Since 
AFAICT Ensembl requires a species to be part of the URI, you will have 
to pass an additional argument 'species' to htmlpage(). The form of this

argument is species="Homo_sapiens" for e.g, Human. If you forget to pass

the argument it will bomb out with an error.

This should work with ENSG, ENST, or ENSP identifiers, but let me know 
if you have problems.

2.) You can also now create links for arbitrary websites. There are 
three new functions, setRepository(), getRepositories() and 
clearRepository() that you can use to set up, look at, and remove 
repositories, respectively. This is all thanks to Martin - he makes 
smart use of an environment to hold the getQuery4XX() functions, and you

can add new ones to the environment, thereby bypassing the namespace.

The function you add should have similar form to any of the 
getQuery4XX() functions. Just write up the function, and use 
setRepository() to put it into the environment. There are some examples 
in the help page for these functions that will hopefully get anyone 
interested in this started. Again, let me know if it is not clear, or if

there are any problems.

Best,

Jim



john seers (IFR) wrote:
> 
> Hi Jim
> 
> 
> Searching on ellipsis and pass through I got the following.
> 
> "The second argument to boot(), called 'statistic', can be
> any user-written function you want to cook up, with additional
> arguments being passed to it through the '...' mechanism after
> all of the named arguments. (See: `R-intro `Writing your own
> functions `The ellipsis argument for details.)"
> 
> Looking at the boot code shows the user function "statistic" in the
> signature and various calls to statistic of the form 
> 
> t0 <- statistic(data, original, rep(1, sum(m)), ...)
> 
> 
> function (data, statistic, R, sim = "ordinary", stype = "i", 
>     strata = rep(1, n), L = NULL, m = 0, weights = NULL, ran.gen =
> function(d, 
>         p) d, mle = NULL, simple = FALSE, ...) 
> {
> 
> This is sort of what I had in mind. (Though I have not found the code
to
> pass through the "rest" of the variables.). No parsing needed.
> 
> 
>> However, the ellipsis is designed to pass arbitrary variables to
> underlying code.
> 
> I think that is what I am suggesting needs to be done - pass through
> arbitrary variables. Perhaps a problem you have is htmlpage calls
> getCells which calls getQueryLink which calls the helper function(s).

> 
> Not sure if this is any help to you.
> 
> Regards
> 
> John
> 
> 
> 
> 
> 
> 
> 
> 
>   
>  
> ---
> 



More information about the Bioconductor mailing list