TeselaGen / tg-oss

Teselagen Open Source modules
https://teselagen.github.io/tg-oss/
MIT License
37 stars 18 forks source link

feature display correct. Problem with reverse complement #77

Closed manulera closed 1 month ago

manulera commented 1 month ago

Hi @tnrich,

This makes it work for all cases, see example2.zip

Screenshot 2024-06-05 at 12 43 24

I have splitted it into two commits, the first one completes the logic that you started adding, the second one adds some extra logic to handle the special case of a single base exon (where isTruncatedEnd && isTruncatedStart but should be displayed as isFiller with text), see how the result looks in the left and right features in the bottom lane of the image above.

I noticed however that the current implementation of getAminoAcidDataForEachBaseOfDna messes up with Edit > Reverse complement entire sequence. This causes this error stack:

Screenshot 2024-06-05 at 12 49 42

I don't think this is related to what I implemented, since reverse-complementing the sequence outside of ove and loading it causes no problem. I think the function getAminoAcidDataForEachBaseOfDna is being called when not everything in the features has been updated after reverse complementing? Or maybe existing translations cause the problem?

manulera commented 1 month ago

Sorry, I had forgotten to push the second commit. It's there now

tnrich commented 1 month ago

Ok, published a new version of ove with the updates @manulera