Our plotting dependency dna_features_viewer already has this capability (which I have been using locally) so I figured we may as well have this option too. I find that wrapping gene diagrams on 25000 nt per line makes the visualizations nicer for really long operons, which of course are not actual operons; nevertheless, we have a lot of long candidate systems in our real data.
Below are diagrams of the same candidate, plotted in three different ways:
With line wrapping, 25000 nt per line:Without line wrapping, before this PR:And you can't even see it being rendered here, but this is what plotting this candidate on a single line looks like now:
This changes how the single-line operon plot looks because the figure_width and figure_height arguments of record.plot are actually being applied now - they weren't before because an Axes object was also being passed to this function, which apparently nullifies those parameters. Note that plot_operon_pairs still passes an Axes to record.plot out of necessity, but it seems like the figure dimensions haven't been an issue with stacked operons so this is apparently fine.
Our plotting dependency
dna_features_viewer
already has this capability (which I have been using locally) so I figured we may as well have this option too. I find that wrapping gene diagrams on 25000 nt per line makes the visualizations nicer for really long operons, which of course are not actual operons; nevertheless, we have a lot of long candidate systems in our real data.Below are diagrams of the same candidate, plotted in three different ways:
With line wrapping, 25000 nt per line: Without line wrapping, before this PR: And you can't even see it being rendered here, but this is what plotting this candidate on a single line looks like now:
This changes how the single-line operon plot looks because the
figure_width
andfigure_height
arguments ofrecord.plot
are actually being applied now - they weren't before because anAxes
object was also being passed to this function, which apparently nullifies those parameters. Note thatplot_operon_pairs
still passes anAxes
torecord.plot
out of necessity, but it seems like the figure dimensions haven't been an issue with stacked operons so this is apparently fine.