igvteam / igv.js

Embeddable genomic visualization component based on the Integrative Genomics Viewer
MIT License
641 stars 226 forks source link

'Height' in track's option doesn't work #243

Closed desnar closed 8 years ago

desnar commented 8 years ago

Hi, The height property doesn't work. I need to change the height by set the 'set track height' after opening.

jrobinso commented 8 years ago

Hi, could you elaborate on what doesn't work, with some example code? What exactly are you trying to do? There is no "set track height" API function.

desnar commented 8 years ago

For the options controlling the igv in html's javascript, the height property in a track can't work, though I set autoheight to false. The only way for me to set the height of a track is using the button on the right of the track after displaying in the browser. Thanks.

jrobinso commented 8 years ago

Could you post your html, or just the configuration options object, so we can reproduce the problem?

jrobinso commented 8 years ago

Also are you pulling code from git, or using a released or beta version? If so which version? In general please be more descriptive of issues when you post them. Including example code or html illustrating what is failing is helpful. We can't act on "doesn't work".

desnar commented 8 years ago

I'm sorry to post the example so late... I see height info in 'https://github.com/igvteam/igv.js/wiki/Tracks, 1) Options for all track types' and I set this property in bam.html (https://github.com/igvteam/igv.js/blob/master/examples/bam.html) image When I run this html in my apache server, it's still the default height. image The right button on the bam track can work when i use 'set track height' to 200 image

jrobinso commented 8 years ago

I just checked in a change to turn autoHeight off if height is set. This will be in the nightly "beta" url build, or you can pull from source.

However this also works with the current release. Note autoHeight is case sensitive. This is an error in our documentation. { url: 'https://data.broadinstitute.org/igvdata/BodyMap/hg19/IlluminaHiSeq2000_BodySites/brain_merged/accepted_hits.bam', name: 'Brain (BodyMap)', height: 200, autoHeight: false }

desnar commented 8 years ago

It seems work for bam but not for wig-bedgraph format? image image

jrobinso commented 8 years ago

This should be fixed now for bed and wig. Apologies for that.

skycolloredo commented 3 years ago

Hi Jim, I am having a similar issue with seg files. When I set the height in the track configuration in the way demonstrated above, it the heatmap track height remains very short. Is there a way to adjust the height of heatmap tracks? Thanks! Sky

turner commented 3 years ago

I am unable to reproduce this. Here is the config I use:

        const config =
            {
                genome: "hg19",
                locus: 'myc',
                tracks:
                    [
                        {
                            name: "SEG Track",
                            url: "https://data.broadinstitute.org/igvdata/test/igv-web/segmented_data_080520.seg.gz",
                            indexed: false,
                            isLog: true,
                            displayMode: 'EXPANDED',
                            expandedRowHeight: 20,
                            height: 666
                        }
                    ]
            };

And here is the result:

Screen Shot 2021-03-09 at 2 44 38 PM

skycolloredo commented 3 years ago

Hi Turner, My problem was I was using height when the relevant property was expandedRowHeight. Adjusting that fixed things. Thanks! Sky