def __iadd__(self, targetIval):
        'save an alignment edge between self and targetIval'
        if self.is_lpo: # assign to correct LPO(s)
            if isinstance(targetIval, types.SliceType):
                raise ValueError('you attempted to map LPO --> LPO?!?')
            self.ns.nlmsaLetters.__iadd__(targetIval)
            splitList = splitLPOintervals(self.ns.nlmsaLetters.lpoList,
                                          slice(self.start, self.stop),
                                          targetIval)
            for ns, src, target in splitList:
                # Save intervals to respective LPOs; LPO --> target
                ns[src] = self.ns.nlmsaLetters.seqs.getIDcoords(target)
                if self.ns.nlmsaLetters.is_bidirectional:
                    nsu, myslice = self.ns.nlmsaLetters.seqs \
                            .getUnionSlice(target)
                    # Save target --> LPO
                    nsu[myslice] = (ns.id, src.start, src.stop)
        else:
            if isinstance(targetIval, types.SliceType): # target is LPO
                splitList = splitLPOintervals(self.ns.nlmsaLetters.lpoList,
                                            targetIval, self.seq)
                for ns, target, src in splitList:
                    self.ns[self.offsetSlice(src)] = (ns.id, target.start,
                                                      target.stop)
                    if self.ns.nlmsaLetters.is_bidirectional:
                        # Save LPO --> SRC
                        ns[target]=(self.id, src.start, src.stop)
            else: # both src and target are normal seqs.  use_virtual_lpo!!
                self.ns.nlmsaLetters.__iadd__(targetIval)
                self.ns.nlmsaLetters.init_pairwise_mode()
                # Our virtual LPO
                ns_lpo = self.ns.nlmsaLetters.seqlist[self.ns.id % 1]
                # Save src --> target
                ns_lpo[self.offsetSlice(self.seq)] = self.ns.nlmsaLetters \
                        .seqs.getIDcoords(targetIval)
                if self.ns.nlmsaLetters.is_bidirectional:
                    nsu, myslice = self.ns.nlmsaLetters.seqs \
                            .getUnionSlice(targetIval)
                    # Our virtual LPO
                    ns_lpo = self.ns.nlmsaLetters.seqlist[nsu.id - 1]
                    # Save target --> src
                    ns_lpo[myslice] = (self.id, self.start, self.stop)
        return self # iadd must always return self
dataset/ETHPy150Open cjlee112/pygr/pygr/nlmsa_utils.py/BuildMSASlice.__iadd__/operator `-` -> `%`