def __init__(self, msaSlice, targetPath, sourcePath=None,
                 matchIntervals=False):
        self.msaSlice = msaSlice
        self.targetPath = targetPath
        if sourcePath is not None:
            self.sourcePath = sourcePath
            self.matchIntervals = matchIntervals
        else: # NEED TO REVERSE-MAP targetPath TO FIND sourcePath
            # Mask to targetPath.
            si = msaSlice.groupByIntervals(filterList = [targetPath],
                                           mergeAll=True)
            l = msaSlice.groupBySequences(si)
            try:
                self.sourcePath = l[0][0]
            except __HOLE__:
                raise KeyError('target interval not in msaSlice!')
            self.matchIntervals = l[0][2]
dataset/ETHPy150Open cjlee112/pygr/pygr/sequence.py/Seq2SeqEdge.__init__