当前位置: 首页>>代码示例>>Python>>正文


Python GenomeInfo.getExtendedChrList方法代码示例

本文整理汇总了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
开发者ID:Anderrb,项目名称:Dynamic-benchmark,代码行数:27,代码来源:BoundingRegionUserBinSource.py

示例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 = []
开发者ID:Anderrb,项目名称:Dynamic-benchmark,代码行数:10,代码来源:TrackGenomeElementSource.py

示例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
开发者ID:Anderrb,项目名称:Dynamic-benchmark,代码行数:8,代码来源:BoundingRegionUserBinSource.py


注:本文中的quick.util.GenomeInfo.GenomeInfo.getExtendedChrList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。