TeselaGen / openVectorEditor

DEPRECATED - Teselagen's Open Source Vector/Plasmid Editor Component
https://teselagen.github.io/tg-oss/ove/#/Editor
MIT License
200 stars 72 forks source link

edit color for plasmid map #823

Open jobabi opened 2 years ago

jobabi commented 2 years ago

Hi, I find it useful if one can choose different colors for the features in the plasmid map. Currently , if you label a Sequence as a promotor this part is then green. Maybe best is if you can choose the feature and the color independently.

thank you & best wishes

Jochen

@tnrich

jobabi commented 2 years ago

any feedback on this suggestion ?

tnrich commented 2 years ago

Hi Jobabi I think your suggestion makes sense. In which context are you using the ove editor? There are certain contexts where we want to prevent the user from choosing custom colors which means that this would need to be an option for the implementor of the editor.

jobabi commented 2 years ago

Hi Thomas,

we using OVE for plasmid visualization and prediction of digests etc... in combination with elabftw. For our lab there would be no problem to have individual colors for different genes. Actually, most feature within a plasmid are various genes, CDS or Proteins.... Here it would be nice to have different colors for resistence genes, tags and other genes.....

best wishes

Jochen

tnrich commented 2 years ago

@jobabi I think this would potentially be a good feature for you or someone within elabftw to contribute to OVE. I am not totally sure what to do for the UI implementation currently or how the feature custom color would persist when converting to/from different formats (genbank, json, etc).

Feel free to post UI ideas and conversion format standards here. I'm happy to help any adventurous coders along with their PRs.

tnrich commented 1 year ago

@jobabi this feature has now been implemented within the Teselagen paid app https://teselagen.com/

Basically there is an admin page which allows users to create feature types and edit existing feature types to update the color of the underlying feature type. We do not at this point support manually changing the color of an individual annotation.

In case you or someone else is interested in creating a similar system for OVE standalone or within your own system, here's how ve-sequence-utils (which powers the list of feature types) expects the overrides to be passed in:

window.tg_featureTypeOverrides = [
      { name: "proprotein", isHidden: true },
      { name: "CDS", color: "blue" },
      { name: "someRandomFeature", color: "red", genbankEquivalentType: "RBS" }
    ];

(more examples in the test file here: https://github.com/TeselaGen/ve-sequence-utils/blob/master/src/featureTypesAndColors.test.js#L13)