[BioC] Using htmlpage

James W. MacDonald jmacdon at med.umich.edu
Fri Feb 13 15:36:11 CET 2009


Hi John,

john seers (IFR) wrote:
> 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.

As much as I would like to take credit, this is all Martin Morgan.

> 
>> 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.  

OK. Given an Ensembl transcript ID (say, ENST00000405446), do you not 
want to end up here?

http://www.ensembl.org/Homo_sapiens/Search/Summary?species=Homo_sapiens;idx=;q=ENST00000405446

If not, then where might you want to be?

As I said in an earlier email, I can only help if you tell me _exactly_ 
what you want to do. I'm not smart enough to parse what you have said 
above or in earlier messages. If someone asked me 'What exactly does 
John Seers want?', I would only be able to say something about you 
wanting to do something with some data and end up with links to Ensembl. 
And that is seriously not enough to go on.

> 
> 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. 

You will have to run the devel version of R, as the changes are only in 
the devel version of BioC. The windows binary _would_ have been up there 
today if I hadn't left two uncommented underscores in the help page for 
htmlpage() (which oddly enough doesn't seem to bother either Linux or 
Mac OS). So if you want to compile from source, you can start today.

If you want a windows binary you will have to wait a day or two.

Best,

Jim


> 
> 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
>>
>>
>>
>>
>>
>>
>>
>>
>>   
>>  
>> ---
>>

-- 
James W. MacDonald, M.S.
Biostatistician
Hildebrandt Lab
8220D MSRB III
1150 W. Medical Center Drive
Ann Arbor MI 48109-0646
734-936-8662



More information about the Bioconductor mailing list