[Biopython-dev] Enhancements to Bio.Graphics.BasicChromosome

Peter Cock p.j.a.cock at googlemail.com
Wed Oct 5 13:32:34 UTC 2011

On Wed, Oct 5, 2011 at 2:16 PM, Kevin Jacobs wrote:
> On Mon, Oct 3, 2011 at 6:24 PM, Peter Cock wrote:
>> Notches in the chromosome which I assume are centromeres
>> (I can see how that might be added to the Bio code as another
>> segment type, similar to the telomeres).
> Yes-- although the visual style for centromeres need not be precisely as
> shown in my example.
>> Coloured background regions in the chromosome (should be
>> able to do this already), some of which are hatched (not possible
>> right now... would have to look into ReportLab's capabilities here).
>> This is what you meant by banding?
> Yes-- being able to show cytobands and custom bands to designate regions
> will be very useful for me.  As before, I'm not wed to the cross-hatching,
> in fact the standard displays use only grayscale.

OK - simple colours are easy, I can add that to the test case example.

>> Multiple coloured dots for labels. Doable, but a nice API might
>> be tricky.
> I don't much care about those -- I'd be happy with text labels.


>> For layout did you mean the fact this isn't just a row of
>> chromosomes left to right, but here there are two rows?
>> I'm inclined to say the user should just move things in
>> the PDF for a final version using Adobe of Inkscape ;)
> Correct.  I'd prefer to have some programmatic control of layout, since I'd
> hate to have to manually edit every whole-genome plot.  Since I'm working
> exclusively with human data for now, it would be possible to pre-specify a
> few standard layouts and avoid the trouble of supporting dynamic features.
> Just let me know when the code is stable enough to start poking around.
>  I'll float a proposal for what I think could be done to obtain feedback
> before I commit much time to coding.

Would an option for using multiple rows be enough? It
wouldn't be quite as compact as the tweaked human
example you showed - but probably good enough to
print on a single page.

Another option is to do the PDF editing programmatically,
for example with ReportLab. You can embed multiple
(smaller) PDF files within a larger container. Its a bit
fiddly, but would be worth the effort for a major pipeline
where you always use the same (few) organism(s).


More information about the Biopython-dev mailing list