예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
 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
예제 #4
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
예제 #5
0
 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