Beispiel #1
0
    def __init__(self,
                 region,
                 track,
                 track2,
                 tail='more',
                 globalSource='',
                 minimal=False,
                 **kwArgs):
        if isIter(region):
            raise SplittableStatNotAvailableError()

        #if minimal == True:
        #    self._globalSource = MinimalBinSource(region.genome)
        #elif globalSource == 'test':
        #    self._globalSource = UserBinSource('TestGenome:chr21:10000000-15000000','1000000')
        #else:
        #    self._globalSource = GlobalBinSource(region.genome)
        self._globalSource = GenericRelativeToGlobalStatUnsplittable.getGlobalSource(
            globalSource, region.genome, minimal)

        assert tail in ['more', 'less', 'different']
        self._tail = tail

        super(self.__class__, self).__init__(region,
                                             track,
                                             track2,
                                             tail=tail,
                                             globalSource=globalSource,
                                             minimal=minimal,
                                             **kwArgs)
    def _init(self,
              rawStatistic=None,
              globalSource='',
              minimal=False,
              **kwArgs):
        if isIter(self._region):
            raise SplittableStatNotAvailableError()

        self._rawStatistic = self.getRawStatisticClass(rawStatistic)
        self._globalSource = GenericRelativeToGlobalStatUnsplittable.getGlobalSource(
            globalSource, self._region.genome, minimal)
Beispiel #3
0
    def _init(self, globalSource='', minimal=False):
        if isIter(self._region):
            raise SplittableStatNotAvailableError()

        if minimal:
            self._globalSource = MinimalBinSource(self._region.genome)
        elif globalSource == 'test':
            self._globalSource = UserBinSource(
                'TestGenome:chr21:10000000-15000000', '1000000')
        else:
            self._globalSource = GlobalBinSource(self._region.genome)
Beispiel #4
0
    def __init__(self, region, track, track2, globalSource='', minimal=False, **kwArgs):
        if isIter(region):
            raise SplittableStatNotAvailableError()

        if minimal == True:
            self._globalSource = MinimalBinSource(region.genome)
        elif globalSource == 'test':
            self._globalSource = UserBinSource('TestGenome:chr21:10000000-15000000','1000000')
        else:
            self._globalSource = GlobalBinSource(region.genome)
        
        super(self.__class__, self).__init__(region, track, track2, globalSource=globalSource, minimal=minimal, **kwArgs)
    def __init__(self,
                 region,
                 track,
                 trackFormatReq=NeutralTrackFormatReq(),
                 **kwArgs):
        if isIter(region):
            raise SplittableStatNotAvailableError()

        super(self.__class__, self).__init__(region,
                                             track,
                                             trackFormatReq=trackFormatReq,
                                             **kwArgs)
        self._track.addFormatReq(trackFormatReq)
    def __init__(self, region, track, track2, tail='more', globalSource='', minimal=False, **kwArgs):
        if isIter(region):
            # TODO: Introduce a better general mechanism for removing global results. SplittableStatNotAvailableError
            #       should be exclusive to RawDataStat to minimize confusion.
            raise SplittableStatNotAvailableError()

        #if minimal == True:
        #    self._globalSource = MinimalBinSource(region.genome)
        #elif globalSource == 'test':
        #    self._globalSource = UserBinSource('TestGenome:chr21:10000000-15000000','1000000')
        #else:
        #    self._globalSource = GlobalBinSource(region.genome)
        self._globalSource = GenericRelativeToGlobalStatUnsplittable.getGlobalSource(globalSource, region.genome, minimal)
        
        assert tail in ['more', 'less', 'different']
        self._tail = tail
        
        super(self.__class__, self).__init__(region, track, track2, tail=tail, globalSource=globalSource, minimal=minimal, **kwArgs)
Beispiel #7
0
    def __init__(self,
                 region,
                 track,
                 track2,
                 tail='more',
                 globalSource='chrs',
                 minimal=False,
                 **kwArgs):
        if isIter(region):
            raise SplittableStatNotAvailableError()

        self._globalSource = GenericRelativeToGlobalStatUnsplittable.getGlobalSource(
            globalSource, region.genome, minimal)
        #if minimal == True:
        #    self._globalSource = MinimalBinSource(region.genome)
        #elif globalSource == 'test':
        #    self._globalSource = UserBinSource('TestGenome:chr21:10000000-15000000','1000000')
        #elif globalSource == 'chrs':
        #    self._globalSource = GenomeInfo.getChrRegs(region.genome)
        #elif globalSource == 'chrarms':
        #    self._globalSource = GenomeInfo.getChrArmRegs(region.genome)
        #elif globalSource == 'ensembl':
        #    self._globalSource = GenomeInfo.getStdGeneRegs(region.genome)
        #elif globalSource == 'userbins':
        #    from gold.application.StatRunner import StatJob
        #    assert StatJob.USER_BIN_SOURCE is not None
        #    self._globalSource = StatJob.USER_BIN_SOURCE
        #    #self._globalSource = kwArgs['userBins']
        #else:
        #    raise ShouldNotOccurError('globalSource not recognized')
        #    #self._globalSource = GlobalBinSource(region.genome)

        assert tail in ['more', 'less', 'different']
        self._tail = tail

        super(self.__class__, self).__init__(region,
                                             track,
                                             track2,
                                             tail=tail,
                                             globalSource=globalSource,
                                             minimal=minimal,
                                             **kwArgs)
 def __init__(self, region, track, **kwArgs):
     if hasattr(region, '__iter__'):
         raise SplittableStatNotAvailableError()
     super(self.__class__, self).__init__(region, track, **kwArgs)
 def _init(self, globalSource=None, weightThreshold=None, **kwArgs):
     if isIter(self._region):
         raise SplittableStatNotAvailableError()
     assert globalSource is not None
     assert weightThreshold is not None
     self._weightThreshold = float(weightThreshold)