[Biopython] graphics library suggestions?

Katie Edmonds betainverse at gmail.com
Mon May 4 14:11:53 UTC 2015


This is a pretty frustrating solution, since I would like all the figures I
create now to be compatible with ones that I might make in the future. It
seems like my only option is to make a generous guess about the maximum
length I am likely to encounter in the future, and generate a dummy
sequence of that size as a placeholder in every image I create now.

On Mon, May 4, 2015 at 10:08 AM, Peter Cock <p.j.a.cock at googlemail.com>
wrote:

> Hi Katie,
>
> The scaling depends on the total length (bp) and tracks being shown.
>
> If you are trying to produce a set of figures with the same scale, scale
> them all to the longest sequence - or draw it as a single multiple track
> figure.
>
> e.g. This example (ignoring the cross links) has three sequences
> of differing lengths:
>
> http://news.open-bio.org/news/2012/03/cross-links-in-genomediagram/
>
> Peter
>
> On Mon, May 4, 2015 at 2:42 PM, Katie Edmonds <betainverse at gmail.com>
> wrote:
> > It seems like even when I set the track height, the heights and the
> lengths
> > of the arrows (per base pair) are always changing depending on the
> lengths
> > of the sequences and the number of tracks in the figure. Is there any way
> > that I am missing to nail down these proportions?
> >
> > On Thu, Apr 30, 2015 at 10:34 AM, Peter Cock <p.j.a.cock at googlemail.com>
> > wrote:
> >>
> >> On Thu, Apr 30, 2015 at 3:15 PM, Katie Edmonds <betainverse at gmail.com>
> >> wrote:
> >> > Hi,
> >> >
> >> > I want to write a script that reads a list of genes from a table,
> >> > including
> >> > their start and endpoint on the chromosome, and generates vector
> >> > graphics
> >> > arrows on a line, with lengths and positions to scale for their size
> and
> >> > location in the genome, colored by some value given in the table. Does
> >> > anyone have any suggestions for a useful library for creating nice
> >> > vector
> >> > graphics arrows?
> >> >
> >> > Here's an example of what I'm talking about:
> >> > https://github.com/betainverse/other/blob/master/gene_arrows.pdf
> >> >
> >> > Alternatively, is there already a good tool that does what I want?
> >> >
> >> > Thanks,
> >> > Katie
> >>
> >> Biopython has GenomeDiagram (using ReportLab internally
> >> to make PDF / SVG / PNG etc) which can do that. We have
> >> various sigils (ways of drawing features), BIGARROW is
> >> probably closest to the example you linked to.
> >>
> >> See: http://biopython.org/DIST/docs/tutorial/Tutorial.html
> >>
> >> Peter
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20150504/6b0ee701/attachment.html>


More information about the Biopython mailing list