[Biopython] GenomeDiagram: scale down the the track

Peter Cock p.j.a.cock at googlemail.com
Wed Mar 26 17:47:56 UTC 2014


On Wed, Mar 26, 2014 at 5:39 PM, Asma Riyaz <asmariyaz23 at gmail.com> wrote:
> Hi,
>
> I am using GenomeDiagram to show some gene Id I was interested in. However
> the length of the sequences I am using are huge and hence when I add a
> feature, and in my case the feature may run only a couple of thousand base
> pairs due to which the sigil is smaller.
> Here is a snippet of my code:
>
> ...
> gd_feature_set.add_feature(feature,sigil="ARROW",arrowshaft_height=1.0,arrowhead_length=1.0,color=idToColorDict[name[0]],*
> ...
> gd_diagram.draw(format="linear",pagesize='A4',fragments=1,start=0,end=7000000)*
>
> Here is one thing I tried to do:
>
>  when adding a new track, i specified start=0 and end=100 or 1000 or
> 10,0000-----> however this doesn't seem to scale down the track in anyway,
> instead what I see are empty tracks as the feature I am looking at do not
> exist in 1 to 1000 or 1 to 10,000.
> I attempted the same with "draw" and specified a different end BUT neither
> of it worked.
>
> How could I display all the features that I need to ?
>
> Thanks,
>  Asma

See the "Multiple tracks" example in the tutorial - you can show
just sub-regions of different tracks (giving white space to the
left and/or right). This is useful when the tracks do not show
the same sequence exactly (e.g. with cross-links).

What you want to change is the start/end in this line:
gd_diagram.draw(...)

Peter



More information about the Biopython mailing list