[Bioperl-l] Database Retrieval

Sean Davis sdavis2 at mail.nih.gov
Mon Aug 7 12:47:22 EDT 2006




On 8/7/06 11:51 AM, "Sendu Bala" <bix at sendu.me.uk> wrote:

> Rick Scavetta wrote:
>> Hello Programmers,
>> 
>> I have a list of mouse GeneIDs for which I have extracted the RefSeqs for.
>> With these accession numbers I want to know what are the three closest
>> upstream and downstream genes (and orientation, if possible) to my gene of
>> interest. Is these some way of finding this out? Any suggestions?
> 
> One possible way would be with the Ensembl Perl API:
> http://www.ensembl.org/info/software/core/core_tutorial.html
> 
> You'd get a gene or transcript adapator and use
> fetch_all_by_external_name() iirc.
> 
> Then probably your slice adaptor would be used to get the up and down
> stream regions and iirc there's some easy way to ask for all the genes
> in a slice.
> 
> Sean's solution (use UCSC) seems a lot easier, and since you just want a
> list of names as a result, not bioperl objects, I'd go for that.
> 
> Actually, would there be any interest in a bioperl interface to the UCSC
> tables? It could probably be done using their DAS server, and end up as
> a very easy-to-use alternative to the Ensembl API for limited or one-off
> queries.

Sendu,

I haven't used their DAS server in a couple of years--it is probably worth
my trying it again at some point.  I have gone the route of maintaining a
local ucsc mirror of the database.  There are obvious advantages to doing
this, including speed of access, no access limits, and the power and
flexibility of SQL.  With the simplicity of MySQL, one can even rsync
directory from UCSC's mysql data directory directly, eliminating the need to
do a table import step.  I haven't gone so far as to implement a perl-based
wrapper, but one could envision doing so for the most commonly-used tables,
perhaps using Rose::DB::Object or DBIx::Class as a base with other methods
added as needed based on the data contained in the table.

If I get a chance, I could probably extract the parts from the UCSC website
necessary to generate such a database-only mirror and put them on the wiki,
but the information is all on the UCSC website under the "mirroring
instructions" heading.

Sean



More information about the Bioperl-l mailing list