nipype.interfaces.cmtk.nbs module

NetworkBasedStatistic

Link to code

Bases: LibraryBaseInterface

Calculates and outputs the average network given a set of input NetworkX gpickle files

See also

For

https
//github.com/LTS5/connectomeviewer/blob/master/cviewer/libs/pyconto/groupstatistics/nbs/_nbs.py

Example

>>> import nipype.interfaces.cmtk as cmtk
>>> nbs = cmtk.NetworkBasedStatistic()
>>> nbs.inputs.in_group1 = ['subj1.pck', 'subj2.pck'] # doctest: +SKIP
>>> nbs.inputs.in_group2 = ['pat1.pck', 'pat2.pck'] # doctest: +SKIP
>>> nbs.run()                 # doctest: +SKIP
in_group1 : a list of items which are a pathlike object or string representing an existing file
Networks for the first group of subjects.
in_group2 : a list of items which are a pathlike object or string representing an existing file
Networks for the second group of subjects.
edge_key : a unicode string
Usually “number_of_fibers, “fiber_length_mean”, “fiber_length_std” for matrices made with CMTKSometimes “weight” or “value” for functional networks. (Nipype default value: number_of_fibers)
node_position_network : a pathlike object or string representing a file
An optional network used to position the nodes for the output networks.
number_of_permutations : an integer (int or long)
Number of permutations to perform. (Nipype default value: 1000)
out_nbs_network : a pathlike object or string representing a file
Output network with edges identified by the NBS.
out_nbs_pval_network : a pathlike object or string representing a file
Output network with p-values to weight the edges identified by the NBS.
t_tail : ‘left’ or ‘right’ or ‘both’
Can be one of “left”, “right”, or “both”. (Nipype default value: left)
threshold : a float
T-statistic threshold. (Nipype default value: 3)
nbs_network : a pathlike object or string representing an existing file
Output network with edges identified by the NBS.
nbs_pval_network : a pathlike object or string representing an existing file
Output network with p-values to weight the edges identified by the NBS.
network_files : a list of items which are a pathlike object or string representing an existing file
Output network with edges identified by the NBS.
nipype.interfaces.cmtk.nbs.ntwks_to_matrices(in_files, edge_key)