malariagen / malariagen-data-python

Analyse MalariaGEN data from Python
https://malariagen.github.io/malariagen-data-python/latest/
MIT License
14 stars 24 forks source link

Add gene_labels and labels to plot_genes() #653

Open leehart opened 1 week ago

leehart commented 1 week ago

Re: issue #407

review-notebook-app[bot] commented 1 week ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

alimanfoo commented 3 days ago

Looking good...

image

alimanfoo commented 3 days ago

Hi @leehart, couple of comments...

One very small request, would it be possible to add just a little more vertical padding around the text labels? Particularly the negative strand gene labels are touching the gene rectangles, would be good to have a little padding.

The other request is that ultimately this will be needed as part of functions like plot_h12_gwss() where there is a genes track plotted below some other data track. So basically, could you add a gene_labels parameter to all functions like this, i.e., where plot_genes() is called internally?

leehart commented 9 hours ago

@alimanfoo How does this padding look to you?

Screenshot 2024-11-22 at 12 56 18

Ideally I'd like a more robust mechanism for accommodating these labels, because this is currently tailored to the default height of the plot, i.e. 120, so specifying a different height, e.g. height=240, results in a skewed layout, e.g.

Screenshot 2024-11-22 at 13 02 44