Skip to content

Requirements and Design for multisite and multiscan support

RanjitK edited this page Jul 5, 2012 · 2 revisions

Description

Currently CPAC is not capable of handling multiple scans for different sites. The requirement is to build a feature which enables CPAC to handle data organization with multiple rest scans specifically for ABIDE data organization.

Analysis

The ABIDE data has multiple scans inside each session for every subject. Example

site -> subjects -> session_1 -> anat_1 ->anat.nii.gz, rest_1 ->rest.nii.gz, rest_2 -> rest.nii.gz

These scans may vary from site to site. The CPAC should be able to handle that.

Modification required

  • Create an option for user to specify if the pipeline is going to run on multisite or not.
  • For multisite, user should provide the path to the multisite directory in configuration file.
  • A single template, both for anatomical and functional files is required.
  • The input subject list remains the same.

Design

Lets take an example structure

site-> nyu-> sub01-> session_1->rest_1->rest.nii.gz (site_name/subject_name/session_name/scan_name/nifti_file)

Changes to Configuration file

Earlier

anatTemplate = '%s/session_1/anat/%s.nii.gz'

anatTemplateList = ['subject', 'mprage']

anatSessionFile = '/Users/ranjeet.khanuja/Desktop/session_anat.txt'

funcTemplate = '%s/session_1/*/%s.nii.gz'

funcTemplateList = ['subject', 'rest']

funcSessionFile = '/Users/ranjeet.khanuja/Desktop/session.txt'

Modification

No session list required

Template and template Args/List for both anatomical and functional preprocessing

template = */ %s / * / %s / %s.nii.gz

anattemplateArgs = [subjects, scans, mprage]

functemplateArgs = [subjects, scans, rest]

New Additions

Add the following options to the config file

dataPath = '/home/data/ABIDE/' #path of the directory where data for all the sites is present

Note: No change in the subject inclusion and exclusion list. Rest of the arguments should be figured out by the pipeline on its own.

High Level Design

Modify the datasource

Create a method which walks through the 'datapath' directory and create a list of anatomical and functional scans for each method. Create a dictionary with keys as subject and list of anat and func scans as its values.

Example

sub_dict= { sub001 : [ [anat_1], [rest_1, rest_2, rest3, rest4] ] , sub002 : [ [anat_1], [rest_1, rest_2] ] }

Provide this dictionary to the datasource. The datasource should iterate over anatomical and functional scan list for each subject. Fetch these list for each subject and provide it to the template argument.

To recognize where a scan is functional or anatomical, check if the files are mprage.nii.gz/anat.niii.gz for anatomical scans and rest.nii.gz/func.nii.gz for functional scans

Separate out the two datasource for anat and func in two different files.

Clone this wiki locally