cohort_creator package#
Submodules#
cohort_creator.cohort_creator module#
Install a set of datalad datasets from openneuro and get the data for a set of participants.
Then copy the data to a new directory structure to create a “cohort”.
- cohort_creator.cohort_creator.construct_cohort(datasets: pd.DataFrame, output_dir: Path, sourcedata_dir: Path, participants: pd.DataFrame, dataset_types: list[str], datatypes: list[str], space: str) None#
Copy the data from sourcedata_dir to output_dir, to create a cohort.
Parameters#
datasets : pd.DataFrame
output_dir : Path
sourcedata_dir : Path
participants : pd.DataFrame
- dataset_typeslist[str]
Can contain any of:
"raw","fmriprep","mriqc".- datatypeslist[str]
Can contain any of:
"anat',"func"- spacestr
Space of the data to get (only applies when dataset_types requested includes fmriprep).
- cohort_creator.cohort_creator.get_data(datasets: pd.DataFrame, sourcedata: Path, participants: pd.DataFrame, dataset_types: list[str], datatypes: list[str], space: str, jobs: int) None#
Get the data for specified participants / datatypes / space from preinstalled datalad datasets / dataset_types.
Parameters#
datasets : pd.DataFrame
sourcedata : Path
participants : pd.DataFrame
- dataset_typeslist[str]
Can contain any of:
"raw","fmriprep","mriqc".- datatypeslist[str]
Can contain any of:
"anat',"func"- spacestr
Space of the data to get (only applies when dataset_types requested includes fmriprep).
- jobsint
Number of jobs to use for parallelization during datalad get operation.
- cohort_creator.cohort_creator.install_datasets(datasets: list[str], sourcedata: Path, dataset_types: list[str]) None#
Will install several datalad datasets from openneuro.
Parameters#
- datasetslist[str]
List of dataset names.
Example:
["ds000001", "ds000002"]- sourcedataPath
Path where the datasets will be installed.
- dataset_typeslist[str]
Can contain any of:
"raw","fmriprep","mriqc".
cohort_creator.logger module#
General logger for the cohort_creator package.
- cohort_creator.logger.cc_logger(log_level: str = 'INFO') Logger#