[Biopython-dev] Fwd: Pull Request: MafIO.py

Eric Talevich etal at uga.edu
Tue Oct 30 17:21:25 UTC 2012


---------- Forwarded message ----------
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