parameters: (params)
return_statement: return estimationIntervals
docstring: Return the list of genome intervals to use for error estimation
docstring_summary: Return the list of genome intervals to use for error estimation
docstring_tokens: Return the list of genome intervals to use for error estimation
function: def getErrorEstimationIntervals(params) :
      """
      Return the list of genome intervals to use for error estimation
      """
  
      # Setup the estimation region sampling list for all samples, estimation uses smaller genome
      # segments than variant calling, and shuffles these with a constant seed to make results deterministic
      class Constants :
          Megabase = 1000000
          errorEstimationMinChromSize = params.errorEstimationMinChromMb * Megabase
          sampledErrorEstimationChunkSize = 2 * Megabase
          allDataErrorEstimationChunkSize = 12 * Megabase
  
  
      largeChroms = [chrom for chrom in params.chromOrder if params.chromSizes[chrom] >= Constants.errorEstimationMinChromSize]
  
      if params.isErrorEstimationFromAllData :
          estimationIntervals = [GenomeSegment(*interval) for interval in getChromIntervals(largeChroms, params.chromSizes, Constants.allDataErrorEstimationChunkSize)]
  
      else :
          estimationIntervals = [GenomeSegment(*interval) for interval in getChromIntervals(largeChroms, params.chromSizes, Constants.sampledErrorEstimationChunkSize)]
  
          # Create a local random instance such that the fixed-seed shuffle procedure works as expected
          # in a multi-threaded context.
          import random
          localRandom = random.Random()
          localRandom.seed(4000)
  
          localRandom.shuffle(estimationIntervals)
  
      return estimationIntervals
function_tokens: def getErrorEstimationIntervals ( params ) : # Setup the estimation region sampling list for all samples, estimation uses smaller genome # segments than variant calling, and shuffles these with a constant seed to make results deterministic class Constants : Megabase = 1000000 errorEstimationMinChromSize = params . errorEstimationMinChromMb * Megabase sampledErrorEstimationChunkSize = 2 * Megabase allDataErrorEstimationChunkSize = 12 * Megabase largeChroms = [ chrom for chrom in params . chromOrder if params . chromSizes [ chrom ] >= Constants . errorEstimationMinChromSize ] if params . isErrorEstimationFromAllData : estimationIntervals = [ GenomeSegment ( * interval ) for interval in getChromIntervals ( largeChroms , params . chromSizes , Constants . allDataErrorEstimationChunkSize ) ] else : estimationIntervals = [ GenomeSegment ( * interval ) for interval in getChromIntervals ( largeChroms , params . chromSizes , Constants . sampledErrorEstimationChunkSize ) ] # Create a local random instance such that the fixed-seed shuffle procedure works as expected # in a multi-threaded context. import random localRandom = random . Random ( ) localRandom . seed ( 4000 ) localRandom . shuffle ( estimationIntervals ) return estimationIntervals