本文整理汇总了Python中quick.util.GenomeInfo.GenomeInfo.getExtendedChrList方法的典型用法代码示例。如果您正苦于以下问题:Python GenomeInfo.getExtendedChrList方法的具体用法?Python GenomeInfo.getExtendedChrList怎么用?Python GenomeInfo.getExtendedChrList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类quick.util.GenomeInfo.GenomeInfo
的用法示例。
在下文中一共展示了GenomeInfo.getExtendedChrList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __iter__
# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import getExtendedChrList [as 别名]
def __iter__(self):
brShelve1 = self._getBoundingRegionShelve(self._trackName1)
brShelve2 = self._getBoundingRegionShelve(self._trackName2)
for chr in GenomeInfo.getExtendedChrList(self.genome):
if brShelve1 is None:
yield GenomeRegion(self.genome, chr, 0, GenomeInfo.getChrLen(self.genome, chr))
else:
brList1 = brShelve1.getAllBoundingRegions(chr)
allBrsAreWholeChrs1 = self._commonAllBoundingRegionsAreWholeChr(brShelve1)
allBrsAreWholeChrs2 = self._commonAllBoundingRegionsAreWholeChr(brShelve2) \
if brShelve2 is not None else False
if brShelve2 is None or \
(allBrsAreWholeChrs2 and not allBrsAreWholeChrs1):
for reg in brList1:
yield reg
else:
brList2 = brShelve2.getAllBoundingRegions(chr)
if allBrsAreWholeChrs1 and not allBrsAreWholeChrs2:
for reg in brList2:
yield reg
else:
for reg in self.getAllIntersectingRegions(self.genome, chr, brList1, brList2):
yield reg
示例2: _removeBoundingRegionTuplesIfFullChrsAndNotFixedGapSize
# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import getExtendedChrList [as 别名]
def _removeBoundingRegionTuplesIfFullChrsAndNotFixedGapSize(self):
if self.getFixedGapSize() == 0 and not self._reprIsDense:
# If only full chromosomes
if all(brt.region.chr in GenomeInfo.getExtendedChrList(self._genome) and \
brt.region.start == 0 and \
brt.region.end == GenomeInfo.getChrLen(self._genome, brt.region.chr) \
for brt in self._boundingRegionTuples):
self._boundingRegionTuples = []
示例3: _commonAllBoundingRegionsAreWholeChr
# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import getExtendedChrList [as 别名]
def _commonAllBoundingRegionsAreWholeChr(self, brShelve):
for chr in GenomeInfo.getExtendedChrList(self.genome):
for reg in brShelve.getAllBoundingRegions(chr):
if not reg.isWholeChr():
return False
return True