← Back to blog

SuffixTreeJS

February 20, 2016

javascriptalgorithms

Ukkonen's Algorithm for generalized suffix tree in javascript, using d3js for visualization: SuffixTreeJS

This post will be short.

Last year, I was a teaching assistant for a course about "Algorithms in Bioinformatics". Some of the students asked me for a javascript code to build generalized suffix trees in order to practice. After a not-so-extensive search, I only found this: http://visualgo.net/suffixtree.html, which does not build a generalized suffix tree.

As lazy as I was, I just made this using Word Trees from Google chart and sent it to them. Fast forward a couple of days ago, I found this snippet on d3js website: Interactive d3.js tree diagram and thought it could be used to build a small interactive generalized suffix tree viewer, and here it is: SuffixTreeJS.

It does the job but it can still be improved, so suggestions are welcome.