Display GFF "Note" attribute but not in the "Description" field

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Display GFF "Note" attribute but not in the "Description" field

Loraine Guéguen
Hi,

For an evidence track featuring RNAs, is it possible that the attribute
"Note=" of a GFF (which is normally displayed in the "Description" of
the "Primary Data" section ) can be displayed somewhere else ? In the
"Attributes" section maybe ? And how ? Can we configure the
trackList.json file to do that ?
Because we want to display a "product=" information in the "Description"
of the "Primary Data" section and we don't want to lose the attribute
"Note=".

NB : We use Apollo 2.0.4 and we have generated the evidence track with
the biodb-to-json tool.

Thank you so much for your attention.


Loraine Guéguen and Misharl Monsoor

--
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: ++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display GFF "Note" attribute but not in the "Description" field

nathandunn

Loriane / Misharl,

You would have to modify the code.    You are basically over-riding / changing these method in JBrowse:



and



You could over-ride this in JBrowse directly or in the Apollo plugin via something like like below (over-riding the methods above).  

I haven’t tested it and not sure if you have to do something more special to get the “showProduct” flag to show up in the track (or if you want to only show the product everywhere).  Also, if you want this behavior to be over-ridden for Canvas, I believe you can do that here in WebApolloCanvasFeature.  

diff --git a/client/apollo/js/View/Track/DraggableHTMLFeatures.js b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
index 21c072d..81c9587 100644
--- a/client/apollo/js/View/Track/DraggableHTMLFeatures.js
+++ b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
@@ -83,6 +83,53 @@ var draggableTrack = declare( HTMLFeatureTrack,
         );
     },
 
+    _renderCoreDetails: function(track, f, featDiv, container){
+        var coreDetails = dojo.create('div', { className: 'core' }, container );
+        var fmt = dojo.hitch( this, 'renderDetailField', coreDetails );
+        coreDetails.innerHTML += '<h2 class="sectiontitle">Primary Data</h2>';
+
+        fmt( 'Name', this.getFeatureLabel( f ),f );
+        fmt( 'Type', f.get('type'),f );
+        fmt( 'Score', f.get('score'),f );
+        if(track.showProduct){
+            fmt( 'Description', f.get('product'),f );
+        }
+        else{
+            fmt( 'Description', this.getFeatureDescription( f ),f );
+        }
+        fmt(
+            'Position',
+            Util.assembleLocString({ start: f.get('start'),
+                end: f.get('end'),
+                ref: this.refSeq.name,
+                strand: f.get('strand')
+            }),f
+        );
+        fmt( 'Length', Util.addCommas(f.get('end')-f.get('start'))+' bp',f );
+    },
+
+    _renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
+        var additionalTags = array.filter( f.tags(), function(t) {
+            return ! this._isReservedTag( t );
+        },this);
+
+        if(track.showProduct){
+            fmt( 'Note', this.getFeatureDescription( f ),f );
+        }
+
+        if( additionalTags.length ) {
+            var atElement = domConstruct.create(
+                'div',
+                { className: 'additional',
+                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
+                },
+                container );
+            array.forEach( additionalTags.sort(), function(t) {
+                this.renderDetailField( container, t, f.get(t), f );
+            }, this );
+        }
+    },
+




Nathan

On Apr 12, 2017, at 2:43 AM, Loraine Guéguen <[hidden email]> wrote:

Hi,

For an evidence track featuring RNAs, is it possible that the attribute "Note=" of a GFF (which is normally displayed in the "Description" of the "Primary Data" section ) can be displayed somewhere else ? In the "Attributes" section maybe ? And how ? Can we configure the trackList.json file to do that ?
Because we want to display a "product=" information in the "Description" of the "Primary Data" section and we don't want to lose the attribute "Note=".

NB : We use Apollo 2.0.4 and we have generated the evidence track with the biodb-to-json tool.

Thank you so much for your attention.


Loraine Guéguen and Misharl Monsoor

--
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: ++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display GFF "Note" attribute but not in the "Description" field

Loraine Guéguen
Thanks Nathan,

We would prefer not patch the code, because it would make the updates tricky, and this is only for one organism of the Apollo instance.

In fact, it is easy to display what we want into the description field, just by configuring the trackList.json:

         "style" : {
            "description" : "product, note, description",
         },

Which means (and indeed does): display by priority the product attribute, then the note, then the description.
The challenge is to be able to display the note attribute in another field (create one ?). Is a similar configuration possible into the trackList.json ?

Thanks,

Loraine



Le 12/04/2017 22:33, Nathan Dunn a écrit :

Loriane / Misharl,

You would have to modify the code.    You are basically over-riding / changing these method in JBrowse:



and



You could over-ride this in JBrowse directly or in the Apollo plugin via something like like below (over-riding the methods above).  

I haven’t tested it and not sure if you have to do something more special to get the “showProduct” flag to show up in the track (or if you want to only show the product everywhere).  Also, if you want this behavior to be over-ridden for Canvas, I believe you can do that here in WebApolloCanvasFeature.  

diff --git a/client/apollo/js/View/Track/DraggableHTMLFeatures.js b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
index 21c072d..81c9587 100644
--- a/client/apollo/js/View/Track/DraggableHTMLFeatures.js
+++ b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
@@ -83,6 +83,53 @@ var draggableTrack = declare( HTMLFeatureTrack,
         );
     },
 
+    _renderCoreDetails: function(track, f, featDiv, container){
+        var coreDetails = dojo.create('div', { className: 'core' }, container );
+        var fmt = dojo.hitch( this, 'renderDetailField', coreDetails );
+        coreDetails.innerHTML += '<h2 class="sectiontitle">Primary Data</h2>';
+
+        fmt( 'Name', this.getFeatureLabel( f ),f );
+        fmt( 'Type', f.get('type'),f );
+        fmt( 'Score', f.get('score'),f );
+        if(track.showProduct){
+            fmt( 'Description', f.get('product'),f );
+        }
+        else{
+            fmt( 'Description', this.getFeatureDescription( f ),f );
+        }
+        fmt(
+            'Position',
+            Util.assembleLocString({ start: f.get('start'),
+                end: f.get('end'),
+                ref: this.refSeq.name,
+                strand: f.get('strand')
+            }),f
+        );
+        fmt( 'Length', Util.addCommas(f.get('end')-f.get('start'))+' bp',f );
+    },
+
+    _renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
+        var additionalTags = array.filter( f.tags(), function(t) {
+            return ! this._isReservedTag( t );
+        },this);
+
+        if(track.showProduct){
+            fmt( 'Note', this.getFeatureDescription( f ),f );
+        }
+
+        if( additionalTags.length ) {
+            var atElement = domConstruct.create(
+                'div',
+                { className: 'additional',
+                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
+                },
+                container );
+            array.forEach( additionalTags.sort(), function(t) {
+                this.renderDetailField( container, t, f.get(t), f );
+            }, this );
+        }
+    },
+




Nathan

On Apr 12, 2017, at 2:43 AM, Loraine Guéguen <[hidden email]> wrote:

Hi,

For an evidence track featuring RNAs, is it possible that the attribute "Note=" of a GFF (which is normally displayed in the "Description" of the "Primary Data" section ) can be displayed somewhere else ? In the "Attributes" section maybe ? And how ? Can we configure the trackList.json file to do that ?
Because we want to display a "product=" information in the "Description" of the "Primary Data" section and we don't want to lose the attribute "Note=".

NB : We use Apollo 2.0.4 and we have generated the evidence track with the biodb-to-json tool.

Thank you so much for your attention.


Loraine Guéguen and Misharl Monsoor

--
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: ++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 


-- 
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: ++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display GFF "Note" attribute but not in the "Description" field

Colin
This is sort of similar to https://github.com/GMOD/jbrowse/issues/555

There are a couple workarounds presented there but don't know if any of them are a perfect fix because when you change style.description to product, then it makes the normal Note attribute go away from the detail popup

The reason is sort of weird but basically the logic is

1) render "reserved tags" in the "Primary data" part of the popup, which includes whatever is determined to go in the "Description" field which by default is "Note".
2) render everything except "reserved tags" in the "Attributes" part of the view details popup

The problem is that since the "Description" is changed to be something other than "note", and since "note" is a reserved tag, it decides not to render "note" anywhere in the popup

One workaround would be to not to use "Note" to store stuff.... but that might not be a very satisfying answer. Would be interesting to get fix for that issue though, possibly requires an update to jbrowse


-Colin

On Thu, Apr 13, 2017 at 10:14 AM, Loraine Guéguen <[hidden email]> wrote:
Thanks Nathan,

We would prefer not patch the code, because it would make the updates tricky, and this is only for one organism of the Apollo instance.

In fact, it is easy to display what we want into the description field, just by configuring the trackList.json:

         "style" : {
            "description" : "product, note, description",
         },

Which means (and indeed does): display by priority the product attribute, then the note, then the description.
The challenge is to be able to display the note attribute in another field (create one ?). Is a similar configuration possible into the trackList.json ?

Thanks,

Loraine




Le 12/04/2017 22:33, Nathan Dunn a écrit :

Loriane / Misharl,

You would have to modify the code.    You are basically over-riding / changing these method in JBrowse:



and



You could over-ride this in JBrowse directly or in the Apollo plugin via something like like below (over-riding the methods above).  

I haven’t tested it and not sure if you have to do something more special to get the “showProduct” flag to show up in the track (or if you want to only show the product everywhere).  Also, if you want this behavior to be over-ridden for Canvas, I believe you can do that here in WebApolloCanvasFeature.  

diff --git a/client/apollo/js/View/Track/DraggableHTMLFeatures.js b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
index 21c072d..81c9587 100644
--- a/client/apollo/js/View/Track/DraggableHTMLFeatures.js
+++ b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
@@ -83,6 +83,53 @@ var draggableTrack = declare( HTMLFeatureTrack,
         );
     },
 
+    _renderCoreDetails: function(track, f, featDiv, container){
+        var coreDetails = dojo.create('div', { className: 'core' }, container );
+        var fmt = dojo.hitch( this, 'renderDetailField', coreDetails );
+        coreDetails.innerHTML += '<h2 class="sectiontitle">Primary Data</h2>';
+
+        fmt( 'Name', this.getFeatureLabel( f ),f );
+        fmt( 'Type', f.get('type'),f );
+        fmt( 'Score', f.get('score'),f );
+        if(track.showProduct){
+            fmt( 'Description', f.get('product'),f );
+        }
+        else{
+            fmt( 'Description', this.getFeatureDescription( f ),f );
+        }
+        fmt(
+            'Position',
+            Util.assembleLocString({ start: f.get('start'),
+                end: f.get('end'),
+                ref: this.refSeq.name,
+                strand: f.get('strand')
+            }),f
+        );
+        fmt( 'Length', Util.addCommas(f.get('end')-f.get('start'))+' bp',f );
+    },
+
+    _renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
+        var additionalTags = array.filter( f.tags(), function(t) {
+            return ! this._isReservedTag( t );
+        },this);
+
+        if(track.showProduct){
+            fmt( 'Note', this.getFeatureDescription( f ),f );
+        }
+
+        if( additionalTags.length ) {
+            var atElement = domConstruct.create(
+                'div',
+                { className: 'additional',
+                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
+                },
+                container );
+            array.forEach( additionalTags.sort(), function(t) {
+                this.renderDetailField( container, t, f.get(t), f );
+            }, this );
+        }
+    },
+




Nathan

On Apr 12, 2017, at 2:43 AM, Loraine Guéguen <[hidden email]> wrote:

Hi,

For an evidence track featuring RNAs, is it possible that the attribute "Note=" of a GFF (which is normally displayed in the "Description" of the "Primary Data" section ) can be displayed somewhere else ? In the "Attributes" section maybe ? And how ? Can we configure the trackList.json file to do that ?
Because we want to display a "product=" information in the "Description" of the "Primary Data" section and we don't want to lose the attribute "Note=".

NB : We use Apollo 2.0.4 and we have generated the evidence track with the biodb-to-json tool.

Thank you so much for your attention.


Loraine Guéguen and Misharl Monsoor

--
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 


-- 
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.







This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display GFF "Note" attribute but not in the "Description" field

nathandunn

Loriane,

Per Colin’s notes and thinking about this a bit more (I wasn’t aware of this configuration) some possible solutions:

1 - You could modify the incoming GFF3 so that “Note” is “Product_Note” or something like that.  And then in trackList.json you could call this:

        "style" : {
            "description" : "product, product_note, description",
         },

I’m not sure if that if that will work, but it can’t hurt to try.   (I think this is what Colin is suggesting below).


2 - Leave the GFF3 as is but in trackList.json add 

showNoteInAttributes : true

add add this in DraggableHTMLFeatures (or create a subclass Draggable HTMLFeatures and add this method).  Highlighted important difference here:

_renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
        var additionalTags = array.filter( f.tags(), function(t) {
            
            if(t.showNoteInAttributes && t==‘Notes’){
                 return true ;
            }

            return ! this._isReservedTag( t );
        },this);


        if( additionalTags.length ) {
            var atElement = domConstruct.create(
                'div',
                { className: 'additional',
                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
                },
                container );
            array.forEach( additionalTags.sort(), function(t) {
                this.renderDetailField( container, t, f.get(t), f );
            }, this );
        }
    },


If this works, we can add a PR either in JBrowse or Apollo so you don’t have to patch it every time there is an upgrade.  Not sure if there is a good way to make this a bit more generic, though.  Thoughts welcome.  

Nathan

On Apr 13, 2017, at 8:07 AM, Colin <[hidden email]> wrote:

This is sort of similar to https://github.com/GMOD/jbrowse/issues/555

There are a couple workarounds presented there but don't know if any of them are a perfect fix because when you change style.description to product, then it makes the normal Note attribute go away from the detail popup

The reason is sort of weird but basically the logic is

1) render "reserved tags" in the "Primary data" part of the popup, which includes whatever is determined to go in the "Description" field which by default is "Note".
2) render everything except "reserved tags" in the "Attributes" part of the view details popup

The problem is that since the "Description" is changed to be something other than "note", and since "note" is a reserved tag, it decides not to render "note" anywhere in the popup

One workaround would be to not to use "Note" to store stuff.... but that might not be a very satisfying answer. Would be interesting to get fix for that issue though, possibly requires an update to jbrowse


-Colin

On Thu, Apr 13, 2017 at 10:14 AM, Loraine Guéguen <[hidden email]> wrote:
Thanks Nathan,

We would prefer not patch the code, because it would make the updates tricky, and this is only for one organism of the Apollo instance.

In fact, it is easy to display what we want into the description field, just by configuring the trackList.json:

         "style" : {
            "description" : "product, note, description",
         },

Which means (and indeed does): display by priority the product attribute, then the note, then the description.
The challenge is to be able to display the note attribute in another field (create one ?). Is a similar configuration possible into the trackList.json ?

Thanks,

Loraine




Le 12/04/2017 22:33, Nathan Dunn a écrit :

Loriane / Misharl,

You would have to modify the code.    You are basically over-riding / changing these method in JBrowse:



and



You could over-ride this in JBrowse directly or in the Apollo plugin via something like like below (over-riding the methods above).  

I haven’t tested it and not sure if you have to do something more special to get the “showProduct” flag to show up in the track (or if you want to only show the product everywhere).  Also, if you want this behavior to be over-ridden for Canvas, I believe you can do that here in WebApolloCanvasFeature.  

diff --git a/client/apollo/js/View/Track/DraggableHTMLFeatures.js b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
index 21c072d..81c9587 100644
--- a/client/apollo/js/View/Track/DraggableHTMLFeatures.js
+++ b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
@@ -83,6 +83,53 @@ var draggableTrack = declare( HTMLFeatureTrack,
         );
     },
 
+    _renderCoreDetails: function(track, f, featDiv, container){
+        var coreDetails = dojo.create('div', { className: 'core' }, container );
+        var fmt = dojo.hitch( this, 'renderDetailField', coreDetails );
+        coreDetails.innerHTML += '<h2 class="sectiontitle">Primary Data</h2>';
+
+        fmt( 'Name', this.getFeatureLabel( f ),f );
+        fmt( 'Type', f.get('type'),f );
+        fmt( 'Score', f.get('score'),f );
+        if(track.showProduct){
+            fmt( 'Description', f.get('product'),f );
+        }
+        else{
+            fmt( 'Description', this.getFeatureDescription( f ),f );
+        }
+        fmt(
+            'Position',
+            Util.assembleLocString({ start: f.get('start'),
+                end: f.get('end'),
+                ref: this.refSeq.name,
+                strand: f.get('strand')
+            }),f
+        );
+        fmt( 'Length', Util.addCommas(f.get('end')-f.get('start'))+' bp',f );
+    },
+
+    _renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
+        var additionalTags = array.filter( f.tags(), function(t) {
+            return ! this._isReservedTag( t );
+        },this);
+
+        if(track.showProduct){
+            fmt( 'Note', this.getFeatureDescription( f ),f );
+        }
+
+        if( additionalTags.length ) {
+            var atElement = domConstruct.create(
+                'div',
+                { className: 'additional',
+                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
+                },
+                container );
+            array.forEach( additionalTags.sort(), function(t) {
+                this.renderDetailField( container, t, f.get(t), f );
+            }, this );
+        }
+    },
+




Nathan

On Apr 12, 2017, at 2:43 AM, Loraine Guéguen <[hidden email]> wrote:

Hi,

For an evidence track featuring RNAs, is it possible that the attribute "Note=" of a GFF (which is normally displayed in the "Description" of the "Primary Data" section ) can be displayed somewhere else ? In the "Attributes" section maybe ? And how ? Can we configure the trackList.json file to do that ?
Because we want to display a "product=" information in the "Description" of the "Primary Data" section and we don't want to lose the attribute "Note=".

NB : We use Apollo 2.0.4 and we have generated the evidence track with the biodb-to-json tool.

Thank you so much for your attention.


Loraine Guéguen and Misharl Monsoor

--
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank" class="">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 


-- 
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank" class="">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display GFF "Note" attribute but not in the "Description" field

Colin
I think that the patch that Nathan has is probably the right idea, do you just want to add that to jbrowse master? 

The only sort of "enhancement" would be to try to automatically determine if note is being hidden by the existing description config, but that is kind of complicated and just having a "fallback" showNoteInAttributes seems ok for cases like this.

-Colin

On Thu, Apr 13, 2017 at 3:07 PM, Nathan Dunn <[hidden email]> wrote:

Loriane,

Per Colin’s notes and thinking about this a bit more (I wasn’t aware of this configuration) some possible solutions:

1 - You could modify the incoming GFF3 so that “Note” is “Product_Note” or something like that.  And then in trackList.json you could call this:

        "style" : {
            "description" : "product, product_note, description",
         },

I’m not sure if that if that will work, but it can’t hurt to try.   (I think this is what Colin is suggesting below).


2 - Leave the GFF3 as is but in trackList.json add 

showNoteInAttributes : true

add add this in DraggableHTMLFeatures (or create a subclass Draggable HTMLFeatures and add this method).  Highlighted important difference here:

_renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
        var additionalTags = array.filter( f.tags(), function(t) {
            
            if(t.showNoteInAttributes && t==‘Notes’){
                 return true ;
            }

            return ! this._isReservedTag( t );
        },this);


        if( additionalTags.length ) {
            var atElement = domConstruct.create(
                'div',
                { className: 'additional',
                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
                },
                container );
            array.forEach( additionalTags.sort(), function(t) {
                this.renderDetailField( container, t, f.get(t), f );
            }, this );
        }
    },


If this works, we can add a PR either in JBrowse or Apollo so you don’t have to patch it every time there is an upgrade.  Not sure if there is a good way to make this a bit more generic, though.  Thoughts welcome.  

Nathan

On Apr 13, 2017, at 8:07 AM, Colin <[hidden email]> wrote:

This is sort of similar to https://github.com/GMOD/jbrowse/issues/555

There are a couple workarounds presented there but don't know if any of them are a perfect fix because when you change style.description to product, then it makes the normal Note attribute go away from the detail popup

The reason is sort of weird but basically the logic is

1) render "reserved tags" in the "Primary data" part of the popup, which includes whatever is determined to go in the "Description" field which by default is "Note".
2) render everything except "reserved tags" in the "Attributes" part of the view details popup

The problem is that since the "Description" is changed to be something other than "note", and since "note" is a reserved tag, it decides not to render "note" anywhere in the popup

One workaround would be to not to use "Note" to store stuff.... but that might not be a very satisfying answer. Would be interesting to get fix for that issue though, possibly requires an update to jbrowse


-Colin

On Thu, Apr 13, 2017 at 10:14 AM, Loraine Guéguen <[hidden email]> wrote:
Thanks Nathan,

We would prefer not patch the code, because it would make the updates tricky, and this is only for one organism of the Apollo instance.

In fact, it is easy to display what we want into the description field, just by configuring the trackList.json:

         "style" : {
            "description" : "product, note, description",
         },

Which means (and indeed does): display by priority the product attribute, then the note, then the description.
The challenge is to be able to display the note attribute in another field (create one ?). Is a similar configuration possible into the trackList.json ?

Thanks,

Loraine




Le 12/04/2017 22:33, Nathan Dunn a écrit :

Loriane / Misharl,

You would have to modify the code.    You are basically over-riding / changing these method in JBrowse:



and



You could over-ride this in JBrowse directly or in the Apollo plugin via something like like below (over-riding the methods above).  

I haven’t tested it and not sure if you have to do something more special to get the “showProduct” flag to show up in the track (or if you want to only show the product everywhere).  Also, if you want this behavior to be over-ridden for Canvas, I believe you can do that here in WebApolloCanvasFeature.  

diff --git a/client/apollo/js/View/Track/DraggableHTMLFeatures.js b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
index 21c072d..81c9587 100644
--- a/client/apollo/js/View/Track/DraggableHTMLFeatures.js
+++ b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
@@ -83,6 +83,53 @@ var draggableTrack = declare( HTMLFeatureTrack,
         );
     },
 
+    _renderCoreDetails: function(track, f, featDiv, container){
+        var coreDetails = dojo.create('div', { className: 'core' }, container );
+        var fmt = dojo.hitch( this, 'renderDetailField', coreDetails );
+        coreDetails.innerHTML += '<h2 class="sectiontitle">Primary Data</h2>';
+
+        fmt( 'Name', this.getFeatureLabel( f ),f );
+        fmt( 'Type', f.get('type'),f );
+        fmt( 'Score', f.get('score'),f );
+        if(track.showProduct){
+            fmt( 'Description', f.get('product'),f );
+        }
+        else{
+            fmt( 'Description', this.getFeatureDescription( f ),f );
+        }
+        fmt(
+            'Position',
+            Util.assembleLocString({ start: f.get('start'),
+                end: f.get('end'),
+                ref: this.refSeq.name,
+                strand: f.get('strand')
+            }),f
+        );
+        fmt( 'Length', Util.addCommas(f.get('end')-f.get('start'))+' bp',f );
+    },
+
+    _renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
+        var additionalTags = array.filter( f.tags(), function(t) {
+            return ! this._isReservedTag( t );
+        },this);
+
+        if(track.showProduct){
+            fmt( 'Note', this.getFeatureDescription( f ),f );
+        }
+
+        if( additionalTags.length ) {
+            var atElement = domConstruct.create(
+                'div',
+                { className: 'additional',
+                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
+                },
+                container );
+            array.forEach( additionalTags.sort(), function(t) {
+                this.renderDetailField( container, t, f.get(t), f );
+            }, this );
+        }
+    },
+




Nathan

On Apr 12, 2017, at 2:43 AM, Loraine Guéguen <[hidden email]> wrote:

Hi,

For an evidence track featuring RNAs, is it possible that the attribute "Note=" of a GFF (which is normally displayed in the "Description" of the "Primary Data" section ) can be displayed somewhere else ? In the "Attributes" section maybe ? And how ? Can we configure the trackList.json file to do that ?
Because we want to display a "product=" information in the "Description" of the "Primary Data" section and we don't want to lose the attribute "Note=".

NB : We use Apollo 2.0.4 and we have generated the evidence track with the biodb-to-json tool.

Thank you so much for your attention.


Loraine Guéguen and Misharl Monsoor

--
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 


-- 
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.







This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display GFF "Note" attribute but not in the "Description" field

Loraine Guéguen-2
thanks!
I'll try the patch and make a PR

Le 13/04/2017 21:48, Colin a écrit :
I think that the patch that Nathan has is probably the right idea, do you just want to add that to jbrowse master? 

The only sort of "enhancement" would be to try to automatically determine if note is being hidden by the existing description config, but that is kind of complicated and just having a "fallback" showNoteInAttributes seems ok for cases like this.

-Colin

On Thu, Apr 13, 2017 at 3:07 PM, Nathan Dunn <[hidden email]> wrote:

Loriane,

Per Colin’s notes and thinking about this a bit more (I wasn’t aware of this configuration) some possible solutions:

1 - You could modify the incoming GFF3 so that “Note” is “Product_Note” or something like that.  And then in trackList.json you could call this:

        "style" : {
            "description" : "product, product_note, description",
         },

I’m not sure if that if that will work, but it can’t hurt to try.   (I think this is what Colin is suggesting below).


2 - Leave the GFF3 as is but in trackList.json add 

showNoteInAttributes : true

add add this in DraggableHTMLFeatures (or create a subclass Draggable HTMLFeatures and add this method).  Highlighted important difference here:

_renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
        var additionalTags = array.filter( f.tags(), function(t) {
            
            if(t.showNoteInAttributes && t==‘Notes’){
                 return true ;
            }

            return ! this._isReservedTag( t );
        },this);


        if( additionalTags.length ) {
            var atElement = domConstruct.create(
                'div',
                { className: 'additional',
                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
                },
                container );
            array.forEach( additionalTags.sort(), function(t) {
                this.renderDetailField( container, t, f.get(t), f );
            }, this );
        }
    },


If this works, we can add a PR either in JBrowse or Apollo so you don’t have to patch it every time there is an upgrade.  Not sure if there is a good way to make this a bit more generic, though.  Thoughts welcome.  

Nathan

On Apr 13, 2017, at 8:07 AM, Colin <[hidden email]> wrote:

This is sort of similar to https://github.com/GMOD/jbrowse/issues/555

There are a couple workarounds presented there but don't know if any of them are a perfect fix because when you change style.description to product, then it makes the normal Note attribute go away from the detail popup

The reason is sort of weird but basically the logic is

1) render "reserved tags" in the "Primary data" part of the popup, which includes whatever is determined to go in the "Description" field which by default is "Note".
2) render everything except "reserved tags" in the "Attributes" part of the view details popup

The problem is that since the "Description" is changed to be something other than "note", and since "note" is a reserved tag, it decides not to render "note" anywhere in the popup

One workaround would be to not to use "Note" to store stuff.... but that might not be a very satisfying answer. Would be interesting to get fix for that issue though, possibly requires an update to jbrowse


-Colin

On Thu, Apr 13, 2017 at 10:14 AM, Loraine Guéguen <[hidden email]> wrote:
Thanks Nathan,

We would prefer not patch the code, because it would make the updates tricky, and this is only for one organism of the Apollo instance.

In fact, it is easy to display what we want into the description field, just by configuring the trackList.json:

         "style" : {
            "description" : "product, note, description",
         },

Which means (and indeed does): display by priority the product attribute, then the note, then the description.
The challenge is to be able to display the note attribute in another field (create one ?). Is a similar configuration possible into the trackList.json ?

Thanks,

Loraine




Le 12/04/2017 22:33, Nathan Dunn a écrit :

Loriane / Misharl,

You would have to modify the code.    You are basically over-riding / changing these method in JBrowse:

https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/View/Track/_FeatureDetailMixin.js#L73

https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/View/Track/_FeatureDetailMixin.js#L92

and

https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/View/Track/_FeatureDetailMixin.js#L137


You could over-ride this in JBrowse directly or in the Apollo plugin via something like like below (over-riding the methods above).  

I haven’t tested it and not sure if you have to do something more special to get the “showProduct” flag to show up in the track (or if you want to only show the product everywhere).  Also, if you want this behavior to be over-ridden for Canvas, I believe you can do that here in WebApolloCanvasFeature.  

diff --git a/client/apollo/js/View/Track/DraggableHTMLFeatures.js b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
index 21c072d..81c9587 100644
--- a/client/apollo/js/View/Track/DraggableHTMLFeatures.js
+++ b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
@@ -83,6 +83,53 @@ var draggableTrack = declare( HTMLFeatureTrack,
         );
     },
 
+    _renderCoreDetails: function(track, f, featDiv, container){
+        var coreDetails = dojo.create('div', { className: 'core' }, container );
+        var fmt = dojo.hitch( this, 'renderDetailField', coreDetails );
+        coreDetails.innerHTML += '<h2 class="sectiontitle">Primary Data</h2>';
+
+        fmt( 'Name', this.getFeatureLabel( f ),f );
+        fmt( 'Type', f.get('type'),f );
+        fmt( 'Score', f.get('score'),f );
+        if(track.showProduct){
+            fmt( 'Description', f.get('product'),f );
+        }
+        else{
+            fmt( 'Description', this.getFeatureDescription( f ),f );
+        }
+        fmt(
+            'Position',
+            Util.assembleLocString({ start: f.get('start'),
+                end: f.get('end'),
+                ref: this.refSeq.name,
+                strand: f.get('strand')
+            }),f
+        );
+        fmt( 'Length', Util.addCommas(f.get('end')-f.get('start'))+' bp',f );
+    },
+
+    _renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
+        var additionalTags = array.filter( f.tags(), function(t) {
+            return ! this._isReservedTag( t );
+        },this);
+
+        if(track.showProduct){
+            fmt( 'Note', this.getFeatureDescription( f ),f );
+        }
+
+        if( additionalTags.length ) {
+            var atElement = domConstruct.create(
+                'div',
+                { className: 'additional',
+                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
+                },
+                container );
+            array.forEach( additionalTags.sort(), function(t) {
+                this.renderDetailField( container, t, f.get(t), f );
+            }, this );
+        }
+    },
+




Nathan

On Apr 12, 2017, at 2:43 AM, Loraine Guéguen <[hidden email]> wrote:

Hi,

For an evidence track featuring RNAs, is it possible that the attribute "Note=" of a GFF (which is normally displayed in the "Description" of the "Primary Data" section ) can be displayed somewhere else ? In the "Attributes" section maybe ? And how ? Can we configure the trackList.json file to do that ?
Because we want to display a "product=" information in the "Description" of the "Primary Data" section and we don't want to lose the attribute "Note=".

NB : We use Apollo 2.0.4 and we have generated the evidence track with the biodb-to-json tool.

Thank you so much for your attention.


Loraine Guéguen and Misharl Monsoor

--
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a moz-do-not-send="true" href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 


-- 
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a moz-do-not-send="true" href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.







This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 


-- 
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: ++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Display GFF "Note" attribute but not in the "Description" field

Colin

On Tue, Apr 18, 2017 at 4:50 PM, Loraine Guéguen <[hidden email]> wrote:
thanks!
I'll try the patch and make a PR


Le 13/04/2017 21:48, Colin a écrit :
I think that the patch that Nathan has is probably the right idea, do you just want to add that to jbrowse master? 

The only sort of "enhancement" would be to try to automatically determine if note is being hidden by the existing description config, but that is kind of complicated and just having a "fallback" showNoteInAttributes seems ok for cases like this.

-Colin

On Thu, Apr 13, 2017 at 3:07 PM, Nathan Dunn <[hidden email]> wrote:

Loriane,

Per Colin’s notes and thinking about this a bit more (I wasn’t aware of this configuration) some possible solutions:

1 - You could modify the incoming GFF3 so that “Note” is “Product_Note” or something like that.  And then in trackList.json you could call this:

        "style" : {
            "description" : "product, product_note, description",
         },

I’m not sure if that if that will work, but it can’t hurt to try.   (I think this is what Colin is suggesting below).


2 - Leave the GFF3 as is but in trackList.json add 

showNoteInAttributes : true

add add this in DraggableHTMLFeatures (or create a subclass Draggable HTMLFeatures and add this method).  Highlighted important difference here:

_renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
        var additionalTags = array.filter( f.tags(), function(t) {
            
            if(t.showNoteInAttributes && t==‘Notes’){
                 return true ;
            }

            return ! this._isReservedTag( t );
        },this);


        if( additionalTags.length ) {
            var atElement = domConstruct.create(
                'div',
                { className: 'additional',
                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
                },
                container );
            array.forEach( additionalTags.sort(), function(t) {
                this.renderDetailField( container, t, f.get(t), f );
            }, this );
        }
    },


If this works, we can add a PR either in JBrowse or Apollo so you don’t have to patch it every time there is an upgrade.  Not sure if there is a good way to make this a bit more generic, though.  Thoughts welcome.  

Nathan

On Apr 13, 2017, at 8:07 AM, Colin <[hidden email][hidden email]> wrote:

This is sort of similar to https://github.com/GMOD/jbrowse/issues/555

There are a couple workarounds presented there but don't know if any of them are a perfect fix because when you change style.description to product, then it makes the normal Note attribute go away from the detail popup

The reason is sort of weird but basically the logic is

1) render "reserved tags" in the "Primary data" part of the popup, which includes whatever is determined to go in the "Description" field which by default is "Note".
2) render everything except "reserved tags" in the "Attributes" part of the view details popup

The problem is that since the "Description" is changed to be something other than "note", and since "note" is a reserved tag, it decides not to render "note" anywhere in the popup

One workaround would be to not to use "Note" to store stuff.... but that might not be a very satisfying answer. Would be interesting to get fix for that issue though, possibly requires an update to jbrowse


-Colin

On Thu, Apr 13, 2017 at 10:14 AM, Loraine Guéguen <[hidden email][hidden email]> wrote:
Thanks Nathan,

We would prefer not patch the code, because it would make the updates tricky, and this is only for one organism of the Apollo instance.

In fact, it is easy to display what we want into the description field, just by configuring the trackList.json:

         "style" : {
            "description" : "product, note, description",
         },

Which means (and indeed does): display by priority the product attribute, then the note, then the description.
The challenge is to be able to display the note attribute in another field (create one ?). Is a similar configuration possible into the trackList.json ?

Thanks,

Loraine




Le 12/04/2017 22:33, Nathan Dunn a écrit :

Loriane / Misharl,

You would have to modify the code.    You are basically over-riding / changing these method in JBrowse:

https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/View/Track/_FeatureDetailMixin.js#L73

https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/View/Track/_FeatureDetailMixin.js#L92

and

https://github.com/GMOD/jbrowse/blob/master/src/JBrowse/View/Track/_FeatureDetailMixin.js#L137


You could over-ride this in JBrowse directly or in the Apollo plugin via something like like below (over-riding the methods above).  

I haven’t tested it and not sure if you have to do something more special to get the “showProduct” flag to show up in the track (or if you want to only show the product everywhere).  Also, if you want this behavior to be over-ridden for Canvas, I believe you can do that here in WebApolloCanvasFeature.  

diff --git a/client/apollo/js/View/Track/DraggableHTMLFeatures.js b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
index 21c072d..81c9587 100644
--- a/client/apollo/js/View/Track/DraggableHTMLFeatures.js
+++ b/client/apollo/js/View/Track/DraggableHTMLFeatures.js
@@ -83,6 +83,53 @@ var draggableTrack = declare( HTMLFeatureTrack,
         );
     },
 
+    _renderCoreDetails: function(track, f, featDiv, container){
+        var coreDetails = dojo.create('div', { className: 'core' }, container );
+        var fmt = dojo.hitch( this, 'renderDetailField', coreDetails );
+        coreDetails.innerHTML += '<h2 class="sectiontitle">Primary Data</h2>';
+
+        fmt( 'Name', this.getFeatureLabel( f ),f );
+        fmt( 'Type', f.get('type'),f );
+        fmt( 'Score', f.get('score'),f );
+        if(track.showProduct){
+            fmt( 'Description', f.get('product'),f );
+        }
+        else{
+            fmt( 'Description', this.getFeatureDescription( f ),f );
+        }
+        fmt(
+            'Position',
+            Util.assembleLocString({ start: f.get('start'),
+                end: f.get('end'),
+                ref: this.refSeq.name,
+                strand: f.get('strand')
+            }),f
+        );
+        fmt( 'Length', Util.addCommas(f.get('end')-f.get('start'))+' bp',f );
+    },
+
+    _renderAdditionalTagsDetail: function( track, f, featDiv, container ) {
+        var additionalTags = array.filter( f.tags(), function(t) {
+            return ! this._isReservedTag( t );
+        },this);
+
+        if(track.showProduct){
+            fmt( 'Note', this.getFeatureDescription( f ),f );
+        }
+
+        if( additionalTags.length ) {
+            var atElement = domConstruct.create(
+                'div',
+                { className: 'additional',
+                    innerHTML: '<h2 class="sectiontitle">Attributes</h2>'
+                },
+                container );
+            array.forEach( additionalTags.sort(), function(t) {
+                this.renderDetailField( container, t, f.get(t), f );
+            }, this );
+        }
+    },
+




Nathan

On Apr 12, 2017, at 2:43 AM, Loraine Guéguen <[hidden email][hidden email]> wrote:

Hi,

For an evidence track featuring RNAs, is it possible that the attribute "Note=" of a GFF (which is normally displayed in the "Description" of the "Primary Data" section ) can be displayed somewhere else ? In the "Attributes" section maybe ? And how ? Can we configure the trackList.json file to do that ?
Because we want to display a "product=" information in the "Description" of the "Primary Data" section and we don't want to lose the attribute "Note=".

NB : We use Apollo 2.0.4 and we have generated the evidence track with the biodb-to-json tool.

Thank you so much for your attention.


Loraine Guéguen and Misharl Monsoor

--
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email][hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 


-- 
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email][hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email][hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 


-- 
Loraine Guéguen

Plateforme ABiMS (Analyses and Bioinformatics for Marine Sciences)
Service Informatique et Bioinformatique
Station Biologique de Roscoff
FR 2424 CNRS UPMC
Place Georges Teissier
CS 90074
29688 Roscoff cedex
tel: <a href="tel:+33%202%2098%2029%2056%2046" value="+33298295646" target="_blank">++33 (0)2 98 29 56 46 (interne : 415)
http://abims.sb-roscoff.fr/
http://www.sb-roscoff.fr/





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.







This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unknown column 'this_.date_created' in 'field list'

Miguel Grau
Hi apollo-users,

After upgrade mysql from 5.1 to 5.7.17 version, I can not login to apollo. It is stuck on "Loading" pop-up window and catalina.out contains:

2017-05-02 12:35:31,159 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column date_created datetime not null
2017-05-02 12:35:31,160 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_created' at row 1
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column last_updated datetime not null
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'last_updated' at row 1
Starting Quartz Scheduler in QuartzFactoryBean
2017-05-02 12:35:37,673 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Removing stale preferences
2017-05-02 12:35:37,754 [DefaultPluginScheduler_Worker-2] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:37,756 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Error removing preferences org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /usr/share/apache-tomcat-7.0.61/webapps/apollo.war has finished in 30,801 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager has finished in 116 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples has finished in 226 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs has finished in 59 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager has finished in 69 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT has finished in 138 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples has finished in 249 ms
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 02, 2017 12:35:40 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 31757 ms
2017-05-02 12:35:42,625 [ajp-bio-8009-exec-5] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,643 [ajp-bio-8009-exec-7] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,644 [ajp-bio-8009-exec-7] ERROR apollo.UserController  - org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,804 [ajp-bio-8009-exec-5] ERROR errors.GrailsExceptionResolver  - MySQLSyntaxErrorException occurred when processing request: [POST] /apollo/sequence/getSequences/
Unknown column 'this_.date_created' in 'field list'. Stacktrace follows:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2313)
        at org.grails.datastore.gorm.GormStaticApi.methodMissing(GormStaticApi.groovy:105)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismPreference(PreferenceService.groovy:163)
        at org.bbop.apollo.PreferenceService.$tt__getOrganismFromPreferences(PreferenceService.groovy:252)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismForCurrentUser(PreferenceService.groovy:16)
        at org.bbop.apollo.SequenceController.$tt__getSequences(SequenceController.groovy:185)
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)





Any idea? I could use a database backup.
Thank for your help,

Miquel




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unknown column 'this_.date_created' in 'field list'

Deepak Unni
Hi Miquel,

Here is a patch that attempts to fix this issue. 

Edit the grails-app/jobs/org/bbop/apollo/CleanupPreferencesJob.groovy and add the following to Line 10:

simple repeatInterval: 24 * 60 * 60 * 1000l ,startDelay: 5 * 60 * 1000l // execute job once a day, delays 5 minutes

This patch is also part of Apollo master branch.


Also, be sure to restart your MySQL database as well.


Cheers,

Deepak

On Tue, May 2, 2017 at 1:14 AM, miquel <[hidden email]> wrote:
Hi apollo-users,

After upgrade mysql from 5.1 to 5.7.17 version, I can not login to apollo. It is stuck on "Loading" pop-up window and catalina.out contains:

2017-05-02 12:35:31,159 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column date_created datetime not null
2017-05-02 12:35:31,160 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_created' at row 1
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column last_updated datetime not null
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'last_updated' at row 1
Starting Quartz Scheduler in QuartzFactoryBean
2017-05-02 12:35:37,673 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Removing stale preferences
2017-05-02 12:35:37,754 [DefaultPluginScheduler_Worker-2] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:37,756 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Error removing preferences org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /usr/share/apache-tomcat-7.0.61/webapps/apollo.war has finished in 30,801 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager has finished in 116 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples has finished in 226 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs has finished in 59 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager has finished in 69 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT has finished in 138 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples has finished in 249 ms
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 02, 2017 12:35:40 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 31757 ms
2017-05-02 12:35:42,625 [ajp-bio-8009-exec-5] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,643 [ajp-bio-8009-exec-7] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,644 [ajp-bio-8009-exec-7] ERROR apollo.UserController  - org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,804 [ajp-bio-8009-exec-5] ERROR errors.GrailsExceptionResolver  - MySQLSyntaxErrorException occurred when processing request: [POST] /apollo/sequence/getSequences/
Unknown column 'this_.date_created' in 'field list'. Stacktrace follows:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2313)
        at org.grails.datastore.gorm.GormStaticApi.methodMissing(GormStaticApi.groovy:105)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismPreference(PreferenceService.groovy:163)
        at org.bbop.apollo.PreferenceService.$tt__getOrganismFromPreferences(PreferenceService.groovy:252)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismForCurrentUser(PreferenceService.groovy:16)
        at org.bbop.apollo.SequenceController.$tt__getSequences(SequenceController.groovy:185)
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)





Any idea? I could use a database backup.
Thank for your help,

Miquel




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.





--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unknown column 'this_.date_created' in 'field list'

Deepak Unni
Hi Miquel,

Here are a few additional solutions (assuming the previous fixes don't work).

Before making any changes listed below, stop the Apollo instance.

1. Clean the preference table by removing all entries in the preference table.

delete from preference

Then start Apollo.

2. Edit entries with null values in the preference table: this manually fixes any entry in the preference table that has null value for column 'date_created'.

update preference set date_created = '<some old date>' where date_created = null;

Then start Apollo.

3. Alter preference table to allow for column 'date_created' to hold null values.

ALTER TABLE preference MODIFY date_created TIMESTAMP null;

Then start Apollo.



Hope this helps!

Cheers,

Deepak



On Tue, May 2, 2017 at 5:05 PM, Deepak Unni <[hidden email]> wrote:
Hi Miquel,

Here is a patch that attempts to fix this issue. 

Edit the grails-app/jobs/org/bbop/apollo/CleanupPreferencesJob.groovy and add the following to Line 10:

simple repeatInterval: 24 * 60 * 60 * 1000l ,startDelay: 5 * 60 * 1000l // execute job once a day, delays 5 minutes

This patch is also part of Apollo master branch.


Also, be sure to restart your MySQL database as well.


Cheers,

Deepak

On Tue, May 2, 2017 at 1:14 AM, miquel <[hidden email]> wrote:
Hi apollo-users,

After upgrade mysql from 5.1 to 5.7.17 version, I can not login to apollo. It is stuck on "Loading" pop-up window and catalina.out contains:

2017-05-02 12:35:31,159 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column date_created datetime not null
2017-05-02 12:35:31,160 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_created' at row 1
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column last_updated datetime not null
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'last_updated' at row 1
Starting Quartz Scheduler in QuartzFactoryBean
2017-05-02 12:35:37,673 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Removing stale preferences
2017-05-02 12:35:37,754 [DefaultPluginScheduler_Worker-2] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:37,756 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Error removing preferences org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /usr/share/apache-tomcat-7.0.61/webapps/apollo.war has finished in 30,801 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager has finished in 116 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples has finished in 226 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs has finished in 59 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager has finished in 69 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT has finished in 138 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples has finished in 249 ms
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 02, 2017 12:35:40 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 31757 ms
2017-05-02 12:35:42,625 [ajp-bio-8009-exec-5] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,643 [ajp-bio-8009-exec-7] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,644 [ajp-bio-8009-exec-7] ERROR apollo.UserController  - org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,804 [ajp-bio-8009-exec-5] ERROR errors.GrailsExceptionResolver  - MySQLSyntaxErrorException occurred when processing request: [POST] /apollo/sequence/getSequences/
Unknown column 'this_.date_created' in 'field list'. Stacktrace follows:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2313)
        at org.grails.datastore.gorm.GormStaticApi.methodMissing(GormStaticApi.groovy:105)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismPreference(PreferenceService.groovy:163)
        at org.bbop.apollo.PreferenceService.$tt__getOrganismFromPreferences(PreferenceService.groovy:252)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismForCurrentUser(PreferenceService.groovy:16)
        at org.bbop.apollo.SequenceController.$tt__getSequences(SequenceController.groovy:185)
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)





Any idea? I could use a database backup.
Thank for your help,

Miquel




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.





--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia



--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unknown column 'this_.date_created' in 'field list'

Miguel Grau

Hi Deepak,

After edit CleanupPreferencesJob.groovy and clean the preference table, first I found some errors on catalina.out:

2017-05-03 09:15:03,935 [ajp-bio-8009-exec-5] ERROR spi.SqlExceptionHelper  - Deadlock found when trying to get lock; try restarting transaction
2017-05-03 09:15:03,946 [ajp-bio-8009-exec-7] ERROR spi.SqlExceptionHelper  - Deadlock found when trying to get lock; try restarting transaction
2017-05-03 09:15:03,946 [ajp-bio-8009-exec-1] ERROR spi.SqlExceptionHelper  - Deadlock found when trying to get lock; try restarting transaction
2017-05-03 09:15:03,976 [ajp-bio-8009-exec-7] ERROR apollo.AnnotatorController  - Hibernate operation: could not execute statement; SQL [n/a]; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
org.springframework.dao.DeadlockLoserDataAccessException: Hibernate operation: could not execute statement; SQL [n/a]; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:263)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
        at org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateTemplate.convertJdbcAccessException(GrailsHibernateTemplate.java:613


But, without change anything, now I can log into apollo and everything looks like is working properly. The previous error doesn't appear anymore in the logs.

Sometimes appear these warnings:

2017-05-03 11:02:20,863 [ajp-bio-8009-exec-10] WARN  apollo.PreferenceService  - Multiple preferences found: 8
2017-05-03 11:02:20,879 [ajp-bio-8009-exec-10] INFO  apollo.UserController  - updateTrackListPreference
2017-05-03 11:02:20,882 [ajp-bio-8009-exec-10] INFO  apollo.UserController  - Added userOrganismPreference false
2017-05-03 11:02:21,039 [ajp-bio-8009-exec-2] WARN  apollo.PreferenceService  - Multiple preferences found: 8
2017-05-03 11:02:21,315 [ajp-bio-8009-exec-7] WARN  apollo.PreferenceService  - Multiple preferences found: 8


Thanks for your help!

Miquel


On 2017年05月03日 07:39, Deepak Unni wrote:
Hi Miquel,

Here are a few additional solutions (assuming the previous fixes don't work).

Before making any changes listed below, stop the Apollo instance.

1. Clean the preference table by removing all entries in the preference table.

delete from preference

Then start Apollo.

2. Edit entries with null values in the preference table: this manually fixes any entry in the preference table that has null value for column 'date_created'.

update preference set date_created = '<some old date>' where date_created = null;

Then start Apollo.

3. Alter preference table to allow for column 'date_created' to hold null values.

ALTER TABLE preference MODIFY date_created TIMESTAMP null;

Then start Apollo.



Hope this helps!

Cheers,

Deepak



On Tue, May 2, 2017 at 5:05 PM, Deepak Unni <[hidden email]> wrote:
Hi Miquel,

Here is a patch that attempts to fix this issue. 

Edit the grails-app/jobs/org/bbop/apollo/CleanupPreferencesJob.groovy and add the following to Line 10:

simple repeatInterval: 24 * 60 * 60 * 1000l ,startDelay: 5 * 60 * 1000l // execute job once a day, delays 5 minutes

This patch is also part of Apollo master branch.


Also, be sure to restart your MySQL database as well.


Cheers,

Deepak

On Tue, May 2, 2017 at 1:14 AM, miquel <[hidden email]> wrote:
Hi apollo-users,

After upgrade mysql from 5.1 to 5.7.17 version, I can not login to apollo. It is stuck on "Loading" pop-up window and catalina.out contains:

2017-05-02 12:35:31,159 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column date_created datetime not null
2017-05-02 12:35:31,160 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_created' at row 1
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column last_updated datetime not null
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'last_updated' at row 1
Starting Quartz Scheduler in QuartzFactoryBean
2017-05-02 12:35:37,673 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Removing stale preferences
2017-05-02 12:35:37,754 [DefaultPluginScheduler_Worker-2] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:37,756 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Error removing preferences org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /usr/share/apache-tomcat-7.0.61/webapps/apollo.war has finished in 30,801 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager has finished in 116 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples has finished in 226 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs has finished in 59 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager has finished in 69 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT has finished in 138 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples has finished in 249 ms
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 02, 2017 12:35:40 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 31757 ms
2017-05-02 12:35:42,625 [ajp-bio-8009-exec-5] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,643 [ajp-bio-8009-exec-7] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,644 [ajp-bio-8009-exec-7] ERROR apollo.UserController  - org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,804 [ajp-bio-8009-exec-5] ERROR errors.GrailsExceptionResolver  - MySQLSyntaxErrorException occurred when processing request: [POST] /apollo/sequence/getSequences/
Unknown column 'this_.date_created' in 'field list'. Stacktrace follows:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2313)
        at org.grails.datastore.gorm.GormStaticApi.methodMissing(GormStaticApi.groovy:105)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismPreference(PreferenceService.groovy:163)
        at org.bbop.apollo.PreferenceService.$tt__getOrganismFromPreferences(PreferenceService.groovy:252)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismForCurrentUser(PreferenceService.groovy:16)
        at org.bbop.apollo.SequenceController.$tt__getSequences(SequenceController.groovy:185)
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)





Any idea? I could use a database backup.
Thank for your help,

Miquel




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.





--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia



--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unknown column 'this_.date_created' in 'field list'

nathandunn

Glad that worked. 

It should clear out those preferences the following day.  However, it wouldn’t hurt to restart mysql in the interim if there are locked transactions as it looks like the database might be in a weird state.  

Nathan

On May 2, 2017, at 9:21 PM, miquel <[hidden email]> wrote:

Hi Deepak,

After edit CleanupPreferencesJob.groovy and clean the preference table, first I found some errors on catalina.out:

2017-05-03 09:15:03,935 [ajp-bio-8009-exec-5] ERROR spi.SqlExceptionHelper  - Deadlock found when trying to get lock; try restarting transaction
2017-05-03 09:15:03,946 [ajp-bio-8009-exec-7] ERROR spi.SqlExceptionHelper  - Deadlock found when trying to get lock; try restarting transaction
2017-05-03 09:15:03,946 [ajp-bio-8009-exec-1] ERROR spi.SqlExceptionHelper  - Deadlock found when trying to get lock; try restarting transaction
2017-05-03 09:15:03,976 [ajp-bio-8009-exec-7] ERROR apollo.AnnotatorController  - Hibernate operation: could not execute statement; SQL [n/a]; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
org.springframework.dao.DeadlockLoserDataAccessException: Hibernate operation: could not execute statement; SQL [n/a]; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction
        at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:263)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
        at org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateTemplate.convertJdbcAccessException(GrailsHibernateTemplate.java:613


But, without change anything, now I can log into apollo and everything looks like is working properly. The previous error doesn't appear anymore in the logs.

Sometimes appear these warnings:

2017-05-03 11:02:20,863 [ajp-bio-8009-exec-10] WARN  apollo.PreferenceService  - Multiple preferences found: 8
2017-05-03 11:02:20,879 [ajp-bio-8009-exec-10] INFO  apollo.UserController  - updateTrackListPreference
2017-05-03 11:02:20,882 [ajp-bio-8009-exec-10] INFO  apollo.UserController  - Added userOrganismPreference false
2017-05-03 11:02:21,039 [ajp-bio-8009-exec-2] WARN  apollo.PreferenceService  - Multiple preferences found: 8
2017-05-03 11:02:21,315 [ajp-bio-8009-exec-7] WARN  apollo.PreferenceService  - Multiple preferences found: 8


Thanks for your help!

Miquel


On 2017年05月03日 07:39, Deepak Unni wrote:
Hi Miquel,

Here are a few additional solutions (assuming the previous fixes don't work).

Before making any changes listed below, stop the Apollo instance.

1. Clean the preference table by removing all entries in the preference table.

delete from preference

Then start Apollo.

2. Edit entries with null values in the preference table: this manually fixes any entry in the preference table that has null value for column 'date_created'.

update preference set date_created = '<some old date>' where date_created = null;

Then start Apollo.

3. Alter preference table to allow for column 'date_created' to hold null values.

ALTER TABLE preference MODIFY date_created TIMESTAMP null;

Then start Apollo.



Hope this helps!

Cheers,

Deepak



On Tue, May 2, 2017 at 5:05 PM, Deepak Unni <[hidden email]> wrote:
Hi Miquel,

Here is a patch that attempts to fix this issue. 

Edit the grails-app/jobs/org/bbop/apollo/CleanupPreferencesJob.groovy and add the following to Line 10:

simple repeatInterval: 24 * 60 * 60 * 1000l ,startDelay: 5 * 60 * 1000l // execute job once a day, delays 5 minutes

This patch is also part of Apollo master branch.


Also, be sure to restart your MySQL database as well.


Cheers,

Deepak

On Tue, May 2, 2017 at 1:14 AM, miquel <[hidden email]> wrote:
Hi apollo-users,

After upgrade mysql from 5.1 to 5.7.17 version, I can not login to apollo. It is stuck on "Loading" pop-up window and catalina.out contains:

2017-05-02 12:35:31,159 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column date_created datetime not null
2017-05-02 12:35:31,160 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'date_created' at row 1
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - HHH000388: Unsuccessful: alter table preference add column last_updated datetime not null
2017-05-02 12:35:31,166 [localhost-startStop-1] ERROR hbm2ddl.SchemaUpdate  - Data truncation: Incorrect datetime value: '0000-00-00 00:00:00' for column 'last_updated' at row 1
Starting Quartz Scheduler in QuartzFactoryBean
2017-05-02 12:35:37,673 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Removing stale preferences
2017-05-02 12:35:37,754 [DefaultPluginScheduler_Worker-2] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:37,756 [DefaultPluginScheduler_Worker-2] ERROR apollo.PreferenceService  - Error removing preferences org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /usr/share/apache-tomcat-7.0.61/webapps/apollo.war has finished in 30,801 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/host-manager has finished in 116 ms
May 02, 2017 12:35:39 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/examples has finished in 226 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/docs has finished in 59 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/manager has finished in 69 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/ROOT has finished in 138 ms
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples
May 02, 2017 12:35:40 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /usr/share/apache-tomcat-7.0.61/webapps/jsp-examples has finished in 249 ms
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
May 02, 2017 12:35:40 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
May 02, 2017 12:35:40 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 31757 ms
2017-05-02 12:35:42,625 [ajp-bio-8009-exec-5] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,643 [ajp-bio-8009-exec-7] ERROR spi.SqlExceptionHelper  - Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,644 [ajp-bio-8009-exec-7] ERROR apollo.UserController  - org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: could not extract ResultSet; bad SQL grammar [n/a]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
2017-05-02 12:35:42,804 [ajp-bio-8009-exec-5] ERROR errors.GrailsExceptionResolver  - MySQLSyntaxErrorException occurred when processing request: [POST] /apollo/sequence/getSequences/
Unknown column 'this_.date_created' in 'field list'. Stacktrace follows:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.date_created' in 'field list'
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4237)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2834)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2313)
        at org.grails.datastore.gorm.GormStaticApi.methodMissing(GormStaticApi.groovy:105)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismPreference(PreferenceService.groovy:163)
        at org.bbop.apollo.PreferenceService.$tt__getOrganismFromPreferences(PreferenceService.groovy:252)
        at org.bbop.apollo.PreferenceService.$tt__getCurrentOrganismForCurrentUser(PreferenceService.groovy:16)
        at org.bbop.apollo.SequenceController.$tt__getSequences(SequenceController.groovy:185)
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)





Any idea? I could use a database backup.
Thank for your help,

Miquel




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.





--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia



--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia



This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank. 





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Loading...