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
127 stars 85 forks source link

Add an option under the 'Tools' menu to extract a reference sequence slice #116

Closed nathandunn closed 5 years ago

nathandunn commented 9 years ago

From: https://trello.com/c/tLwokYuo

From Monica Poelchau

Based on an annotator comment who wanted a reference sequence slice when zoomed out. Setting 'ALWAYS_SHOW=true' in the deployed root (jbrowse/plugins/WebApollo/js/View/Track/SequenceTrack.js) works for this, but looks pretty awkward.

nathandunn commented 9 years ago

@cmdcolin commented:

The "Save track data" doesn't work for the WebApollo refseq track either. I tried doing some initial things to support it but there are some bugs

For example this diff should add fasta export capabilities to the WebApollo track, but it is blank

    diff --git a/client/apollo/js/View/Track/SequenceTrack.js b/client/apollo/js/View/Track/SequenceTrack.js
     index fa82ec8..0657b35 100644
    --- a/client/apollo/js/View/Track/SequenceTrack.js
     +++ b/client/apollo/js/View/Track/SequenceTrack.js
     @@ -118,6 +118,9 @@ function( declare, StaticChunked, ScratchPad, DraggableFeatureTrack, JSONUtils,
         initAnnotTrack();

     },
+    _exportFormats: function() {
+        return [{name: 'FASTA', label: 'FASTA', fileExt: 'fasta'}];
+    },
cmdcolin commented 9 years ago

I realized that the problem with simply adding this exportFormats thing is basically due to the fact that WebApollo's sequence track uses "two store classes".

The main store class is called ScratchPad and it stores the sequence alterations. The secondary store class is normal SequenceChunks class, but it is kept as a private variable.

Since we override the main store class with ScratchPad, the default jbrowse things like sequence export normally are lost. Therefore, it would require a custom solution to fix this. I would prefer to go back to inherit from the jbrowse track in 2.x but we could also try and make the custom solution for this in the 1.x if it's highly desirable

selewis commented 9 years ago

Hi Colin,

So would it be a decision left to the user whether to export the ref-sequence with or without the edits incorporated?

For translational frameshifts (i.e. that only impact the resultant peptide) I would assume these are incorporated on export. (please tell me that we have added the ability to annotate translational frameshifts...)

-S

On Wed, Jan 21, 2015 at 1:03 PM, Colin Diesh notifications@github.com wrote:

I realized that the problem with simply adding this exportFormats thing is basically due to the fact that WebApollo's sequence track uses "two store classes".

The main store class is called ScratchPad and it stores the sequence alterations. The secondary store class is normal SequenceChunks class, but it is kept as a private variable.

Since we override the main store class with ScratchPad, the default jbrowse things like sequence export normally are lost. Therefore, it would require a custom solution to fix this. I would prefer to go back to inherit from the jbrowse track in 2.x but we could also try and make the custom solution for this in the 1.x if it's highly desirable

— Reply to this email directly or view it on GitHub https://github.com/GMOD/Apollo/issues/116#issuecomment-70921154.

cmdcolin commented 9 years ago

Yes the sequence changes do affect the protein coding sequence that you export. It is not yet optional how it is exported though, they are incorporated automatically. And the export is only from the "get sequence" menu on the specific features or the "save track data" on the AnnotTrack, while I think MP was interested in the export of the reference sequence for some whole region, or having a "save track data" on the SequenceTrack.

monicacecilia commented 9 years ago

@selewis: "please tell me that we have added the ability to annotate translational frameshifts..." Suzi, could I please ask you to explain what you mean by this?

Currently Web Apollo allows users to make single base modifications to annotate frameshifts by creating genomic edits (in/del/sub). Operation from the right click menu when zoomed to base level. Outcome: ORFs are modified; underlying reference sequence is annotated but not modified.

As a sanity check, and in the [hopefully] unlikely scenario that we may be once again calling two different processes by the same name, I'd very much like to hear your description of the behavior you expect and the operations in Web Apollo that should produce this behavior.

Thank you! :)

selewis commented 9 years ago

Nothing to do with the DNA.

There are transcripts in existence that naturally have 'skips' during their translation as the ribosome is chugging along down their length producing the resultant peptide. When these are known to exist for certain proteins we need to give the biologist curators the ability to annotate them in order to correctly generate the naturally produced protein.

-S

On Wed, Jan 21, 2015 at 4:01 PM, Monica Munoz-Torres < notifications@github.com> wrote:

@selewis https://github.com/selewis: "please tell me that we have added the ability to annotate translational frameshifts..." Suzi, could I please ask you to explain what you mean by this?

Currently Web Apollo allows users to make single base modifications to annotate frameshifts by creating genomic edits (in/del/sub). Operation from the right click menu when zoomed to base level. Outcome: ORFs are modified; underlying reference sequence is annotated but not modified.

As a sanity check, and in the [hopefully] unlikely scenario that we may be once again calling two different processes by the same name, I'd very much like to hear your description of the behavior you expect and the operations in Web Apollo that should produce this behavior.

Thank you! :)

— Reply to this email directly or view it on GitHub https://github.com/GMOD/Apollo/issues/116#issuecomment-70947259.

selewis commented 9 years ago

p.s. we had this feature in the old version of apollo along with stop-codon read-throughs. Two odd, but naturally occurring exceptions to the general rules.

On Wed, Jan 21, 2015 at 4:44 PM, Suzanna Lewis selewis@lbl.gov wrote:

Nothing to do with the DNA.

There are transcripts in existence that naturally have 'skips' during their translation as the ribosome is chugging along down their length producing the resultant peptide. When these are known to exist for certain proteins we need to give the biologist curators the ability to annotate them in order to correctly generate the naturally produced protein.

-S

On Wed, Jan 21, 2015 at 4:01 PM, Monica Munoz-Torres < notifications@github.com> wrote:

@selewis https://github.com/selewis: "please tell me that we have added the ability to annotate translational frameshifts..." Suzi, could I please ask you to explain what you mean by this?

Currently Web Apollo allows users to make single base modifications to annotate frameshifts by creating genomic edits (in/del/sub). Operation from the right click menu when zoomed to base level. Outcome: ORFs are modified; underlying reference sequence is annotated but not modified.

As a sanity check, and in the [hopefully] unlikely scenario that we may be once again calling two different processes by the same name, I'd very much like to hear your description of the behavior you expect and the operations in Web Apollo that should produce this behavior.

Thank you! :)

— Reply to this email directly or view it on GitHub https://github.com/GMOD/Apollo/issues/116#issuecomment-70947259.

monicacecilia commented 9 years ago

aaaah, yes, that's a mainly viral thing, isn't it? In >45 annotated genomes (euk) I have not come across one such gene nor a request for the feature. Could come in handy if/when supporting viral genomes.

selewis commented 9 years ago

Drosophila has it apparently, the one I know best.

-S

On Wed, Jan 21, 2015 at 5:02 PM, Monica Munoz-Torres < notifications@github.com> wrote:

aaaah, yes, that's a mainly viral thing, isn't it? In >45 annotated genomes (euk) I have not come across one such gene nor a request for the feature. Could come in handy if/when supporting viral genomes.

— Reply to this email directly or view it on GitHub https://github.com/GMOD/Apollo/issues/116#issuecomment-70953508.

nathandunn commented 5 years ago

You can download any highlighted sequence region.