Skip to content

Commit f378ec9

Browse files
author
Erik Ziegler
committed
Node IDs for CSV files in NetworkX workflow
1 parent 33a71f4 commit f378ec9

File tree

1 file changed

+3
-1
lines changed
  • nipype/workflows/dmri/connectivity

1 file changed

+3
-1
lines changed

nipype/workflows/dmri/connectivity/nx.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import nipype.interfaces.utility as util
33
import nipype.interfaces.cmtk as cmtk
44
import nipype.algorithms.misc as misc
5+
from .group_connectivity import pullnodeIDs
56

67
def create_networkx_pipeline(name="networkx", extra_column_heading="subject"):
78
"""Creates a workflow to calculate various graph measures (via NetworkX) on
@@ -52,6 +53,7 @@ def create_networkx_pipeline(name="networkx", extra_column_heading="subject"):
5253
pipeline.connect([(Matlab2CSV_node, MergeCSVFiles_node,[("csv_files","in_files")])])
5354
pipeline.connect([(inputnode, MergeCSVFiles_node,[("extra_field","out_file")])])
5455
pipeline.connect([(inputnode, MergeCSVFiles_node,[("extra_field","extra_field")])])
56+
pipeline.connect([(inputnode, MergeCSVFiles_node, [(("network_file", pullnodeIDs), "row_headings")])])
5557

5658
pipeline.connect([(inputnode, mergeNetworks,[("network_file","in1")])])
5759
pipeline.connect([(ntwkMetrics, mergeNetworks,[("gpickled_network_files","in2")])])
@@ -67,7 +69,7 @@ def create_networkx_pipeline(name="networkx", extra_column_heading="subject"):
6769
pipeline.connect([(Matlab2CSV_global, mergeCSVs, [("csv_files", "in2")])])
6870
pipeline.connect([(mergeNetworks, outputnode, [("out", "network_files")])])
6971
pipeline.connect([(mergeCSVs, outputnode, [("out", "csv_files")])])
70-
pipeline.connect([(ntwkMetrics, outputnode,[("matlab_matrix_files","matlab_files")])])
72+
pipeline.connect([(ntwkMetrics, outputnode,[("matlab_matrix_files", "matlab_files")])])
7173
return pipeline
7274

7375
def create_cmats_to_csv_pipeline(name="cmats_to_csv", extra_column_heading="subject"):

0 commit comments

Comments
 (0)