SuffixTree JS is a javascript implementation of Ukkonen's algorithm for "generalized suffix tree". The code is essentially based on the snippets provided here : http://www.allisons.org/ll/AlgDS/Tree/Suffix/.
This is intended for CS students or anyone who want to build a generalized suffix tree in an intuitive and easy way.
You can enter your sequences and build your tree here : https://maclandrol.github.io/SuffixTreeJS/
The visualization is done using d3js.
####Important points:
- Your sequences should be separated by a coma (","). A space is considered as an actual character so don't put spaces between your sequences.
- The following characters are special chars used to denote the end of a sequence :
#$&%@?+*
- Each internal node can be collapsed.
- The suffix on each leaf end with
[start, number]
wherestart
is the position of the suffix (starting at 0) andnumber
is the sequence number of the sequence the suffix is from. I also use different colors for each sequence in the representation. - There is a maximum of 12 sequences allowed (since the color palette used has only 12 colors).
Check the gh-pages branch if you're interested in the visualization part. The theme used is Solo. I'm open to any suggestions and pull requests are welcome.
This is licensed under the MIT License