[BioPython] sequence logo with biopython

Giovanni Marco Dall'Olio dalloliogm at gmail.com
Tue Sep 18 10:36:59 EDT 2007


ok, thank you.

so, let's see if I understand how to use it:

from Bio.Seq import Seq
from Bio.AlignAce.Motif import Motif

m = Motif()
m.add_instance(Seq('ACTG'))
m.add_instance(Seq('ACCG'))
m.add_instance(Seq('ACTC'))

m.search_instance(Seq('ACACGACAACGTGTCGAT'))

m.weblogo('/home/user/logo.png')


Well, about refactoring.... honestly I think it would be a good idea.
The problem is that for example, I have never used AlignAce and I
don't know which kind of program is it... so I feel a bit confusing to
import a module called like this.
Anyway the Motif class seems useful, and I will use it in my program..
problably I will have to ask a few questions on it in the next days!
:)

2007/9/18, bartek wilczynski <bartek at rezolwenta.eu.org>:
> Peter <biopython at maubp.freeserve.co.uk> wrote:
> > >
> > > m.weblogo("x.png",colorscheme="BW") # brings you a monochrome logo image
> >
> > Does this let you do things like:
> >
> > m.weblogo("x.png", res=300)
> >
> > i.e. an integer, or do you have to use a string:
> >
> > m.weblogo("x.png", res="300")
> >
> > One way to "fix" this (if it is a problem) would be to do this:
> >
> > for k,v in kwds.items():
> >      values[k]=str(v)
> >
> > rather than:
> >
> > for k,v in kwds.items():
> >      values[k]=v
> >
> > Anyway, given we have at least ten days until the release (Michiel will
> > be away - see his email on the developers list), and this is a little
> > change, I would be happy for this to go into CVS now.
>
> Thanks for another good idea. I submitted the code to CVS.
>
> --
> cheers
>    Bartek
> _______________________________________________
> BioPython mailing list  -  BioPython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>


-- 
-----------------------------------------------------------

My Blog on Bioinformatics (italian): http://dalloliogm.wordpress.com


More information about the BioPython mailing list