private void getLengths(String bed12Name) throws IOException{
        geneLengths = new HashMap<String, Integer>();
        TextFile bed12 = new TextFile(bed12Name, false);
        String[] els = bed12.readLineElems(TextFile.tab);
        String cur_gene = els[3], lengths = els[10], gene;
        int gene_len;
        while( (els = bed12.readLineElems(TextFile.tab)) != null){
            gene = els[3];
            if (cur_gene.equals(gene)){
                lengths += els[10];
            }
            else{
                gene_len = 0;
                for (String len : lengths.split(","))
                    gene_len += Integer.parseInt(len);
                geneLengths.put(cur_gene, gene_len);
                cur_gene = els[3];
                lengths = els[10];
            }
        }
        bed12.close();
    }