nispace.workflows.simple_colocalization#
- nispace.workflows.simple_colocalization(y, x='PET', z=None, x_collection=None, standardize='xz', parcellation='Schaefer200', parcellation_labels=None, y_covariates=None, colocalization_method='spearman', p_from_average_y=False, plot=True, combat=False, n_perm=10000, seed=None, n_proc=1, verbose=True, nispace_object=None, fetch_x_kwargs={}, init_kwargs={}, clean_y_kwargs={}, colocalize_kwargs={}, permute_kwargs={}, correct_p_kwargs={}, plot_kwargs={})[source]#
Simple colocalization workflow.
- Parameters:
y (array-like or pandas DataFrame or list) – Input Y data to colocalize with X. Can be a numpy array, pandas DataFrame, (list of) path(s) to a file(s) or list of image objects.
x (str or array-like, default="PET") – Input X data. Can be a string indicating a reference dataset (“PET”, “mRNA”, …), or inputs types as listed for y.
z (array-like or None, default=None) – Optional confound data to regress out. Can be “gm”, or input types as listed for y.
x_collection (str or None, default=None) – If x is a string reference dataset, specifies which collection to use.
standardize (str, default="xz") – Which data to standardize. Can contain “x”, “y”, and/or “z”.
parcellation (str or int, default=_PARC_DEFAULT) – Brain parcellation to use. Can be a string name or integer ID.
parcellation_labels (array-like or None, default=None) – Optional labels for the parcellation regions.
y_covariates (array-like or None, default=None) – Optional covariates to regress from Y data.
colocalization_method (str or list, default="spearman") – Method(s) to use for colocalization. Can be “spearman”, “pearson”, etc.
p_from_average_y (bool, default=False) – Whether to compute p-values from averaged Y values.
plot (bool, default=True) – Whether to generate visualization plots.
combat (bool, default=False) – Whether to apply ComBat harmonization.
n_perm (int, default=10000) – Number of permutations for null distribution.
seed (int or None, default=None) – Random seed for reproducibility.
n_proc (int, default=-1) – Number of processes for parallel computation. -1 uses all CPUs.
verbose (bool, default=True) – Whether to print progress messages.
nispace_object (NiSpace or None, default=None) – Optional pre-initialized NiSpace object to use.
fetch_x_kwargs (dict, default={}) – Additional arguments for fetching X data.
init_kwargs (dict, default={}) – Additional arguments for NiSpace initialization.
clean_y_kwargs (dict, default={}) – Additional arguments for Y data cleaning.
colocalize_kwargs (dict, default={}) – Additional arguments for colocalization.
permute_kwargs (dict, default={}) – Additional arguments for permutation testing.
correct_p_kwargs (dict, default={}) – Additional arguments for p-value correction.
plot_kwargs (dict, default={}) – Additional arguments for plotting.
- Returns:
colocs (dict or array) – Colocalization values for each method.
p_values (dict or array) – Uncorrected p-values for each method.
p_fdr_values (dict or array) – FDR-corrected p-values for each method.
nsp (NiSpace) – The NiSpace object containing all results.