This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Motif weblogo resolution

Hi there,

I'm creating motif weblogo's using biopython's motif.weblogo('somefile.png'). It works very well, but unfortunately the resolution is super tiny (see the example) and therefore not very useful. Is there any way to crank up the resolution programatically? I'd not like to use the weblogo website as I need to produce these things from an automated script.

Thanks a lot! :-)

genome motif biopython weblogo

1 answer

I'm not a python dev, but I think you should use a vectorial format like SVG rather than the default bitmap format ('PNG') when calling weblogo http://biopython.org/DIST/docs/api/Bio.motifs-pysrc.html#Motif.weblogo

motif.weblogo('somefile.svg',format='SVG')

or modify another parameter using the **kwds** argument (try stack_width="large", etc... )

Worked like a charm! Thanks :-).

Log in to answer this question.