示例#1
0
    def isMemoBin(region):
        if not IS_EXPERIMENTAL_INSTALLATION:
            return CompBinManager.isCompBin(region)

        if CompBinManager.ALLOW_COMP_BIN_SPLITTING:
            isCompBin = CompBinManager.isCompBin(region)
            return isCompBin
        else:
            isChr = not hasattr(region, '__iter__') and any([region.chr, region.start, region.end] == [r.chr, r.start, r.end] \
                                                            for r in GenomeInfo.getChrRegs(region.genome))
            isChrArm = not hasattr(region, '__iter__') and any([region.chr, region.start, region.end] == [r.chr, r.start, r.end] \
                                                            for r in GenomeInfo.getChrArmRegs(region.genome))

            return (isChr or isChrArm)
 def getGlobalSource(globalSourceStr, genome, minimal):
     if minimal == True:
         return MinimalBinSource(genome)
     elif globalSourceStr == 'test':
         return UserBinSource('TestGenome:chr21:10000000-15000000','1000000')
     elif globalSourceStr == 'chrs':
         return GenomeInfo.getChrRegs(genome)
     elif globalSourceStr == 'chrarms':
         return GenomeInfo.getChrArmRegs(genome)
     elif globalSourceStr == 'ensembl':
         return GenomeInfo.getStdGeneRegs(genome)
     elif globalSourceStr == 'userbins':
         from gold.application.StatRunner import StatJob
         assert StatJob.USER_BIN_SOURCE is not None
         return StatJob.USER_BIN_SOURCE
         #return kwArgs['userBins']
     else:
         raise ShouldNotOccurError('globalSource not recognized')
 def getGlobalSource(globalSourceStr, genome, minimal):
     if minimal == True:
         return MinimalBinSource(genome)
     elif globalSourceStr == 'test':
         return UserBinSource('TestGenome:chr21:10000000-15000000',
                              '1000000')
     elif globalSourceStr == 'chrs':
         return GenomeInfo.getChrRegs(genome)
     elif globalSourceStr == 'chrarms':
         return GenomeInfo.getChrArmRegs(genome)
     elif globalSourceStr == 'ensembl':
         return GenomeInfo.getStdGeneRegs(genome)
     elif globalSourceStr == 'userbins':
         from gold.application.StatRunner import StatJob
         assert StatJob.USER_BIN_SOURCE is not None
         return StatJob.USER_BIN_SOURCE
         #return kwArgs['userBins']
     else:
         raise ShouldNotOccurError('globalSource not recognized')
示例#4
0
 def _getUserBinSource(self, categoryFilterList, forValidation):
     return GenomeInfo.getChrArmRegs(self._genome, categoryFilterList)