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
- sep
python: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_links
python: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_k
python: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_seed
python: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_seed
python: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
- indices
python:tuple
Remaining indices for (sources, targets)
- roi_st
python:list
Name of the pairs of brain regions
- indices