[Biopython-dev] 8/21 newest questions tagged biopython - Stack Overflow

Feed My Inbox updates at feedmyinbox.com
Sun Aug 21 07:49:13 UTC 2011


// A PWM with gapped alignments in Biopython
// August 9, 2011 at 11:28 AM

http://stackoverflow.com/questions/6998727/a-pwm-with-gapped-alignments-in-biopython
I'm trying to generate a Position-Weighted Matrix (PWM) in Biopython from Clustalw multiple sequence alignments.  I get a "Wrong Alphabet" error every time I do it with gapped alignments.  From reading the documentation, I think I need to utilize the Gapped Alphabet to deal with the '-' character in gapped alignments.  But when I do this, it still doesn't resolve the error.  Does anyone see the problem with this code, or have a better way to generate a PWM from gapped Clustal alignments?

from Bio.Alphabet import Gapped
alignment = AlignIO.read("filename.clustalw", "clustal", alphabet=Gapped)
m = Motif.Motif()
for a in alignment:
    m.add_instance(a.seq)
m.pwm()


--
Website: http://stackoverflow.com/questions/tagged/?tagnames=biopython&sort=newest

Account Login: 
https://www.feedmyinbox.com/members/login/?utm_source=fmi&utm_medium=email&utm_campaign=feed-email

Unsubscribe here: 
http://www.feedmyinbox.com/feeds/unsubscribe/837947/00ae8e456ba91bb32a32b795eb392f971eee04e9/?utm_source=fmi&utm_medium=email&utm_campaign=feed-email

--
This email was carefully delivered by FeedMyInbox.com. 
PO Box 682532 Franklin, TN 37068




More information about the Biopython-dev mailing list