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

feature type is getting reverted to misc_feature #831

Closed ericsturman closed 2 years ago

ericsturman commented 2 years ago

@tnrich

We are noticing new behavior where if a feature type is not listed in ve-sequence-utils/src/FeatureTypes it is getting defaulted to misc_feature. Is there a way to override this behavior?

tnrich commented 2 years ago

@ericsturman can you provide more info about where this is occurring? In the genbank import of a new file or in the edit feature dialog?

Also could you do a little digging and see if you can pinpoint which version of OVE this started failing on?

Hopefully it won't be too hard to track down via https://teselagen.github.io/openVectorEditor/#/Editor using the version chooser here:

image

Thanks!

ericsturman commented 2 years ago

Sorry for the late response @tnrich

This screenshot shows the desired behavior. I have modified the exampleSequenceData.js to give araC type stuff (and color red). in version 16.4.2 it works, but in version 16.4.3 it shows the type as misc_feature. Screen Shot 2022-06-16 at 11 46 49 AM

Thanks, Eric

tnrich commented 2 years ago

@ericsturman here's the line of code that is creating the change.

image

It is actually something that we wanted in most of our use cases (to prevent non-standard types from being used). I'll try adding a config option, something like allowNonStandardGenbankTypes and see if that could work.

ericsturman commented 2 years ago

@tnrich That will work.

ericsturman commented 2 years ago

Is it also possible to have some control over the size of text in the vector name that appears in the circular view? We have relatively short vector names that don't have whitespace for text wrapping. They are currently getting cut off... they weren't before.

tnrich commented 2 years ago

@ericsturman you'll need to make another issue for that. Also might be a good candidate for a user submitted PR :)

tnrich commented 2 years ago

@ericsturman I've added the following code to ve-sequence-utils:

image

Basically I added a way to allow OVE implementers to just set window.tg_allowNonStandardGenbankTypes=true at their earliest convenience to configure this option. I did this because the tidyUpSequenceData function was getting used in a ton of places (some of them quite nested and inconvenient to pass props to) and because it seems like the kind of option you'll either want for your project or not want (not some in-between).

So to use it just set window.tg_allowNonStandardGenbankTypes=true somewhere early on in the instantiation of your JS code. Let me know if this solves it for you.

This will land in OVE v17.6.3