Skip to main content
Ctrl+K
frites 0.4.5 documentation - Home

Site Navigation

  • Overview
  • Installation
  • API Reference
  • Examples
  • GitHub
  • Twitter

Site Navigation

  • Overview
  • Installation
  • API Reference
  • Examples
  • GitHub
  • Twitter

Section Navigation

  • Dataset
    • frites.dataset.SubjectEphy
    • frites.dataset.DatasetEphy
  • Workflow
    • frites.workflow.WfMi
    • frites.workflow.WfMiCombine
    • frites.workflow.WfConnComod
    • frites.workflow.WfStats
  • Connectivity
    • frites.conn.conn_dfc
    • frites.conn.conn_covgc
    • frites.conn.conn_ccf
    • frites.conn.conn_spec
    • frites.conn.conn_te
    • frites.conn.conn_ii
    • frites.conn.conn_pid
    • frites.conn.conn_fit
    • frites.conn.conn_reshape_undirected
    • frites.conn.conn_reshape_directed
    • frites.conn.conn_ravel_directed
    • frites.conn.conn_net
    • frites.conn.conn_links
    • frites.conn.conn_get_pairs
    • frites.conn.conn_fcd_corr
    • frites.conn.define_windows
    • frites.conn.plot_windows
  • Information-based estimators
    • frites.estimator.GCMIEstimator
    • frites.estimator.BinMIEstimator
    • frites.estimator.DcorrEstimator
    • frites.estimator.CorrEstimator
    • frites.estimator.CustomEstimator
    • frites.estimator.ResamplingEstimator
  • Plotting
    • frites.plot.plot_conn_heatmap
    • frites.plot.plot_conn_circle
  • Data simulations
    • frites.simulations.StimSpecAR
    • frites.simulations.sim_ground_truth
    • frites.simulations.sim_local_cc_ss
    • frites.simulations.sim_local_cc_ms
    • frites.simulations.sim_local_cd_ss
    • frites.simulations.sim_local_cd_ms
    • frites.simulations.sim_local_ccd_ms
    • frites.simulations.sim_local_ccd_ss
  • Utility functions
    • frites.utils.downsample
    • frites.utils.acf
    • frites.utils.savgol_filter
    • frites.utils.kernel_smoothing
    • frites.utils.time_to_sample
    • frites.utils.get_closest_sample
    • frites.utils.split_group
  • Statistics
    • frites.stats.permute_mi_vector
    • frites.stats.permute_mi_trials
    • frites.stats.bootstrap_partitions
    • frites.stats.confidence_interval
    • frites.stats.ttest_1samp
    • frites.stats.rfx_ttest
    • frites.stats.cluster_correction_mcp
    • frites.stats.testwise_correction_mcp
    • frites.stats.cluster_threshold
  • Low-level core functions
    • frites.core.copnorm_1d
    • frites.core.copnorm_cat_1d
    • frites.core.ent_1d_g
    • frites.core.mi_1d_gg
    • frites.core.mi_model_1d_gd
    • frites.core.mi_mixture_1d_gd
    • frites.core.cmi_1d_ggg
    • frites.core.gcmi_1d_cc
    • frites.core.gcmi_model_1d_cd
    • frites.core.gcmi_mixture_1d_cd
    • frites.core.gccmi_1d_ccc
    • frites.core.gccmi_1d_ccd
    • frites.core.copnorm_nd
    • frites.core.copnorm_cat_nd
    • frites.core.ent_nd_g
    • frites.core.mi_nd_gg
    • frites.core.mi_model_nd_gd
    • frites.core.cmi_nd_ggg
    • frites.core.gcmi_nd_cc
    • frites.core.gcmi_model_nd_cd
    • frites.core.gccmi_nd_ccnd
    • frites.core.gccmi_model_nd_cdnd
    • frites.core.gccmi_nd_ccc
  • Configuration
    • frites.get_config
    • frites.set_config
  • API
  • Connectivity
  • frites.conn....

frites.conn.conn_links#

frites.conn.conn_links(roi, directed=False, net=False, roi_relation='both', sep='auto', nb_min_links=None, pairs=None, sort=True, triu_k=1, hemisphere=None, hemi_links='both', categories=None, source_seed=None, target_seed=None, verbose=None)[source]#

Construct pairwise links for functional connectivity.

This function can be used for defining the pairwise links for computing either undirected or directed FC on M/EEG or intracranial EEG.

Parameters:
roinumpy:array_like

List of roi (or contacts) names.

directedbool | python:False

Specify whether the links should be for undirected (False) or directed (True) FC

netbool | python:False

Specify whether it is for net directed FC (True) or not (False)

roi_relation{‘both’, ‘inter’, ‘intra’}

Specify the roi relation between pairs of brain regions. Use either :

  • ‘intra’ : to select only links within a brain region (e.g. V1-V1)

  • ‘inter’ : to select only links across brain region (e.g. V1-V2)

  • ‘both’ : to select links both within and across brain regions

seppython:str | ‘auto’

If ‘auto’, ‘-’ are used to linked brain region names for undirected FC or ‘->’ for directed FC. Alternatively, you can provide a custom separator (e.g. sep=’/’)

nb_min_linkspython:int | python:None

Threshold for defining a minimum number of links between two brain regions (e.g. iEEG)

pairsnumpy:array_like | python:None

Force to use certain pairs of brain regions. Should be an array of shape (n_pairs, 2) where the first column refer to sources and the second to targets

sortbool | python:True

For undirected and net directed FC, sort the names of the brain regions (e.g. ‘V1-M1’ -> ‘M1-V1’)

triu_kpython:int | 1

Diagonal offset when estimating the undirected links to use. By default, triu_k=1 means that we skip auto-connections

hemispherenumpy:array_like | python:None

List of hemisphere names

hemi_links{‘both’, ‘intra’, ‘inter’}

Specify whether connectivity links should be :

  • ‘both’: intra-hemispheric and inter-hemispheric (default)

  • ‘intra’: intra-hemispheric

  • ‘inter’: inter-hemispheric

In order to work, you should provide the hemisphere name using the input hemisphere

categoriesnumpy:array_like | python:list | python:None

Specify categorical information associated to each region to then get links only across categories.

source_seedpython:str, python:list | python:None

Brain region name(s) to use as source seed. Can either be the name of a single brain region or a list of brain regions.

target_seedpython:str, python:list | python:None

Brain region name(s) to use as target seed. Can either be the name of a single brain region or a list of brain regions.

Returns:
indicespython:tuple

Remaining indices for (sources, targets)

roi_stpython:list

Name of the pairs of brain regions

previous

frites.conn.conn_net

next

frites.conn.conn_get_pairs

On this page
  • conn_links()

Ban

© Copyright Last updated on 2025-04-30.