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.



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

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.



203
204
205
# File 'lib/rpipe.rb', line 203

def bold_reps
  @bold_reps
end

#conditionsObject

Returns the value of attribute conditions.



203
204
205
# File 'lib/rpipe.rb', line 203

def conditions
  @conditions
end

#onsetsfilesObject

Returns the value of attribute onsetsfiles.



203
204
205
# File 'lib/rpipe.rb', line 203

def onsetsfiles
  @onsetsfiles
end

#regressorsfilesObject

Returns the value of attribute regressorsfiles.



203
204
205
# File 'lib/rpipe.rb', line 203

def regressorsfiles
  @regressorsfiles
end

#responsesObject

Returns the value of attribute responses.



203
204
205
# File 'lib/rpipe.rb', line 203

def responses
  @responses
end

#statsdirObject

Returns the value of attribute statsdir.



203
204
205
# File 'lib/rpipe.rb', line 203

def statsdir
  @statsdir
end

#tspecObject

Returns the value of attribute tspec.



203
204
205
# File 'lib/rpipe.rb', line 203

def tspec
  @tspec
end