ssadedin / ximmer

Ximmer is a system for CNV calling on exome and targeted genomic sequencing
http://ssadedin.github.io/ximmer/
GNU Lesser General Public License v2.1
19 stars 10 forks source link

Empty diagram for CNV without gene annotation #22

Open pixuenan opened 5 years ago

pixuenan commented 5 years ago

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.