lidaof / eg-react

WashU Epigenome Browser
https://epigenomegateway.wustl.edu
Other
66 stars 30 forks source link

Height of Hi-C tracks? #221

Closed gitgitmonkey closed 2 years ago

gitgitmonkey commented 2 years ago

How can I decrease the height of Hi-C arcs in the new browser to a height similar to the legacy browser? In the new browser, the Hi-C tracks are too high, they take up almost the whole screen in a laptop. I know I can decrease the track height, but then the arcs are cut off. In the legacy browser, the arcs are re-scaled to fit the track height. Thank you!

lidaof commented 2 years ago

Hi @gitgitmonkey that's right, I will add that option and update you. Thank you!

lidaof commented 2 years ago

Hi @gitgitmonkey, sorry for the delay, I was struggled a while with the geometry :) The old browser show heatmap style adjusted with track height. I have tried to implement in both heatmap and arc, with the new option in the screenshot below..I have tested seems it's working, feel free to let me know if there is any issue you may find. Thank a lot.

image

gitgitmonkey commented 2 years ago

I apologize for the super late reply! I went out on vacation and missed Github's email with your reply. I don't see this option "Scale with height" at http://epigenomegateway.wustl.edu/browser/ Will it only be available for local installations of the browser? Thank you.

lidaof commented 2 years ago

no worries @gitgitmonkey . possible your computer cached old files, can you try hard reload please https://eg.readthedocs.io/en/latest/faq.html#hard-reload? let me know if problem still there. Thank you!

gitgitmonkey commented 2 years ago

I did a hard reload and still can't see the option. I am loading a longinteract file.

lidaof commented 2 years ago

@gitgitmonkey you are right, sorry! my bad. I applied to long range tracks now. should be able to see it after refresh.

gitgitmonkey commented 2 years ago

Thanks, I can see it now and it works! Is the .json option to scale "clampHeight":true? I am setting it in a .json session file loaded remotely but I can't make it scale with height and only show interactions that have both ends in the window ("bothAnchorsInView":true).

lidaof commented 2 years ago

yes, you are right, you can use clampHeight in the options and set it to true. would you mind share your json file? you can send it to me directly and I can test for you...as I tested my side it works with this example hub (partially copied):

{
        "name": "Broad/MIT/UMass K562 Hi-C (100kb pearson correlation)",
        "type": "longrange",
        "label": "Broad/MIT/UMass K562 Hi-C (100kb pearson correlation)",
        "options":
        {
            "height": 500,
            "label": "Broad/MIT/UMass K562 Hi-C (100kb pearson correlation)",
            "bothAnchorsInView": true,
            "clampHeight": true,
            "fetchViewWindowOnly": true
        },
        "url": "https://egg.wustl.edu/d/hg19/K562_pearson_100kb.gz"
}
gitgitmonkey commented 2 years ago

I forgot to put these options inside "options":, it's working now! Thanks a lot!