That is brains exploding level of genius. I'm glad I stole the SICER rewrite away from you so you could come up with this :)
Various ideas in random order (the list will probably grow):
1
Making UCSC tracks easy to discover and include would be neat, like for example if you know you want to display all tracks from UCSC from the HaCaT cell line you could easily do it with a regex, like
java asciigenome mytrack.bigwig --ucsc '*hacat*' # displays my track, and some HaCaT ones from UCSC
(You could probably think of a better CLI than the one suggested above.)
Perhaps a UCSC command line track downloader/getter is a good idea on its own?
2
Is it possible to write the "images" to a regular text file? If not, that would be a neat option.
3
Would be nice if the user could supply a gene track and get the distance to to the nearest gene (in each direction) on a line on the bottom together with the names of any genes overlapping with the currently viewed region. If I want to view regions from a TF chip-seq experiment it would be nice to know which genes are close.
4
Can arbitrarily many tracks be viewed? I have a time series experiment with ten timepoints and would love to view some regions with all times on top of each other.
5
It would be great if I could input a file of regions I want displayed and have them all saved in one big pdf/png. After ChIP-Seq experiments I am left with a few hundred regions I want to look more closely at. It would be nice I could just input one file with these regions together with a bigwig/bedgraph and asciigenome
would create one big report that I could scroll through afterwards. It would be nice if asciigenome also could allow the user to give each region included in the report a name and a description like:
# label, organism, assembly, chromosome, start, end, description, upstream, downstream
IL10, human, hg18, chr1, 205007571, 205012462, "involved in immunity", 10000, 1000
PRNP, human, hg18, chr20, 4615157, 4630234, "Prion Protein", 10000, 10000
HSPB4, human, hg18, chr21, 43462210, 43465982, "Heat-shock protein", 10000, 10000
...
See the example report here: http://bioinfoblog.it/2011/12/a-script-to-fetch-images-from-the-ucsc-browser/
Ps. will start to use this tomorrow as I hate GUIs/the mouse.
It is actually a great idea. I prefer to use the terminal rather than opening the browser. Good work!
very cool ! which java library do you use to display on terminal, jcurses ?
Hi Pierre, thanks. I use jline to set up the console and enable some Unix shortcut like autocomplete and UP and DOWN keys to scroll commands. Otherwise colours are rendered simply by wrapping text in ANSI escape codes (see here). Does it answer your question?
Oh, and I got some code from jvarkit (see credits)!
ah, I see, I didn't test your program. As far as I understand what you said It "just" "print" dump the result, there is no interaction like in "samtools tview" (which requires the curses library to "gotoxy" ). Am I right ?
Mmm... There is user interaction in the sense that once ASCIIGenome is started you can navigate around the genome, find stuff etc. But yes, every time a command is issue (say
ff
, move forward), the jline console clears the screen before new text is printed by means of simpleSystem.out.println()
. As far as I can tell, from a user's perspective there is little difference with samtools tview, but under the hood the two programs might be handling things differently. (I'll have a look at jcurses)In your case, using System.out is fine,( furthermore jcurses requires a JNI library)
Fiiiiiinally :D Thank you Dariober! Awesome work!
wow! +100 for this. cool stuff.
Thank you all for positive feedback, at least the idea got good reception. But please, feel free to test it and report bugs, missing features, unclear docs, etc... As I said above, this is still early stages and virtually I am the only one having used it.
I've created a brew formula to install this, however it won't be accepted in homebrew/science because the github repository is not notable enough (<20 forks, <20 watchers and <50 stars). https://github.com/dariober/ASCIIGenome/issues/3
This really is a great viewer I must say!