[BioPython] AlignIO: Sequences of different length

João Rodrigues anaryin at gmail.com
Tue Dec 9 11:25:37 UTC 2008


>
> > Using the web versions, there may be some workarounds. If you convert
> > the format to one of the others, you may get a usable one for Biopython.
>
> If you just want the alignment itself, using FASTA as the output
> format from needle is very simple.
>
> e.g.
>
> $ needle one.fasta two.fasta --auto --filter -aformat fasta
> >E1
> MSSDRQRSDDES-PSTSSGSSDADQRDPAAPEPEEQEERKPSATQQKKNTKLS-SKTTAK
> LSTSAKRIQKELAEITLDPPPNCSAGPKGDNIYEWRSTILGPPGSVYEGGVFFLDITFSS
> DYPFKPPKVTFRTRIYHCNINSQGVICLDILKDNWSPALTISKVLLSICSLLTDCNPADP
> LVGSIATQYLTNRAEHDRIARQWTKRYAT
> >E2
> -----GMSDDDSRASTSSSSSSS----------SNQQTEKETNTPKKKESKVSMSKNSKL
> LSTSAKRIQKELADITLDPPPNCSAGPKGDNIYEWRSTILGPPGSVYEGGVFFLDITFTP
> EYPFKPPKVTFRTRIYHCNINSQGVICLDILKDNWSPALTISKVLLSICSLLTDCNPADP
> LVGSIATQYMTNRAEHDRMARQWTKRYAT
>


Yep, but in the web version such format does not exist.. don't know why.


>
> > I tried markx1 I believe, and it was "almost" parsable, it just didn't
> get the
> > correct sequences (if you deleted everything BUT the sequences, it would
> > work).
>
> How were you trying to parse the markx1 output?
>
> Note that the EMBOSS markx10 output is similar to, but differs from,
> the FASTA -m 10 output (which Biopython can parse as the "fasta-m10"
> format in Bio.AlignIO).
>

I tried with FASTA as the argument for the parser, because the description
said:
"This is the standard default output format used by Bill Pearson's suite of
FASTA programs."

And btw, it was the markx0, not the 1. Typo yesterday night..


>
> > So, I think there should at least be a warning somewhere for the
> > users so that they don't get nuts or reporting bugs :)
>
> Do you mean a warning about trying to use Bio.AlignIO with the
> "emboss" format to read output from old versions of EMBOSS needle
> tool?


Well, it may be frustrating for someone who's using that webservice to try
and parse it and it gives that error. It might be useful for example, to
mention, when such error occurs, that it might be happening due to use of
web version. Just a small appendix to the error message f example.

Regards,

João




More information about the Biopython mailing list