本文整理汇总了Python中cadnano.strand.Strand._strandset方法的典型用法代码示例。如果您正苦于以下问题:Python Strand._strandset方法的具体用法?Python Strand._strandset怎么用?Python Strand._strandset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cadnano.strand.Strand
的用法示例。
在下文中一共展示了Strand._strandset方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getOverlappingStrands
# 需要导入模块: from cadnano.strand import Strand [as 别名]
# 或者: from cadnano.strand.Strand import _strandset [as 别名]
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: getStrand
# 需要导入模块: from cadnano.strand import Strand [as 别名]
# 或者: from cadnano.strand.Strand import _strandset [as 别名]
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: hasStrandAt
# 需要导入模块: from cadnano.strand import Strand [as 别名]
# 或者: from cadnano.strand.Strand import _strandset [as 别名]
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: hasNoStrandAtOrNoXover
# 需要导入模块: from cadnano.strand import Strand [as 别名]
# 或者: from cadnano.strand.Strand import _strandset [as 别名]
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: getIndexToInsert
# 需要导入模块: from cadnano.strand import Strand [as 别名]
# 或者: from cadnano.strand.Strand import _strandset [as 别名]
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