Sha256: 74bdd95f94381f6dd5f74570415f6b88ac2771c77d8975c14aaee0d2ecf0d8cd

Contents?: true

Size: 957 Bytes

Versions: 10

Compression:

Stored size: 957 Bytes

Contents

require 'generators/job_generator'

########################################################################################################################
# A class for parsing a data directory and creating a default Preprocessing Job
# Intialize a PreprocJobGenerator with a config hash including the following optional keys:
#
# - scans : A hash of scans upon which to base preprocessing. 
#           Used to extract the correct bold reps for SPM.
#           See #ReconJobGenerator for options for the scans hash.
# 

class PreprocJobGenerator < JobGenerator
  def initialize(config = {})
    config_defaults = {}
    super config_defaults.merge(config)
    
    @spec['step'] = 'preprocess'
    
    config_requires 'scans'
  end
  
  # Build a job spec and return it.
  def build
    bold_reps = []
    @spec['bold_reps'] = @config['scans'].collect do |scan| 
      scan['bold_reps'] - scan['volumes_to_skip']
    end
    
    return @spec
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rpipe-0.1.7 lib/generators/preproc_job_generator.rb
rpipe-0.1.6 lib/generators/preproc_job_generator.rb
rpipe-0.1.4 lib/generators/preproc_job_generator.rb
rpipe-0.1.3 lib/generators/preproc_job_generator.rb
rpipe-0.1.2 lib/generators/preproc_job_generator.rb
rpipe-0.1.1 lib/generators/preproc_job_generator.rb
rpipe-0.1.0 lib/generators/preproc_job_generator.rb
rpipe-0.0.3 lib/generators/preproc_job_generator.rb
rpipe-0.0.2 lib/generators/preproc_job_generator.rb
rpipe-0.0.1 lib/generators/preproc_job_generator.rb