<div dir="ltr">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. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 4, 2015 at 10:08 AM, Peter Cock <span dir="ltr"><<a href="mailto:p.j.a.cock@googlemail.com" target="_blank">p.j.a.cock@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Katie,<br>
<br>
The scaling depends on the total length (bp) and tracks being shown.<br>
<br>
If you are trying to produce a set of figures with the same scale, scale<br>
them all to the longest sequence - or draw it as a single multiple track<br>
figure.<br>
<br>
e.g. This example (ignoring the cross links) has three sequences<br>
of differing lengths:<br>
<br>
<a href="http://news.open-bio.org/news/2012/03/cross-links-in-genomediagram/" target="_blank">http://news.open-bio.org/news/2012/03/cross-links-in-genomediagram/</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Peter<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, May 4, 2015 at 2:42 PM, Katie Edmonds <<a href="mailto:betainverse@gmail.com">betainverse@gmail.com</a>> wrote:<br>
> It seems like even when I set the track height, the heights and the lengths<br>
> of the arrows (per base pair) are always changing depending on the lengths<br>
> of the sequences and the number of tracks in the figure. Is there any way<br>
> that I am missing to nail down these proportions?<br>
><br>
> On Thu, Apr 30, 2015 at 10:34 AM, Peter Cock <<a href="mailto:p.j.a.cock@googlemail.com">p.j.a.cock@googlemail.com</a>><br>
> wrote:<br>
>><br>
>> On Thu, Apr 30, 2015 at 3:15 PM, Katie Edmonds <<a href="mailto:betainverse@gmail.com">betainverse@gmail.com</a>><br>
>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I want to write a script that reads a list of genes from a table,<br>
>> > including<br>
>> > their start and endpoint on the chromosome, and generates vector<br>
>> > graphics<br>
>> > arrows on a line, with lengths and positions to scale for their size and<br>
>> > location in the genome, colored by some value given in the table. Does<br>
>> > anyone have any suggestions for a useful library for creating nice<br>
>> > vector<br>
>> > graphics arrows?<br>
>> ><br>
>> > Here's an example of what I'm talking about:<br>
>> > <a href="https://github.com/betainverse/other/blob/master/gene_arrows.pdf" target="_blank">https://github.com/betainverse/other/blob/master/gene_arrows.pdf</a><br>
>> ><br>
>> > Alternatively, is there already a good tool that does what I want?<br>
>> ><br>
>> > Thanks,<br>
>> > Katie<br>
>><br>
>> Biopython has GenomeDiagram (using ReportLab internally<br>
>> to make PDF / SVG / PNG etc) which can do that. We have<br>
>> various sigils (ways of drawing features), BIGARROW is<br>
>> probably closest to the example you linked to.<br>
>><br>
>> See: <a href="http://biopython.org/DIST/docs/tutorial/Tutorial.html" target="_blank">http://biopython.org/DIST/docs/tutorial/Tutorial.html</a><br>
>><br>
>> Peter<br>
><br>
><br>
</div></div></blockquote></div><br></div>