Class: Preprocessing

Inherits:
JobStep show all
Includes:
DefaultPreproc
Defined in:
lib/rpipe.rb

Overview

A class for performing spatial preprocessing steps on functional MRI data in preparation for first level stats. Preprocessing includes setting up output directories, linking all appropriate data, customizing a preconfigured spm job, running the job, calculating withing scan motion derivatives, and finally checking for excessive motion. The spm job should normally include tasks for realignment, normalization, and smoothing.

Constant Summary collapse

MOTION_THRESHOLD =

maximum allowable realignment displacement in any direction

1

Constants inherited from JobStep

JobStep::COLLISION_POLICY

Instance Attribute Summary collapse

Attributes inherited from JobStep

#collision_policy, #libdir, #origdir, #procdir, #rawdir, #spmdir, #statsdir, #step, #subid

Instance Method Summary collapse

Methods included from DefaultPreproc

#check_permissions, #customize_templates, #deal_with_motion, #link_files_into_proc, #preproc_visit, #run_spm_jobs

Methods inherited from JobStep

#check_instance_vars, #default_spmdir, #include_custom_methods, #job_requires, #setup_directory, #validate_existence_of

Constructor Details

#initialize(workflow_spec, preproc_spec) ⇒ Preprocessing

Initialize instances with a hash normally generated by a Pipe object.



180
181
182
183
184
185
186
187
# File 'lib/rpipe.rb', line 180

def initialize(workflow_spec, preproc_spec)
	super(workflow_spec, preproc_spec)
	@tspec = preproc_spec['template_spec']
	@motion_threshold = preproc_spec['motion_threshold'] || MOTION_THRESHOLD
	@bold_reps = preproc_spec['bold_reps']
	
	job_requires 'origdir', 'procdir'
end

Instance Attribute Details

#bold_repsObject

Returns the value of attribute bold_reps.



177
178
179
# File 'lib/rpipe.rb', line 177

def bold_reps
  @bold_reps
end

#motion_thresholdObject

Returns the value of attribute motion_threshold.



177
178
179
# File 'lib/rpipe.rb', line 177

def motion_threshold
  @motion_threshold
end

#tspecObject

Returns the value of attribute tspec.



177
178
179
# File 'lib/rpipe.rb', line 177

def tspec
  @tspec
end