[Biopython-dev] Pull Request: MafIO.py

Andrew Sczesnak andrewscz at gmail.com
Wed Oct 31 18:10:48 UTC 2012


Nick,

Can you provide a snippet of a file from mugsy for the unit tests?

Thanks,
Andrew

On Oct 31, 2012, at 9:00 AM, biopython-dev-request at lists.open-bio.org wrote:

> From: Nick Loman <n.j.loman at bham.ac.uk>
> Date: Tue, Oct 30, 2012 at 6:34 AM
> Subject: Pull Request: MafIO.py
> 
> 
> Hi there
> 
> Thanks for the MafIO branch. In order to get it to read MAF files produced
> by Mugsy (mugsy.sourceforge.net) I had to make the following change:
> 
> diff --git a/Bio/AlignIO/MafIO.py b/Bio/AlignIO/MafIO.py
> index 6eda0ca..4bb1407 100644
> --- a/Bio/AlignIO/MafIO.py
> +++ b/Bio/AlignIO/MafIO.py
> @@ -178,7 +178,7 @@ def MafIterator(handle, seq_count = None, alphabet =
> single_letter_alphabet):
> 
>              annotations = dict([x.split("=") for x in
> line.strip().split()[1:]])
> 
> -            if len([x for x in annotations.keys() if x not in ("score",
> "pass")]) > 0:
> +            if len([x for x in annotations.keys() if x not in ("score",
> "pass", "label", "mult")]) > 0:
>                 raise ValueError("Error parsing alignment - invalid key in
> 'a' line")
>         elif line.startswith("#"):
>             # ignore comments
> 
> 
> My Python fork is a bit confusing right now so hope you don't mind me
> sending this pull request via email!
> 
> Cheers
> 
> Nick



More information about the Biopython-dev mailing list