[BioC] getting a list of packages by biocView tags
Seth Falcon
sfalcon at fhcrc.org
Sat May 27 02:34:32 CEST 2006
Hi Steve,
"Roels, Steven" <Steven.Roels at mpi.com> writes:
> Is there an example somewhere of how to get a list of packages based
> on one or more biocView tags (programmatically in R)?
No, but there is about to be one ;-)
> For example:
>
> Given a tag like "hgu133a2", get a matrix like that at:
>
> http://www.bioconductor.org/packages/1.8/hgu133a2.html
>
> which can then be used to build a list of desired
> annotation/experiment/etc packages for subsequent install.
>
> I was poking around in the new BiocViews package (which I assume is the
> place to start), but the solution didn't leap out at me.
Yes, that's the right place to look. This is a feature we discussed,
but didn't implement. We wanted to see if the views were useful in
general before investing more development effort. What you are asking
for makes a lot of sense.
> Having the biocView tags is great and I'd love to take full advantage of
> them.
>
> Maybe biocView tags and/or patterns could ultimately be supplied as
> arguments to getBioC().
Yep, but stress on "ultimately", or stress on "patches welcome" :-)
Here's how you can get a list of the packages in the hgu133a2 view as
you mention in the URL in your post. The following is not official,
may change in the future, may not work in the first place. But it may
solve your problem for the short term. Without further ado...
library("biocViews")
data(biocViewsVocab)
repos <- "http://bioconductor.org/packages/1.8/data/annotation"
bv <- getBiocViews(repos, biocViewsVocab, "NoViewProvided")
There were 50 or more warnings (use warnings() to see the first 50)
> names(bv[["hgu133a2"]]@packageList)
[1] "hgu133a2" "hgu133a2cdf"
[3] "hgu133a2probe" "hs133av2hsense7cdf"
[SNIP]
So you could install all of these by passing the result of this to
biocLite().
A few notes:
* This is _provisional_. I really don't like the direct slot access
using "@".
* There are three main BioC package repositories that correspond to
the three top-level children of the BiocViews root node in the
vocabulary: Software, AnnotationData, ExperimentData. The list of
views returned by getBiocViews() will contain an entry for _all_
views in the vocabulary, but entries will be empty for views that
are not part of the requested repository. Confused? If you wanted
to ask about the Software view or one of its subviews, you would
need to replace the repos arg with
http://bioconductor.org/packages/1.8/bioc.
Best,
+ seth
More information about the Bioconductor
mailing list