igvteam/igv.js

Merged track not working properly with negative values

poxon opened this issue · 0 comments

poxon commented

Hello IGV team!

Aim
Show coverage tracks for forward and reverse strands by loading in two bigwig files.

Issue
When using two bigwig files one with positive values and another one with negative values as tracks for a merged track the autoscaling does not work i.e. it does not show the negative part of it.

Screenshot 2024-01-30 at 20 02 55
{
                        name: "Merged",
                        type: "merged",
                        tracks: [
                        {
                                type: "wig",
                                format: "bigwig",
                                url: "url",
                                altColor: "rgba(150, 150, 230, 0.75)"
                            },
                            {
                                type: "wig",
                                format: "bigwig",
                                url: "url",
                                color: "rgba(230, 150, 150, 0.75)"
                            }
                        ]
                    }

When I add the actual min and max (-96, and 63) the values on the Y axis are not shown at all and there is a JS error:

Screenshot 2024-01-30 at 20 05 37

paintAxis.js:60 Uncaught (in promise) TypeError: e.toFixed is not a function
at u (paintAxis.js:60:27)
at Bf.lu [as paintAxis] (paintAxis.js:39:31)
at Ef.paintAxis (trackView.js:833:24)
at Ef.adjustTrackHeight (trackView.js:533:18)
at Ef.updateViews (trackView.js:451:14)

Thanks a lot in advance!

Edit: I am using:
import igv from "https://cdn.jsdelivr.net/npm/igv@2.15.11/dist/igv.esm.min.js"