[Biopython-dev] _pwm.c

Peter biopython at maubp.freeserve.co.uk
Thu Oct 28 16:45:52 UTC 2010


On Thu, Oct 28, 2010 at 3:37 PM, Bartek Wilczynski <barwil at gmail.com> wrote:
>
> If you need a snippet for testing, you can use this:
> from Bio import Seq
> from Bio import Motif
> m=Motif.read(open("Doc/cookbook/motif/SRF.pfm"),"jaspar-pfm")
> m.scanPWM(Seq.Seq("ACGTGTGCGTAGTGCGT",m.alphabet))
>
> result should be:
> array([-29.18363571, -38.3365097 , -29.17756271, -38.04542542, -20.3014183 ,
> -25.18009186], dtype=float32)
>
> hope this helps

I've made that into a new unit test, file Tests/test_Motif_pwm.py
http://github.com/biopython/biopython/commit/b265f341352b7c59ceaf7fa0fc4bfafc32185408

Peter



More information about the Biopython-dev mailing list