Forced ASCII sort on tracklist #477

Closed
cmdcolin opened this Issue May 19, 2014 · 2 comments

Comments

Projects
None yet
1 participant
@cmdcolin
Contributor

cmdcolin commented May 19, 2014

From GMOD/Apollo#10

"
I've noticed that our tracks are now displayed as an ASCII sotred list (CAPS first), as opposed to being defined in one of the configuration files. Does anyone know where this can be reset?

If I reset the trackSelector type to Simple, it reverts back to our pre-defined order, but we lose the advantages of the new selector. Is there a way to have the best of both worlds?
"

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin May 19, 2014

Contributor

My response:

"
By default, it sorts things by name and you can't get around that, but if you want to hack the code, you could perhaps remove the sort code and then it will list the tracks in the order that they are defined from the config.
Feel free to open up a feature request on github as well and maybe we can add this into a release.

diff --git a/src/JBrowse/View/TrackList/Hierarchical.js b/src/JBrowse/View/TrackList/Hierarchical.js
index 605a82e..5d27d70 100644
--- a/src/JBrowse/View/TrackList/Hierarchical.js
+++ b/src/JBrowse/View/TrackList/Hierarchical.js
@@ -109,11 +109,7 @@ return declare(
                       //thisB.removeChild( thisB.categories.Uncategorized.pane );
                       thisB.categories.Uncategorized.pane.domNode.style.display = 'none';
                   }   
-              },  
-              sort: [ { attribute: this.get('categoryFacet').toLowerCase()},
-                      { attribute: 'key' },
-                      { attribute: 'label' }
-                    ]   
+              }   
             }); 

"

Something like this could be made into a config option

Contributor

cmdcolin commented May 19, 2014

My response:

"
By default, it sorts things by name and you can't get around that, but if you want to hack the code, you could perhaps remove the sort code and then it will list the tracks in the order that they are defined from the config.
Feel free to open up a feature request on github as well and maybe we can add this into a release.

diff --git a/src/JBrowse/View/TrackList/Hierarchical.js b/src/JBrowse/View/TrackList/Hierarchical.js
index 605a82e..5d27d70 100644
--- a/src/JBrowse/View/TrackList/Hierarchical.js
+++ b/src/JBrowse/View/TrackList/Hierarchical.js
@@ -109,11 +109,7 @@ return declare(
                       //thisB.removeChild( thisB.categories.Uncategorized.pane );
                       thisB.categories.Uncategorized.pane.domNode.style.display = 'none';
                   }   
-              },  
-              sort: [ { attribute: this.get('categoryFacet').toLowerCase()},
-                      { attribute: 'key' },
-                      { attribute: 'label' }
-                    ]   
+              }   
             }); 

"

Something like this could be made into a config option

@cmdcolin cmdcolin added this to the 1.11.5 milestone May 22, 2014

@cmdcolin

This comment has been minimized.

Show comment
Hide comment
@cmdcolin

cmdcolin Jun 12, 2014

Contributor

This was added here 26534ba

Contributor

cmdcolin commented Jun 12, 2014

This was added here 26534ba

@cmdcolin cmdcolin closed this Jun 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment