Standard parsers

The documentation of standard parsers that can be used to generate the inputs of the unified importation procedures.

FreeSurfer parsers

cubes.piws.parser.freesurfer.freesurfer(fsdirs, study_name, subject_pattern, tool_version, tool_parameters=None, savedir=None, rql_template="Any SC Where S is Subject, S code_in_study '{0}', S subject_scans SC, SC in_assessment A, A timepoint '{1}', SC label 'ADNI_MPRAGE'")[source]

Parse the freesurfer files and create a structure that fulfill the processing importer synthax.

Parameters:

fsdirs: dict (mandatory) :

the location of the FreeSurfer directory with the timepoints as key.

study_name: str (mandatory) :

the name of the study.

subject_pattern: str (mandatory) :

a pattern used to extract the subject name from the FreeSurfer directories names.

tool_version: str (mandatory) :

the FreeSurfer tool version.

tool_parameters: object (optional, defafult None) :

a structure describing the used options.

savedir: str (optional, defafult None) :

if a valid directory is specified write the generated structure as a json file.

rql_template: str (optional, default RQL_T1) :

the rql used to retrieve the t1 scan attached to a FreeSurfer processing.

Returns:

processings: dict :

the generated structure with the FreeSurfeer files information.

cubes.piws.parser.freesurfer.freesurfer_stats(fsstatdirs, study_name, subject_age_map, savedir=None)[source]

Parse the freesurfer stats files and create a structure that fulfill the questionnaire importer synthax.

Parameters:

fsstatdirs: dict (mandatory) :

the location of the FreeSurfer stats directories with the timepoints as key.

study_name: str (mandatory) :

the name of the study.

subject_age_map: dict (mandatory) :

a map between subject ids as keys and subject ages as values with the time points as a fist key.

savedir: str (optional, defafult None) :

if a valid directory is specified write the generated structure as a json file.

Returns:

questionnaires: dict :

the generated structure with the stat files information.