ximmer icon indicating copy to clipboard operation
ximmer copied to clipboard

Empty diagram for CNV without gene annotation

Open pixuenan opened this issue 5 years ago • 0 comments

In the line 137 of script cnv_diagram.js, the code is as following:

var maxTextY = Math.max.apply(null, geneTexts.map(l => l.y)) + characterHeight;

I changed the code to something like following:

if (geneTexts.length > 0){
        var maxTextY = Math.max.apply(null, geneTexts.map(l => l.y)) + characterHeight;
    } else {
        var maxTextY = characterHeight;
    }

Otherwise the CNV without overlaping gene annotation will end up with -Infinity height and empty diagram.

pixuenan avatar Mar 05 '19 09:03 pixuenan