- qx_mri.fc.fc_compute_seedmaps(bolds, roiinfo, frames, targetf, options)#
fc_compute_seedmaps(bolds, roiinfo, frames, targetf, options)
Computes seed based functional connectivity maps for individual subject / session.
- --bolds (str):
A string with a pipe separated list of paths to .conc or bold files. The first element has to be the name of the file or group to be used when saving the data. E.g.:
'rest|<path to rest file 1>|<path to rest file 2>'
- --roiinfo (str):
A path to the names file specifying group based seeds. Additionally, separated by a pipe '|' symbol, a path to an image file holding subject/session specific ROI definition.
- --frames (matrix | int | str, default ''):
The definition of which frames to extract, specifically:
a numeric array mask defining which frames to use (1) and which not (0), or
a single number, specifying the number of frames to skip at the start of each bold, or
a string describing which events to extract timeseries for, and the frame offset from the start and end of the event in format:
'<fidlfile>|<extraction name>:<event list>:<extraction start>:<extraction end>')
is a path to the fidle file that defines the events
- extraction name
is the name for the specific extraction definition
- event list
is a comma separated list of events for which data is to be extracted
- extraction start
is a frame number relative to event start or end when the extraction should start
- extraction end
is a frame number relative to event start or end when the extraction should start the extraction start and end should be given as '<s|e><frame number>'. E.g.:
's0' ... the frame of the event onset
's2' ... the second frame from the event onset
'e1' ... the first frame from the event end
'e0' ... the last frame of the event
'e-2' ... the two frames before the event end.
- --targetf (str, '.'):
The folder to save images in.
- --options (str, default 'roimethod=mean|eventdata=all|ignore=use,fidl|badevents=use|fcmeasure=r|saveind=none|subjectname=|verbose=false|debug=false'):
A string specifying additional analysis options formated as pipe separated pairs of colon separated key, value pairs:
It takes the following keys and values:
What method to use to compute ROI signal:
Defaults to 'mean'.
What data to use from each event:
use all identified frames of all events
use the mean across frames of each identified event
use the minimum value across frames of each identified event
use the maximum value across frames of each identified event
use the median value across frames of each identified event.
Defaults to 'all'.
A comma separated list of information to identify frames to ignore, options are:
ignore frames as marked in the use field of the bold file
ignore frames as marked in .fidl file (only available with event extraction)
the column name in ∗_scrub.txt file that matches bold file to be used for ignore mask.
Defaults to 'use,fidl'.
What to do with events that have frames marked as bad, options are:
use any frames that are not marked as bad
use the frames that are not marked as bad if at least <number> ok frames exist
if any frame is marked as bad, ignore the full event.
Defaults to 'use'.
Which functional connectivity measure to compute, the options are:
Pearson's r value
Defaults to 'r'.
A comma separted list of individual session / subject files to save:
save Pearson correlation coefficients (r only) separately for each roi
save Fisher Z values (r only) separately for each roi
save Z statistic (r only) separately for each roi
save p value (r only) separately for each roi
save covariances (cv only) separately for each roi
save all relevant values by roi
save Pearson correlation coefficients (r only) in a single file for all roi
save Fisher Z values (r only) in a single file for all roi
save Z statistic (r only) in a single file for all roi
save p value (r only) in a single file for all roi
save covariances (cv only) in a single file for all roi
save all relevant values in a joint file
do not save any individual level results
Default is 'none'. Any invalid options will be ignored without a warning.
An optional name to add to the output files, if empty, it won't be used. Defaults to ''.
Whether to be verbose when running the analysis:
Defaults to 'false'.
Whether to print debug when running the analysis:
Defauts to 'false'.
The title of the extraction as specifed in the frames string, empty if extraction was specified using a numeric value.
The functional connectivity map, with one seed-map per frame.
A cell array with the names of the ROI used in the order of their seed-maps in the fc image.
Number of frames over which the map was computed.
Based on saveind option specification the following files may be saved:
Fisher Z values
Z converted p values testing difference from 0
p values testing difference from 0
<roi> is the name of the ROI for which the seed map was computed for.
<name> is the provided name of the bold(s).
<subjectname> is the provided name of the subject, if it was specified.
<title> is the title of the extraction event(s), if event string was specified.
The method returns a structure array named fcmaps with the fields lised above for each specified data extraction.
The function computes seed maps for the specified ROI. If an event string is provided, it has to start with a path to the .fidl file to be used to extract the events, following by a pipe separated list of event extraction definitions:
<title>:<eventlist>:<frame offset1>:<frame offset2>
Multiple extractions can be specified by separating them using the pipe '|' separator. Specifically, for each extraction, all the events listed in a comma-separated eventlist will be considered (e.g. 'congruent,incongruent'). For each event all the frames starting from the specified beginning and ending offset will be extracted. If options eventdata is specified as 'all', all the specified frames will be concatenated in a single timeseries, otherwise, each event will be summrised by a single frame in a newly generated events series image.
From the resulting image, ROI series will be extracted for each specified ROI as specified by the roimethod option. A seed-map will be computed for each ROI where for each voxel or grayordinate, a correlation or covariance of its dataseries with the ROI will be entered.
The results will be returned in a fcmaps structure and, if so specified, saved.