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


Python GenomeInfo.isValidChr方法代码示例

本文整理汇总了Python中quick.util.GenomeInfo.GenomeInfo.isValidChr方法的典型用法代码示例。如果您正苦于以下问题:Python GenomeInfo.isValidChr方法的具体用法?Python GenomeInfo.isValidChr怎么用?Python GenomeInfo.isValidChr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在quick.util.GenomeInfo.GenomeInfo的用法示例。


在下文中一共展示了GenomeInfo.isValidChr方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: isValidTrack

# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import isValidChr [as 别名]
 def isValidTrack(genome, trackName, fullAccess=False):
     if not TrackInfo(genome, trackName).isValid(fullAccess):
         return False
     
     for fn in ProcTrackOptions._getDirContents(genome, trackName):
         if GenomeInfo.isValidChr(genome, fn) or isBoundingRegionFileName(fn):
             return True
     return  False
开发者ID:Anderrb,项目名称:Dynamic-benchmark,代码行数:10,代码来源:ProcTrackOptions.py

示例2: _checkValidStart

# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import isValidChr [as 别名]
 def _checkValidStart(self, chr, start):
     if start < 0:
         raise InvalidFormatError('Error: start position is negative: %s' % start)
 
     if self.genome and \
         GenomeInfo.isValidChr(self.genome, chr) and \
             start > GenomeInfo.getChrLen(self.genome, chr):
                 raise InvalidFormatError('Error: start position is larger than chromosome size (%s) < %d' % \
                                          (GenomeInfo.getChrLen(self.genome, chr), start))
     return start
开发者ID:Anderrb,项目名称:Dynamic-benchmark,代码行数:12,代码来源:GenomeElementSource.py

示例3: getSubtypes

# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import isValidChr [as 别名]
    def getSubtypes(genome, trackName, fullAccess=False):
        dirPath = createDirPath(trackName, genome)
        subtypes = [fn for fn in ProcTrackOptions._getDirContents(genome, trackName) \
                    if not (fn[0] in ['.','_'] or os.path.isfile(dirPath + os.sep + fn) \
                    or GenomeInfo.isValidChr(genome, fn))]

        #fixme, just temporarily:, these dirs should start with _
        subtypes= [x for x in subtypes if not x in ['external','ucsc'] ]
        
        if not fullAccess and not ProcTrackOptions._isLiteratureTrack(genome, trackName):
            subtypes = [x for x in subtypes if not TrackInfo(genome, trackName+[x]).private]

        return sorted(subtypes, key=str.lower)
开发者ID:Anderrb,项目名称:Dynamic-benchmark,代码行数:15,代码来源:ProcTrackOptions.py

示例4: _checkValidEnd

# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import isValidChr [as 别名]
 def _checkValidEnd(self, chr, end, start=None):
     if end < 0:
         raise InvalidFormatError('Error: end position is negative: %s' % end)
     
     if self.genome and \
         GenomeInfo.isValidChr(self.genome, chr) and \
             end-1 > GenomeInfo.getChrLen(self.genome, chr):
                 raise InvalidFormatError('Error: end position is larger than chromosome size (%s)' % \
                                          GenomeInfo.getChrLen(self.genome, chr))
     if start is not None and end <= start:
             raise InvalidFormatError('Error: end position (end-exclusive) is smaller than or equal to start position: %d <= %d' % (end, start))
     
     return end
开发者ID:Anderrb,项目名称:Dynamic-benchmark,代码行数:15,代码来源:GenomeElementSource.py

示例5: _checkValidChr

# 需要导入模块: from quick.util.GenomeInfo import GenomeInfo [as 别名]
# 或者: from quick.util.GenomeInfo.GenomeInfo import isValidChr [as 别名]
 def _checkValidChr(self, chr):
     if self.genome and not GenomeInfo.isValidChr(self.genome, chr):
         raise InvalidFormatWarning('Chromosome incorrectly specified: ' + chr)
     return chr
开发者ID:Anderrb,项目名称:Dynamic-benchmark,代码行数:6,代码来源:GenomeElementSource.py


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