[BioPython] Emboss (water) alignment output

Peter Cock p.j.a.cock at googlemail.com
Tue Mar 25 10:25:17 UTC 2008


On Tue, Mar 25, 2008 at 9:24 AM, Stefanie Lück <lueck at ipk-gatersleben.de> wrote:
> Hi!
>
>  Is it possible to get just the alignment as an output instead of all this additional infos?
>
>  Like
>
>  atgctctcc
>  IIIIIIIII II
>  atgctcgcc

The EMBOSS tools usually have a choice of output formats.  I do know
that the EMBOSS water tool will ouput as FASTA format, which is very
simple.  You could easily recreate the match/miss-match string from
this.

I do have some experimental code for reading the emboss pairwise
alignment format, but its not in Bioython yet.

>  The best, without to write in a file, so directly over python.

Do you mean calling EMBOSS water without first creating an input file
for it?  If you sequences are short, you can provide them as part of
the command line (search for "asis" in the EMBOSS documentation).  You
can also pipe the input into water (see EMBOSS command line "-filter")
... this can probably also be done with python but I've never tried.

If you mean get the output in stdout instead of a file, then the
EMBOSS tools can do that too (EMBOSS command line option "-stdout").
You'd just need to open the ouput stream as a pipe in Python.

Peter




More information about the Biopython mailing list