Programming interface for Staden

  • Robe

    Robe - 2011-06-21

    Hi everybody!
    I'm new on all of this as you can see.

    Well, I need to integrate/program staden into my own application? I mean, use the option of align, clean and assembly different contigs to get trhe consensus reference from a reference sequence (Gap4)

    How can I do it? I suppose that I have to download the latest i/o library and use it. The point is how to use it, on Windows or Linux? Tlc/tx or C?

    Please give me some advice.


  • James Bonfield

    James Bonfield - 2011-06-21

    There is some out of date documentation on this, but it's a good start at least. See:

    Hmm 1997! How time flies. Never the less it's still largely valid for gap4 with a few tweaks here and there.

    Basically there are two routes. One is the C interface. This is the most flexible and also the fastest.  See the "Database I/O in C" part of the manual.  The documentation on the Makefile system and how to link with it is misleading now, but for a C programmer it shouldn't be too tricky to figure out - just link against (and dependencies if needed).

    Then there's the Tcl interface. This is essentially what most of gap4 is written in so there are ample examples in the source code itself.  There are a few more at including fetching the consensus. The Tcl functions though then to be complete menu items (mostly) although there are a few lower level interfaces. I'm ashamed to say there's also not always a clear model/view/controller break down so some of the tcl functions have nasties like wanting to know a tk window pathname or have been implemented within the contig editor itself and so become hard to script.

    Take a look at src/gap4/gap_utils.tcl for some examples of using Tcl for low level gap4 database integration. You may also want to google for the Keyed List  tcl package. It's a third party thing, but we use it heavily.

    For what it's worth, gap5 follows a similar trend although there is mostly a clearer distinction and the lower level I/O is exposed better. Indeed the contig editor has C code for fast viewing, but all edit operations are implemented through the Tcl API.


Log in to post a comment.