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
464 stars 199 forks source link

Bigwig XYplot #1592

Closed demis001 closed 3 years ago

demis001 commented 3 years ago

I am trying to generate XY scatter plot from the wiggle file (not the bar). I read it only support bigwig format instead of standard wig format. I converted the file to bigwig and it seems the data looks right after I view the binary bw file.

The score column is -log10(p-value) and want to generate the XY scatter plot, would you please someone tell me how to increase the radius of the dot?

data:

rooster@demis001: cgpBigWig/bin/bwcat -i UNC_cis-eQTL_v2.bed.bw | more

chr1    993081  993082  4.044312
chr1    1002397 1002398 3.640165
chr1    1006911 1006912 3.882729
chr1    1007513 1007514 3.995679
chr1    1009569 1009570 3.838632
chr1    1009637 1009638 3.876148
chr1    1009853 1009854 3.841638
chr1    1015218 1015219 3.602060
chr1    1015347 1015348 3.602060
chr1    1016362 1016363 3.588380
chr1    1017181 1017182 3.563837
chr1    1018364 1018365 3.638272
chr1    1018527 1018528 3.636388
chr1    1018685 1018686 3.557520
chr1    1021584 1021585 3.665546
chr1    1021724 1021725 3.823909
chr1    1021790 1021791 3.616185
chr1    1022187 1022188 3.638272
chr1    1027145 1027146 3.548214
chr1    1027559 1027560 3.548214
chr1    1038478 1038479 3.551294
chr1    1039329 1039330 3.524329
chr1    1040400 1040401 3.530178
chr1    1041582 1041583 3.567031
chr1    1041839 1041840 4.155523
chr1    1044509 1044510 3.551294

The plotted data shown in this figure are identical, but the scatter plot shifted to the left, I don't know why this happened, any idea?

scatter_plot

Here is the conf file:

{
         "maxFeatureScreenDensity": 6,
         "label"         : "UNC_cis_eQTL_xyplot",
         "key"           : "UNC cis XYPlot",
         "storeClass"    : "JBrowse/Store/SeqFeature/BigWig",
         "urlTemplate"   : "../../raw/liver/UNC_cis-eQTL_v2.bed.bw",
         "type"          : "JBrowse/View/Track/Wiggle/XYPlot",
         "variance_band" : false,
         "scale" : "linear",
         "yScalePosition" : "center",
         "min_score"     : 0,
         "max_score" : 20,
         "noFill" : true,
         "style": {
             "pos_color"         : "#FFA600",
             "neg_color"         : "#005EFF",
             "clip_marker_color" : "red",
             "height"            : 100
         }
      }
cmdcolin commented 3 years ago

The score column is -log10(p-value) and want to generate the XY scatter plot, would you please someone tell me how to increase the radius of the dot?

Currently there is no option to do so

The plotted data shown in this figure are identical, but the scatter plot shifted to the left, I don't know why this happened, any idea?

Not clear what the issue there is, if you have sample data to share it may help (data for both tracks would probably be needed)...

demis001 commented 3 years ago

@cmdcolin

It seems jbrowse support to display these data as scatter plot, would you please tell me what feature these people used to display the eQTL data if you able to guess it? I can see they used jbrowse and even plotted the dot as square. I am trying to plot similar data.

https://www.hgvd.genome.med.kyoto-u.ac.jp/pub/jbrowse_index.html?loc=chr2&tracks=DNA%2CGenes%2Cfrequency_org_all%2Cfreq_org_count_allcall%2Cfreq_org_depth_max250_allcall%2Ceqtl_Type10_1E-5_MIN_all_10%2Ceqtl_Type12_1E-5_MIN_all_12

Dereje

demis001 commented 3 years ago

Seems they have used jbrowse2, just checked it

cmdcolin commented 3 years ago

they actually use jbrowse 1 with a custom plugin, I am not sure if the source code for the plugin is available but you could contact the authors perhaps

demis001 commented 3 years ago

Sure do if get their contact email. One more question. How to resize the left side bar (window with available tracks)?

screen_shot_01

cmdcolin commented 3 years ago

currently it is hardcoded and can't be resized unfortunately, as far as i know...

cmdcolin commented 3 years ago

a custom build of jbrowse could accomplish it if you consider that as an option

demis001 commented 3 years ago

If you tell me the js file where this property was coded, I will change it to adjust to my flavor . I though, it would be doable using the jbrowse.conf file.

cmdcolin commented 3 years ago

@demis001 See src/JBrowse/View/TrackList/Hierarchical.js

style width: 25% is the hardcoded value

See https://jbrowse.org/docs/faq.html#how-do-i-run-the-code-using-the-github-clone for how to run jbrowse from a github clone

Basically, you want to use

git clone https://github.com/gmod/jbrowse
cd jbrowse
yarn
.... modify file ...
yarn build or ./setup.sh

Then you can copy your entire github clone to your /var/www/html or you can make a smaller release bundle using make -f build/Makefile release-min

demis001 commented 3 years ago

Thanks! That is what I am looking!!

cmdcolin commented 3 years ago

maybe can close for now if no action items :)