Edinburgh-Genome-Foundry / DnaFeaturesViewer

:eye: Python library to plot DNA sequence features (e.g. from Genbank files)
https://edinburgh-genome-foundry.github.io/DnaFeaturesViewer/
MIT License
591 stars 91 forks source link

Oval or diamond/octagon in addition to arrows for displayed features? #83

Open photocyte opened 9 months ago

photocyte commented 9 months ago

Hi there,

I've been using DNAFeaturesViewer for visualizing domains on polypeptides. (Yes, not exactly it's the intended use case of DFV - but its seeing as FASTA & GFF files are used in both areas, works well).

Typically, domains are shown with ovals, not the rectangular arrows like DFV shows by default which are more typically used for CDS features.

Would it be possible for DNAFeaturesViewer to be able to display features as ovals, or, as a simple solution, apply the code for the "arrow" to both the left and right of the feature, thus making an octogon. I've been editing the path of the features manually in my vector editor to make the octogon from the default feature arrows. Example below:

Screenshot 2024-01-08 at 11 34 46 AM
veghp commented 9 months ago

Hi,

Thanks & I agree this could be a good enhancement. First implementing the double-arrow feature to make a hexagon, which could be potentially easy (but I need to review the code).

Then it could be extended with a parameter to use an ellipse, or possibly round the edges of the rectangle (but I can't say now if these are possible).