Depending on how deeply you want to go into the programming, there are several perl approaches; the following depend on having bioperl installed.

And if you want to go the BioPerl route, make sure you use a recent version, like 1.5.2 (nevermind the 'developer version' comment on that page). For searching GenBank, just read the HOWTO's:

Bioperl Beginners HOWTO

Bioperl SeqIO HOWTO

An alternative may be BioMart (see esp. the martview button). BioMart lets you click together your query interactively, which in itself is already useful. But on top of that you can get the same query in xml form by clicking the XML button, and saving the query (not the data) in xml format. The retrieved query-xml can then be re-submitted programmatically, possibly after tweaking it. This makes it pretty easy to get started submitting queries to this specialized database.

The most control you get by using the ensembl perl API (see perl API installation page). This API lets you connect to the mysql servers at ebi (or you can download data & install it locally).

An ensembl perl API tutorial, scratching the surface deeply, is here: ensembl Core perl API tutorial.

Ensembl and BioMart have basically the same data (although there are some differences), with biomart being a denormalized version of the master data in ensembl.

Needless to say, there is a lot of annotation/cross-references/expertise at ebi, and this is built into these API's.


In reply to Re: To query Genbank online to get the sequence and annotations by erix
in thread To query Genbank online to get the sequence and annotations by spring

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.