-
Notifications
You must be signed in to change notification settings - Fork 0
Home
The goal of this software is to create a minimal tool for producing visualizations of circular genomes in javascript.
The Wishart lab has CGView http://wishart.biology.ualberta.ca/cgview/index.html Gavin Conant and Ken Wolfe have GenomeVx http://wolfe.ucd.ie/GenomeVx/ There is the Jena Prokaryotic Genome Viewer http://jpgv.fli-leibniz.de/cgi/index.pl Sanger has DNAPlotter http://www.sanger.ac.uk/resources/software/dnaplotter/ The Center for Biological Sequence Analysis has GeneWiz http://www.cbs.dtu.dk/services/gwBrowser/ ...and I'm sure there are others that I am leaving out.
The problem that I have is that these softwares are all either written in server-side languages or it is difficult to track down the source-code. They all have a huge number of features, which makes them profoundly powerful. My own personal need for this software required a much less powerful version that could produce circular genomes with a minimal api in javascript.
Right now the software can take a .gff file and draw a genome onto a canvas in html. The api is minimal, asking which features to plot. Because it currently interfaces with the file-system, it can be used with Safari and Firefox, but not with Chrome. This can be fixed, but requires the user to use the file reader. Alternatively a Ruby/Perl/Python cgi script should be able to call a database of JSON objects from a database that interact with the circleGenome JS api.
- Adding the option for labeling the blocks
- Inner circle blocks
- Outer circle blocks
- Arrow Glyphs
- User specified color options for features
Rather than specify the color scheme or requiring the user to provide color designations, it uses PleaseJS which creates a random color scheme. I modified Please.js to allow the randomizer to be seeded, to allow reproducible color schemes. It uses the really crude PRNG:
var x = Math.sin(seed++) * 10000;
return x - Math.floor(x);
from http://stackoverflow.com/questions/521295/javascript-random-seeds/19303725#19303725 as pointed out in http://jsfiddle.net/bhrLT/17/ this PRNG is no good for crypto, or sensitive applications as it is biased toward 0 and 1 and every 355 values are correlated. But for this application it's quick and repeatable and it's biases are easy to understand. What's more, I'm not wild about how JS handles random number generation in the first place. If you'd like better RNGs consult George Marsaglia, implement a [Linear Congruential Generator] (http://en.wikipedia.org/wiki/Linear_congruential_generator), [Mersenne Twister] (http://en.wikipedia.org/wiki/Mersenne_twister) or look into a Cryptographically secure pseudorandom number generators.