Skip to content

Commit

Permalink
👔 Use a regular Node instead of a JoinNode
Browse files Browse the repository at this point in the history
  • Loading branch information
shnizzedy committed Sep 29, 2023
1 parent decdf7a commit 8d984b8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions CPAC/network_centrality/network_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def create_centrality_wf(wf_name : str, method_option : str,
'threshold']),
name='inputspec')
input_node.inputs.threshold = threshold
output_node = pe.Node(util.IdentityInterface(fields=['outfile_list']),
name='outputspec')

# Degree centrality
if method_option == 'degree_centrality':
Expand All @@ -111,10 +113,6 @@ def create_centrality_wf(wf_name : str, method_option : str,
w_option in weight_options]
afni_centrality_node.inputs.do_binary = [
w_option == 'Binarized' for w_option in weight_options]
output_node = pe.JoinNode(
util.IdentityInterface(fields=['outfile_list']),
name='outputspec', joinfield=['outfile_list'],
joinsource='afni_centrality')
centrality_wf.connect(afni_centrality_node, 'out_file',
output_node, 'outfile_list')
else:
Expand All @@ -140,8 +138,6 @@ def create_centrality_wf(wf_name : str, method_option : str,
function=utils.sep_nifti_subbriks),
name='sep_nifti_subbriks')
sep_subbriks_node.inputs.out_names = out_names
output_node = pe.Node(util.IdentityInterface(fields=['outfile_list']),
name='outputspec')
centrality_wf.connect([(afni_centrality_node, sep_subbriks_node,
[('out_file', 'nifti_file')]),
(sep_subbriks_node, output_node,
Expand Down

0 comments on commit 8d984b8

Please sign in to comment.