-
-
Notifications
You must be signed in to change notification settings - Fork 119
Description
We (KWS SAAT SE & Co. KGaA) like your Sequenceserver very much. Unfortunately, we have several hundreds of blast databases. Using the default Sequenceserver list does not work for us.
This was the reason why I tried to implement jstree (https://www.jstree.com) and a data/folder structure to group the databases.
Because some/many of the databases might belong to different groups, we have a raw data folder where all files are located in and a Sequence server data folder with many subfolders that only include symbolic links.
To explain everything, I created a new example data structure including some randomly selected databases.
The raw_data folder including the fasta and blast files:

The data folder used by the Sequenceserver only includes symbolic links:

The resulting tree shown in the Sequenceserver mimics 1:1 the folder structure. This makes it easy for everyone to define their specific tree structure. Furthermore, it is possible to use the search field next to e.g. ‘Nucleotide databases’:

I forked your project and created a new branch ‘tree’. See https://github.com/bjoern-hammesfahr/sequenceserver/tree/tree
Unfortunately, I do not know React and my time was limited. Furthermore, I did not want to introduce to many changes, therefore I hide your database list and simulate a selection when a db gets selected in the tree.
Maybe this idea is helpful for you and it would be possible to implement it to the Sequenceserver.
My changes:
- package.json: add
jstree(line 35) - public/config.json: add
jstree(line 30) - public/vendor: automatically changed?
- public/js/search.js
- add
jstree(line 4) - add key
treetogetInitialState(line 210) - add
data['tree']tosetStage(line 230) - add timeout that clicks the hstree:div after 1s (line 241:244)
- add
tree={this.state.tree}toDatabases(line 344) - add function
handleLoadTreeto load the tree (line 687:729) - add id
database_listto divpanel panel-default(line 770) - add
this.renderDatabaseSearch(category)to add the nucleotide/protein searches (line 773:775) - hide the
button(line 776) and theul(line 781) because of time and to reduce the number of changes - add
this.renderDatabaseTree(category)to add the nucleotide/protein trees (line 793:795) - add function
renderDatabaseSearchto render the search (line 800:814) - add function
renderDatabaseTreeto render the tree (line 816:833)
- add
- public/css/sequenceserver.css: add
jstree(line 8) - lib/sequenceserver/database.rb
- add
categoriestoDatabasestucture (line 22) - add method
treeto prepare the tree data (line 105:125) determine_formatted_fastas: changeline.split(' ')toline.split("\t"), because this did not work for us (line 122)determine_formatted_fastas: addget_categories(line 124)- add method
get_categoriesto get the category for each fasta db (line 281:285)
- add
- lib/sequenceserver/routes.rb: add
treeto searchdata.json (line 79)
