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
584 stars 90 forks source link

edge colouring #14

Closed jjkoehorst closed 5 years ago

jjkoehorst commented 5 years ago

Very nice package and works also very smooth with larger datasets but the genes since they are so small are becoming a single line. To visualise different categories I would like to apply colouring to them. However is it also possible to colour the edges? Since the only thing I can see are the edges since they are so small and all turn into a black line instead of any other colour.

Zulko commented 5 years ago

Thanks for the feedback !

I have now added a linecolor parameter to the GraphicFeatures class (before that, it was hardcoded to "black"). I updated both Github and PyPI. It should do what you want.

However, in your particular case, the best solution is to set the linewidth property (already in your current version) to 0.

I don't know how you create your GraphicRecords, but just doing that a-posteriori works:

for feature in my_graphic_record.features:
    feature.linewidth = 0
jjkoehorst commented 5 years ago

Thanks a lot, somehow missed that option and thanks for the quick modification on changing line colours.