def getOverlappingStrands(self, idxLow, idxHigh): dummy_strand = Strand(self, idxLow, idxHigh) strand_list = [s for s in self._findOverlappingRanges(dummy_strand)] dummy_strand._strandset = None dummy_strand.setParent(None) dummy_strand.deleteLater() dummy_strand = None return strand_list
def getStrand(self, base_idx): """Returns the strand that overlaps with base_idx.""" dummy_strand = Strand(self, base_idx, base_idx) strand_list = [s for s in self._findOverlappingRanges(dummy_strand)] dummy_strand._strandset = None dummy_strand.setParent(None) dummy_strand.deleteLater() dummy_strand = None return strand_list[0] if len(strand_list) > 0 else None
def hasStrandAt(self, idxLow, idxHigh): """ """ dummy_strand = Strand(self, idxLow, idxHigh) strand_list = [s for s in self._findOverlappingRanges(dummy_strand)] dummy_strand._strandset = None dummy_strand.setParent(None) dummy_strand.deleteLater() dummy_strand = None return len(strand_list) > 0
def hasNoStrandAtOrNoXover(self, idx): dummy_strand = Strand(self, idx, idx) strand_list = [s for s in self._findOverlappingRanges(dummy_strand)] dummy_strand._strandset = None dummy_strand.setParent(None) dummy_strand.deleteLater() dummy_strand = None if len(strand_list) > 0: return False if strand_list[0].hasXoverAt(idx) else True else: return True
def getIndexToInsert(self, idxLow, idxHigh): """ """ can_insert = True dummy_strand = Strand(self, idxLow, idxHigh) if self._couldStrandInsertAtLastIndex(dummy_strand): return can_insert, self._last_strandset_idx is_in_set, overlap, idx = self._findIndexOfRangeFor(dummy_strand) dummy_strand._strandset = None dummy_strand.setParent(None) dummy_strand.deleteLater() dummy_strand = None if overlap: can_insert = False return can_insert, idx