nipoppy.layout.DatasetLayout

class nipoppy.layout.DatasetLayout(dpath_root, fpath_config=None)

File/directory structure for a specific dataset.

Parameters:
  • dpath_root (nipoppy.env.StrOrPathLike)

  • fpath_config (Optional[nipoppy.env.StrOrPathLike])

get_dpath_bids_db(pipeline_name, pipeline_version, participant_id=None, session_id=None)

Return the path to a pipeline’s BIDS database directory.

Parameters:
  • pipeline_name (str)

  • pipeline_version (str)

  • participant_id (Optional[str])

  • session_id (Optional[str])

Return type:

pathlib.Path

get_dpath_pipeline(pipeline_name, pipeline_version)

Return the path to a pipeline’s directory.

Parameters:
  • pipeline_name (str)

  • pipeline_version (str)

Return type:

pathlib.Path

get_dpath_pipeline_output(pipeline_name, pipeline_version)

Return the path to a pipeline’s output directory.

Note: This path is the same given a pipeline name and version (i.e. does not depend on participant or session).

Parameters:
  • pipeline_name (str)

  • pipeline_version (str)

Return type:

pathlib.Path

get_dpath_pipeline_work(pipeline_name, pipeline_version, participant_id=None, session_id=None)

Return the path to a pipeline’s working directory.

Parameters:
  • pipeline_name (str)

  • pipeline_version (str)

  • participant_id (Optional[str])

  • session_id (Optional[str])

Return type:

pathlib.Path

get_full_path(path)

Build a full path from a relative path.

Parameters:

path (nipoppy.env.StrOrPathLike)

Return type:

pathlib.Path

get_paths(directory=True, include_optional=False)

Return a list of all directory or file paths.

Return type:

list[pathlib.Path]

validate()

Validate that all the expected paths exist.

Return type:

bool

config
dname_pipeline_output = 'output'
dname_pipeline_work = 'work'
dpath_assessments: pathlib.Path
dpath_bids: pathlib.Path
dpath_bids_db: pathlib.Path
dpath_bids_ignore_patterns: pathlib.Path
dpath_containers: pathlib.Path
dpath_demographics: pathlib.Path
dpath_derivatives: pathlib.Path
property dpath_descriptions: list[Tuple[pathlib.Path, str]]

Return a list of directory paths and associated description strings.

Return type:

list[Tuple[pathlib.Path, str]]

dpath_descriptors: pathlib.Path
dpath_downloads: pathlib.Path
dpath_invocations: pathlib.Path
dpath_logs: pathlib.Path
dpath_proc: pathlib.Path
dpath_pybids: pathlib.Path
dpath_raw_imaging: pathlib.Path
dpath_releases: pathlib.Path
dpath_root
dpath_scratch: pathlib.Path
dpath_sourcedata: pathlib.Path
dpath_tabular: pathlib.Path
dpath_tracker_configs: pathlib.Path
property dpaths: list[pathlib.Path]

Return a list of all required directory paths.

Return type:

list[pathlib.Path]

fpath_config: pathlib.Path
fpath_doughnut: pathlib.Path
fpath_imaging_bagel: pathlib.Path
fpath_manifest: pathlib.Path
fpath_spec
property fpaths: list[pathlib.Path]

Return a list of all required file paths.

Return type:

list[pathlib.Path]