Entering edit mode
6.7 years ago
aocken
•
0
I am getting a Key Error when I try to use pairwise2 alignment. I have a translated generic_protein sequence and an extended_protein sequence from an indexed fasta file.
File "/biopython-1.70/Bio/pairwise2.py", line 407, in __call__
return _align(**keywds)
File "/biopython-1.70/Bio/pairwise2.py", line 457, in _align
align_globally, score_only)
File "/biopython-1.70/Bio/pairwise2.py", line 649, in _make_score_matrix_fast
match_fn(sequenceA[row - 1], sequenceB[col - 1])
File "/biopython-1.70/Bio/pairwise2.py", line 982, in __call__
return self.score_dict[(charA, charB)]
KeyError: ('U', 'M')
Can pairwise2 do an alignment with the IUPAC Extended Protein Alphabet?
Example sequences that return the error above:
Translated generic_protein:
MYISPEEFKPIAEKLTGSVPVANYEEEELSHDPSEETVTIESRFQPLLTETMTKSKDGFLGVSRLALSGLRNWTTAASPSAVFAARHFRPFLPPPGQELGQPWWIIPGELSVFTGYLSNNRFYPPPPKGKEVRTALGDRGCTWPQLESGPSCVNLDPST
Indexed extended_protein sequence:
MPSVFQKNIISRVSQIQLVPTGTTPPAKMPEDTAENWPGLVIMATTEHKPRFNYGGGGGGGGGTPLLLSGSSCPLVRTFGTGIGRLGPDSCLLAQPLPPKQESALKVLGTDGLFLFSSLDTDQDMYISPEEFKPIAEKLTGSVPEASYEEEELHHDPSEETLTIEARFQPLLTETMTKSKDGFLGVSRLALSGLRNWTTAASPTAEFAARHFRAFLPPPGQELGQPWWIIPGELSVFTGYLSNNRFYPPPPKDKEVIIHRLLSMFHPRPFVKTRFAPQGTVACLTAISDSYYTVMFRIHAEFQLSEPPDFPFWFSPGQFTGHIILSKDATHIRDFRLFVPNHRSLNVDMEWLYGASETSNMEVDIGYIPQMELEAMGPSVPSVILDEDGNMIDSRLPSGEPLQFVFEEIKWHQELSWEEAARRLEVAMYPFKKVSYLPFTEAFDRAKAENKLVHSILLWGALDDQSCUGSGRTLRETVLESPPILTLLNESFISTWSLVKELEDLQSQQENALHRQLAGLHLEKYSFPVEMMVCLPNGTVVHHINANYFLDITSMKPEDLDNKVFSFSSTFEDPSTATYMQFLREGLRRGLPLLEP