GMOD / Apollo

Genome annotation editor with a Java Server backend and a Javascript client that runs in a web browser as a JBrowse plugin.
http://genomearchitect.readthedocs.io/
Other
128 stars 85 forks source link

Error while performing UNDO operation on pseudogene #1001

Closed deepakunni3 closed 8 years ago

deepakunni3 commented 8 years ago

When performing an UNDO operation on a pseudogene, the annotation disappears. On refresh of the page, the user created annotations track show the following error:

screen shot 2016-04-20 at 4 49 54 pm

This is mostly due to the improper JSON object being returned to the client upon UNDO.

This was reproducible on master.

nathandunn commented 8 years ago

@deepakunni3 Can you elaborate on this . . or are you able to fix this?

deepakunni3 commented 8 years ago

I feel it might be related to the way addTranscript() is being called for pseudogene (during UNDO) when it should really be calling addFeature(). Also, right now addFeature() stores the JSON object at RNA level and not at Gene level. I am thinking of rewriting the addFeature() method and see if that fixes this issue.

I am adding the issue here to keep track of this bug and to reference it in my PR.

nathandunn commented 8 years ago

What happens if you change it so that addFeature is called for pseudogenes (and all non-coding RNA)? I'm assuming that that should fix it. I don't think you'll need to rewrite addFeature() (hopefully).

deepakunni3 commented 8 years ago

I will have to rewrite at least the way JSON object is added to history in addFeature().

nathandunn commented 8 years ago

Whatever you think is best (for any of this). I was just trying to recollect why I wrote it one way versus the other. I just know that (like you previously inferred) that however it adds it the first time it should do the same when it does an "undo" operation as well.

monicacecilia commented 8 years ago

👍

monicacecilia commented 8 years ago

Fixed! 💃