[BioPython] ambiguous alphabets and alignments
Karin Lagesen
karin.lagesen at medisin.uio.no
Fri Nov 30 15:41:28 UTC 2007
Peter <biopython at maubp.freeserve.co.uk> writes:
>> >>> from Bio import Clustalw
>> >>> from Bio.Align import AlignInfo
>> >>> from Bio.Alphabet import IUPAC
>> >>> alignment = Clustalw.parse_file("align16S/AE000511_16S.aln", alphabet=IUPAC.IUPACAmbiguousDNA)
>> >>> summary_aln = AlignInfo.SummaryInfo(alignment)
>> >>> pssm = summary_aln.pos_specific_score_matrix()
>
> I think the problem is you are giving Clustalw an alphabet class
> rather than an instance of the class. I am not at a computer with
> Biopython installed right now, but I would guess you need to change
> one line subtly:
>
> alignment = Clustalw.parse_file("align16S/AE000511_16S.aln",
> alphabet=IUPAC.IUPACAmbiguousDNA())
Thanks! That was exactly the problem. It just didn't strike me that
this could be the problem:)
Karin
--
Karin Lagesen, PhD student
karin.lagesen at medisin.uio.no
http://folk.uio.no/karinlag
More information about the Biopython
mailing list