def __init__(self, filename_junctions, *args, **kwargs):
        BaseAnnotator.__init__(self, *args, **kwargs)

        junctions = IndexedGenome.IndexedGenome()

        infile = open(filename_junctions, "r")
        njunctions = 0

        for line in infile:
            if line.startswith("#"):
                continue
            data = line[:-1].split("\t")
            if data[0] == "contig":
                continue
            # end, start are the positions of the last base of the codon
            # 5' of the intron and first base of codon 3' of the intron.
            contig, strand, end, start, frame, gene_id, transcript_id = data
            start, end, frame = int(start), int(end), int(frame)
            # convert to intron coordinates
            intron_start, intron_end = end + 1, start
            # convert to positive strand coordinates
            if strand == "-":
                lcontig = self.mFasta.getLength(contig)
                intron_start, intron_end = lcontig - \
                    intron_end, lcontig - intron_start
            junctions.add(contig, intron_start, intron_start + self.mSize,
                          (strand, intron_start, intron_end, gene_id, transcript_id))
            junctions.add(contig, intron_end - self.mSize, intron_end,
                          (strand, intron_start, intron_end, gene_id, transcript_id))
            njunctions += 1
        infile.close()

        self.mJunctions = junctions

        E.info("read and indexed %i junctions for %i contigs" %
               (njunctions, len(junctions)))
dataset/ETHPy150Open CGATOxford/cgat/scripts/snp2table.py/BaseAnnotatorSpliceSites.__init__/original