Class: Stats

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

Overview

A class used to compute the first level stats for a functional MRI visit data set. Currently very incomplete, any ideas for other data/attributes we need here?

Constant Summary

Constants inherited from JobStep

JobStep::COLLISION_POLICY

Instance Attribute Summary collapse

Attributes inherited from JobStep

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

Instance Method Summary collapse

Methods included from DefaultStats

#create_onsets_files, #customize_template_job, #link_files_from_proc_directory, #link_onsets_files, #run_first_level_stats, #run_stats_spm_job

Methods inherited from JobStep

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

Constructor Details

#initialize(workflow_spec, stats_spec) ⇒ Stats

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



208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/rpipe.rb', line 208

def initialize(workflow_spec, stats_spec)
	super(workflow_spec, stats_spec)
	@tspec = stats_spec['template_spec']
	@onsetsfiles = stats_spec['onsetsfiles']
	@responses = stats_spec['responses']
	@regressorsfiles = stats_spec['regressorsfiles']
	@bold_reps = stats_spec['bold_reps']
	@conditions = stats_spec['conditions'] || workflow_spec['conditions']
	
	job_requires 'bold_reps', 'procdir', 'statsdir'
	job_requires 'conditions' if @responses
end

Instance Attribute Details

#bold_repsObject

Returns the value of attribute bold_reps.



205
206
207
# File 'lib/rpipe.rb', line 205

def bold_reps
  @bold_reps
end

#conditionsObject

Returns the value of attribute conditions.



205
206
207
# File 'lib/rpipe.rb', line 205

def conditions
  @conditions
end

#onsetsfilesObject

Returns the value of attribute onsetsfiles.



205
206
207
# File 'lib/rpipe.rb', line 205

def onsetsfiles
  @onsetsfiles
end

#regressorsfilesObject

Returns the value of attribute regressorsfiles.



205
206
207
# File 'lib/rpipe.rb', line 205

def regressorsfiles
  @regressorsfiles
end

#responsesObject

Returns the value of attribute responses.



205
206
207
# File 'lib/rpipe.rb', line 205

def responses
  @responses
end

#statsdirObject

Returns the value of attribute statsdir.



205
206
207
# File 'lib/rpipe.rb', line 205

def statsdir
  @statsdir
end

#tspecObject

Returns the value of attribute tspec.



205
206
207
# File 'lib/rpipe.rb', line 205

def tspec
  @tspec
end