[Biopython-dev] Modifications to CircularDrawer

Leighton Pritchard Leighton.Pritchard at hutton.ac.uk
Wed Dec 5 16:21:06 UTC 2012


Hi all,

On 5 Dec 2012, at Wednesday, December 5, 13:50, David Martin wrote:

Peter, Leighton and I have had a brief discussion on Twitter re drawing circular genome diagrams.

I'd like to modify the CircularDrawer feature drawing to allow the following:

label_position: start|middle|end as per LinearDrawer
label_placement: inside|outside|overlap where inside and outside are anchored just inside and just outside the feature but do not overlap it, and overlap is the current behaviour
label_orientation: upright|circular which determines the orientation of the label. upright is the current behaviour. Circular would be oriented to face clockwise for the forward strand and anticlockwise for the reverse

This will cause some issues with track widths (how can you specify a track width for a feature track?)

Any thoughts/suggestions?

I think that the proposed changes are all sensible, but circular labels are fiddly, so we'll need to think a wee bit about what to do exactly (probably another reason why I didn't do much on this originally ;) ).

label_position makes perfect sense, as suggested.

label_placement as a concept is fine, but I think we might need to be more precise about the intended behaviour of the arguments. I think that 'overlap' is possibly just a result of the choice of two anchoring parameters: 'inside'/'outside' and 'start'/'end' of the label string (see .png if the list accepts them).  We might be able to cover all possibilities with just these two choices - does this image cover the range of intended positioning David?  If so, then how about two arguments (I'm easy on the argument names): 'label_outer=True/False' and 'label_anchor=start/end/0/1'?

[cid:4EA13CE3-20E7-41D8-870F-CBBAA9DD06B0 at scri.sari.ac.uk]

label_orientation: What I think you're saying is that we want a distinction between text that orients to assume a static page (one you always view upright: e.g. a monitor), and text that doesn't.  I prefer 'reorient_labels=True/False', or some other geometrically neutral argument name, to 'upright' (whose expected meaning could change depending on page location and local context) as a parameter, but it's a good idea.

IIRC Track widths are relative, rather than absolute, and don't include label bounding boxes, so off-hand I don't think there ought to be any downstream issues.  Famous last words, there! ;)

Cheers,

L.

--
Dr Leighton Pritchard
Information and Computing Sciences Group; Weeds, Pests and Diseases Theme
DG31, James Hutton Institute (Dundee)
Errol Road, Invergowrie, Perth and Kinross, Scotland, DD2 5DA
e:leighton.pritchard at hutton.ac.uk       w:http://www.hutton.ac.uk/staff/leighton-pritchard
gpg/pgp: 0xFEFC205C tel: +44(0)844 928 5428 x8827 or +44(0)1382 568827





________________________________________________________



This email is from the James Hutton Institute, however the views

expressed by the sender are not necessarily the views of the James Hutton

Institute and its subsidiaries. This email and any attachments are confidential and 

are intended solely for the use of the recipient(s) to whom they are addressed.

If you are not the intended recipient, you should not read, copy, disclose or rely on 

any information contained in this email, and we would ask you to contact the 

sender immediately and delete the email from your system.  Although the James 

Hutton Institute has taken reasonable precautions to ensure no viruses are present 

in this email, neither the Institute nor the sender accepts any responsibility for any 

viruses, and it is your responsibility to scan the email and any attachments.



The James Hutton Institute is a Scottish charitable company limited by guarantee.

Registered in Scotland No. SC374831

Registered Office: The James Hutton Institute, Invergowrie Dundee DD2 5DA. 

Charity No. SC041796
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2012-12-05 at Wednesday, December 5	16.06.12.png
Type: image/png
Size: 22969 bytes
Desc: Screen Shot 2012-12-05 at Wednesday, December 5	16.06.12.png
URL: <http://lists.open-bio.org/pipermail/biopython-dev/attachments/20121205/ab34b6ff/attachment-0002.png>


More information about the Biopython-dev mailing list