xcp_d.interfaces.plotting.QCPlots
- class xcp_d.interfaces.plotting.QCPlots(from_file=None, resource_monitor=None, **inputs)[source]
Generate pre- and post-processing quality control (QC) figures.
Examples
>>> from tempfile import TemporaryDirectory >>> tmpdir = TemporaryDirectory() >>> os.chdir(tmpdir.name) .. doctest:: qcplots = QCPlots() qcplots.inputs.cleaned_file = datafile qcplots.inputs.name_source = rawbold qcplots.inputs.bold_file = rawbold qcplots.inputs.TR = TR qcplots.inputs.temporal_mask = temporalmask qcplots.inputs.mask_file = mask qcplots.inputs.dummy_scans = dummy_scans qcplots.run() .. testcleanup:: >>> tmpdir.cleanup()
- Mandatory Inputs:
TR (a float) – Repetition Time.
bold_file (a pathlike object or string representing an existing file) – Preprocessed BOLD file, after dummy scan removal. Used in carpet plot.
cleaned_file (a pathlike object or string representing an existing file) – Processed file, after denoising and censoring.
dummy_scans (an integer) – Dummy time to drop.
fmriprep_confounds_file (a pathlike object or string representing an existing file) – FMRIPrep confounds file, after dummy scans removal.
head_radius (a float) – Head radius for FD calculation.
mask_file (a pathlike object or string representing an existing file or None) – Mask file from nifti. May be None, for CIFTI processing.
name_source (a pathlike object or string representing a file) – Preprocessed BOLD file. Used to find files. In the case of the concatenation workflow, this may be a nonexistent file (i.e., the preprocessed BOLD file, with the run entity removed).
temporal_mask (a pathlike object or string representing an existing file) – Temporal mask.
- Optional Inputs:
anat_brainmask (a pathlike object or string representing an existing file) – Mask in T1W.
bold2T1w_mask (a pathlike object or string representing an existing file) – Bold mask in MNI.
bold2temp_mask (a pathlike object or string representing an existing file) – Bold mask in T1W.
seg_file (a pathlike object or string representing an existing file) – Seg file for nifti.
template_mask (a pathlike object or string representing an existing file) – Template mask.
- Outputs:
clean_qcplot (a pathlike object or string representing an existing file) – Qc plot after regression.
qc_file (a pathlike object or string representing an existing file) – Qc file in tsv.
raw_qcplot (a pathlike object or string representing an existing file) – Qc plot before regression.
- __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