GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
463 stars 199 forks source link

help for adding file support and track display #581

Closed ghost closed 9 years ago

ghost commented 9 years ago

image 1.because of positive and negetive number are exist at one site, i use two tracks to display it.now i want to bring this two tracks together. 2.i would like to customize the track to make a different display type when zoom in.(Like gff3 file, when zoom in it shows the gene) by reading http://gmod.org/wiki/JBrowse_Configuration_Guide i know maybe i should write a plogin have been learning dojo for a long time,still don't know how to do that so where could i modify the bigwig file display type or a demo would be great.

cmdcolin commented 9 years ago
  1. I am not sure if this can be done currently. I think it would be a great idea though. I think the idea of having "subtracks", i.e. two different files in one track, is one that has been highly requested. The Combination tracks isn't capable of combining tracks without using an arithmatic operation, but the idea to just have them displayed together has been suggested before (similar to http://gmod.827538.n3.nabble.com/Gmod-ajax-stacked-tracks-td4048258.html)
  2. CanvasFeatures tracks and Alignments2 have at least part of the functionality built in (e.g. bigwig when zoomed out, gff3/alignments features when zoomed in). See http://gmod.org/wiki/JBrowse_Configuration_Guide#Configuring_Summary_Histograms If I remember correctly, the summary histogram bigwig is less fully featured than a normal BigWig track though, so I don't think it can do as fancy of a display as how you describe it. The BAM track here uses the summary histogram bigwig track as an example http://jbrowse.org/code/JBrowse-1.11.6/?loc=ctgA%3A9907..32102&tracks=volvox-sorted_bam&data=sample_data%2Fjson%2Fvolvox&highlight=&tracklist=1&nav=1&overview=1
ghost commented 9 years ago

First of all, thanks for your answer to my question.

2.i find a similar track in http://tools.genxpro.net/apadb/browser/hg19/?loc=chr1%3A61502241..63293800&tracks=DNA%2CpolyaDb&highlight= which is histogram when zoomed out, position with arrowhead when zoomed in. i see the track configuration and find that the urlTemplate is trackData.json by reading http://gmod.org/wiki/JBrowse_Configuration_Guide#Lazy_Nested-Containment_Lists_.28LazyNCList.29 , the format of trackData.json is too complex for me. so is there any perl script to transfer the format directly? i have bedgraph format file like this image and also have bigwig format file

cmdcolin commented 9 years ago

Technically the types of histograms that are shown on that browser that you linked to are auto-generated when you run flatfile-to-json.pl. The thing that I was talking about is for when you want a custom BigWig histogram (often used on BAM files for coverage, because BAM files don't have a preprocessing step). You can still use a custom bigwig if you want, but the histograms should be autogenerated if you are using flatfile-to-json.pl

Note: If you are finding that your histograms are not being displayed automatically, you can try adding "maxFeatureScreenDensity" or "featureScale" settings to your track in trackList.json. If you make featureScale something like 0.1, then it will draw the histograms until your zoom level is much closer to the "base level" (the units for the featureScale is "pixels per basepair")

ghost commented 9 years ago

really really thank u, it helps me a lot. i have been successfully create the track that i need. help me close the issue, i couldn't find where to do that.

cmdcolin commented 9 years ago

Glad I can be of help and that it worked for you :)