Class: Preprocessing
- 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
Instance Attribute Summary collapse
-
#bold_reps ⇒ Object
Returns the value of attribute bold_reps.
-
#motion_threshold ⇒ Object
Returns the value of attribute motion_threshold.
-
#tspec ⇒ Object
Returns the value of attribute tspec.
Attributes inherited from JobStep
#collision_policy, #libdir, #origdir, #procdir, #rawdir, #spmdir, #statsdir, #step, #subid
Instance Method Summary collapse
-
#initialize(workflow_spec, preproc_spec) ⇒ Preprocessing
constructor
Initialize instances with a hash normally generated by a Pipe object.
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.
182 183 184 185 186 187 188 189 |
# File 'lib/rpipe.rb', line 182 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_reps ⇒ Object
Returns the value of attribute bold_reps.
179 180 181 |
# File 'lib/rpipe.rb', line 179 def bold_reps @bold_reps end |
#motion_threshold ⇒ Object
Returns the value of attribute motion_threshold.
179 180 181 |
# File 'lib/rpipe.rb', line 179 def motion_threshold @motion_threshold end |
#tspec ⇒ Object
Returns the value of attribute tspec.
179 180 181 |
# File 'lib/rpipe.rb', line 179 def tspec @tspec end |