[BioC] Using htmlpage

James W. MacDonald jmacdon at med.umich.edu
Thu Feb 12 19:39:01 CET 2009


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