xcp_d.interfaces.connectivity module

Handling functional connectvity.

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

Bases: SimpleInterface

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.

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

Bases: SimpleInterface

Extract timeseries and compute connectivity matrices.

Mandatory Inputs:
  • atlas_names (a list of items which are a string) – List of atlases. Aligned with the list of time series in time_series_tsv.

  • correlations_tsv (a list of items which are a pathlike object or string representing an existing file) – List of TSV file with correlation matrices. Aligned with the list of atlases in atlas_names.

  • in_file (a pathlike object or string representing an existing file) – Bold file.

Outputs:

connectplot (a pathlike object or string representing an existing file) – Path to SVG file with four correlation heat maps.

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

Bases: SimpleInterface

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 (a pathlike object or string representing an existing file) – Atlas file.

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

  • filtered_file (a pathlike object or string representing an existing file) – Filtered file.

  • mask (a pathlike object or string representing an existing file) – Brain mask file.

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:
  • correlations (a pathlike object or string representing an existing file) – Correlation matrix file.

  • coverage (a pathlike object or string representing an existing file) – Parcel-wise coverage file.

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