[Biopython] Error with new biopython with pos_specific_score_matrix()

Sebastian Bassi <[email protected]> Thu, 21 May 2020 14:57:33 -0700
Newsgroups gmane.comp.python.bio.general
Message-ID <CACL7rbO81KynqcFGjGK5CZWd9DMLzfD+ukGGdgjvmn2Ev8CZHg@mail.gmail.com>
I have a code that used to work I think in 1.52 or so.
This is the code I am testing now in 1.76:

from Bio import AlignIO
from Bio.Align.AlignInfo import SummaryInfo
from Bio.Alphabet import ProteinAlphabet

align = AlignIO.read('samples/cas9align.fasta', 'fasta')
align._alphabet = ProteinAlphabet()
summary = SummaryInfo(align)
summary.pos_specific_score_matrix()

I get

/usr/local/lib/python3.6/dist-packages/Bio/Align/AlignInfo.py
<https://localhost:8080/#> in _guess_consensus_alphabet(self,
ambiguous)    196             if not isinstance(alt, a.__class__):
197                 raise ValueError("Alignment contains a sequence
with \
--> 198                                 an incompatible alphabet.")
199     200         # Check the ambiguous character we are going to
use in the consensus


ValueError: Alignment contains a sequence wit an incompatible alphabet.



The alignment alphabet is protein, so I don't know what is wrong with it.
This is the alignment file I am using:
https://github.com/Serulab/Py4Bio/blob/master/samples/cas9align.fasta

I will appreciate any help.

Best,
SB

_______________________________________________
Biopython mailing list  -  [email protected]
https://mailman.open-bio.org/mailman/listinfo/biopython