xcp_d.interfaces.connectivity.CiftiConnect

class xcp_d.interfaces.connectivity.CiftiConnect(from_file=None, resource_monitor=None, **inputs)[source]

Extract timeseries and compute connectivity matrices.

Write out time series using Nilearn’s NiftiLabelMasker Then write out functional correlation matrix of timeseries using numpy.

Mandatory Inputs:
  • atlas_file (a pathlike object or string representing an existing file) – Atlas CIFTI file to use to parcellate data_file. This file must already be resampled to the same structure as data_file.

  • atlas_labels (a pathlike object or string representing an existing file) – Atlas labels file.

  • data_file (a pathlike object or string representing an existing file) – Dense CIFTI time series file to parcellate.

  • parcellated_atlas (a pathlike object or string representing an existing file) – Atlas CIFTI that has been parcellated with itself to make a .pscalar.nii file. This is just used for its ParcelsAxis.

Optional Inputs:

min_coverage (a float) – Coverage threshold to apply to parcels. Any parcels with lower coverage than the threshold will be replaced with NaNs. Must be a value between zero and one. Default is 0.5. (Nipype default value: 0.0)

Outputs:
  • correlation_ciftis (a pathlike object or string representing an existing file) – Correlation matrix pconn.nii file.

  • correlations (a pathlike object or string representing an existing file) – Correlation matrix tsv file.

  • coverage (a pathlike object or string representing an existing file) – Coverage tsv file.

  • coverage_ciftis (a pathlike object or string representing an existing file) – Coverage CIFTI file.

  • timeseries (a pathlike object or string representing an existing file) – Parcellated data tsv file.

  • timeseries_ciftis (a pathlike object or string representing an existing file) – Parcellated data ptseries.nii file.

__init__(from_file=None, resource_monitor=None, **inputs)[source]

Subclasses must implement __init__

Methods

__init__([from_file, resource_monitor])

Subclasses must implement __init__

aggregate_outputs([runtime, needed_outputs])

Collate expected outputs and apply output traits validation.

help([returnhelp])

Prints class help

load_inputs_from_json(json_file[, overwrite])

A convenient way to load pre-set inputs from a JSON file.

run([cwd, ignore_exception])

Execute this interface.

save_inputs_to_json(json_file)

A convenient way to save current inputs to a JSON file.

Attributes

always_run

Should the interface be always run even if the inputs were not changed? Only applies to interfaces being run within a workflow context.

can_resume

Defines if the interface can reuse partial results after interruption.

resource_monitor

version

interfaces should implement a version property