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'] 
>>> nbs.inputs.in_group2 = ['pat1.pck', 'pat2.pck'] 
>>> nbs.run()                 
in_group1a list of items which are a pathlike object or string representing an existing file

Networks for the first group of subjects.

in_group2a list of items which are a pathlike object or string representing an existing file

Networks for the second group of subjects.

edge_keya 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_networka pathlike object or string representing a file

An optional network used to position the nodes for the output networks.

number_of_permutationsan integer (int or long)

Number of permutations to perform. (Nipype default value: 1000)

out_nbs_networka pathlike object or string representing a file

Output network with edges identified by the NBS.

out_nbs_pval_networka 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)

thresholda float

T-statistic threshold. (Nipype default value: 3)

nbs_networka pathlike object or string representing an existing file

Output network with edges identified by the NBS.

nbs_pval_networka pathlike object or string representing an existing file

Output network with p-values to weight the edges identified by the NBS.

network_filesa 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)