You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pynets_bids: the following arguments are required: bids_dir, output_dir, analysis_level, modality
58
+
Data already preprocessed with BIDS apps like fmriprep, CPAC, dmriprep? If your BIDS derivatives can be queried with pybids, then you should be able to run them with the user-friendly `pynets_bids` CLI!
where the `-config` flag specifies that path to a .json configuration spec that includes at least one of many possible connectome recipes to apply to your data. Pre-built configuration files are included in the pynets/config directory, and an example is shown here (with commented descriptions):
62
+
```
63
+
*Note: If you preprocessed your BOLD data using fMRIprep, then you will need to have specified either `T1w` or `anat` in the list of fmriprep `--output-spaces`. Similarly, if you preprocessed your data using CPAC, then you will want to be sure that an ALFF image exists. PyNets does NOT currently accept template-normalized BOLD or DWI data. See the usage docs for more information on compatible file types.
64
+
65
+
66
+
where the `-config` flag specifies that path to a .json configuration spec that includes at least one of many possible connectome recipes to apply to your data. Pre-built configuration files are available (see: <https://github.com/dPys/PyNets/tree/master/pynets/config>), and an example is shown here (with commented descriptions):
79
67
80
68
```
81
69
{
82
-
"dwi": {
83
-
"dg": "['prob', 'det']", # Indicates the direction-getting method(s) of tractography.
84
-
"ml": "['0', '10', '40']", # Indicates the minimum streamline length(s) for tractographic filtering.
85
-
"mod": "['csd', 'csa', 'sfm']" # Indicates the type(s) of diffusion model estimators for fixel reconstruction. At least 1 is required for structural connectometry.
86
-
},
87
-
"func": {
88
-
"ct": "['rena', 'ward', 'kmeans']", # Indicates the type(s) of clustering that will be used to generate a clustering-based parcellation. This should be left as "None" if no clustering will be performed, but can be included simultaneously with the `-a` and `-ua` parcellation options.
89
-
"k": "['200', '400', '600']", # Indicates the number of clusters to generate in a clustering-based parcellation. This should be left as "None" if no clustering will be performed.
70
+
"func": { # fMRI options. If you only have functional (i.e. BOLD) data, set each of the `dwi` options to "None"
71
+
"ct": "None", # Indicates the type(s) of clustering that will be used to generate a clustering-based parcellation. This should be left as "None" if no clustering will be performed, but can be included simultaneously with the `-a` and `-ua` parcellation options.
72
+
"k": "None", # Indicates the number of clusters to generate in a clustering-based parcellation. This should be left as "None" if no clustering will be performed.
90
73
"hp": "['0', '0.028', '0.080']", # Indicates the high-pass frequenc(ies) to apply to signal extraction from nodes.
91
-
"mod": "['partcorr', 'sps']", # Indicates the functional connectivity estimator(s) to use. At least 1 is required for functional connectometry.
92
-
"sm": "['0', '2', '4']", # Indicates the smoothing FWHM value(s) to apply during the nodal time-series signal extraction.
74
+
"mod": "['partcorr', 'cov']", # Indicates the functional connectivity estimator(s) to use. At least 1 is required for functional connectometry.
75
+
"sm": "['0', '4']", # Indicates the smoothing FWHM value(s) to apply during the nodal time-series signal extraction.
93
76
"es": "['mean', 'median']" # Indicates the method(s) of nodal time-series signal extraction.
94
77
},
95
-
"gen": {
96
-
"a": "DesikanKlein2012", # Anatomical atlases to define nodes.
78
+
"dwi": { # dMRI options. If you only have structural (i.e. DWI) data, set each of the `func` options to "None"
79
+
"dg": "None",
80
+
"ml": "None",
81
+
"mod": "None",
82
+
"em": "None"
83
+
},
84
+
"gen": { # These are general options that apply to all modalities
85
+
"a": "['BrainnetomeAtlasFan2016', 'atlas_harvard_oxford', 'destrieux2009_rois']", # Anatomical atlases to define nodes.
97
86
"bin": "False", # Binarize the resulting connectome graph before analyzing it. Note that undirected weighted graphs are analyzed by default.
98
87
"embed": "False", # Activate omnibus and single-graph adjacency spectral embedding of connectome estimates sampled.
99
88
"mplx": 0, # If both functional and structural data are provided, this parameter [0-3] indicates the type of multiplex connectome modeling to perform. See `pynets -h` for more details on multiplex modes.
@@ -115,6 +104,30 @@ where the `-config` flag specifies that path to a .json configuration spec that
115
104
}
116
105
```
117
106
107
+
Data not in BIDS format and/or preprocessed using in-house tools?
108
+
No problem-- you can still run pynets manually:
109
+
```
110
+
pynets -id '002_1' '/Users/dPys/outputs/pynets' \ # where `-id` is an arbitrary subject identifier and the first path is an arbitrary output directory to store derivatives of the workflow.
111
+
-func '/Users/dPys/PyNets/tests/examples/sub-002/ses-1/func/BOLD_PREPROCESSED_IN_ANAT_NATIVE.nii.gz' \ # The fMRI BOLD image data.
112
+
-anat '/Users/dPys/PyNets/tests/examples/sub-002/ses-1/anat/ANAT_PREPROCESSED_NATIVE.nii.gz' \ # The T1w anatomical image. This is mandatory -- PyNets requires a T1/T2-weighted anatomical image unless you are analyzing raw graphs that ahve already been produced.
113
+
-a 'BrainnetomeAtlasFan2016' \ # An anatomical atlas name. Note that if were to omit the `-a` flag, a custom parcellation file would need to be specified using the `-ua` flag instead or a valid clustering mask (`-cm`) would be needed to generate an individual parcellation. For a complete catalogue of anatomical atlases available in PyNets, see the `Usage` section of the documentation.
114
+
-mod 'partcorr' \ # The connectivity model. In the case of structural connectometry, this becomes the diffusion model type.
115
+
-thr 0.20 \ # Optionally apply a single proportional threshold to the generated graph.
116
+
```
117
+
118
+
```
119
+
pynets -id '002_1' '/Users/dPys/outputs/pynets' \ # where `-id` is an arbitrary subject identifier and the first path is an arbitrary output directory to store derivatives of the workflow.
120
+
-dwi '/Users/dPys/PyNets/tests/examples/sub-002/ses-1/dwi/DWI_PREPROCESSED_NATIVE.nii.gz' \ # The dMRI diffusion-weighted image data.
121
+
-bval '/Users/dPys/PyNets/tests/examples/sub-002/ses-1/dwi/BVAL.bval' \ # The b-values.
122
+
-bvec '/Users/dPys/PyNets/tests/examples/sub-002/ses-1/dwi/BVEC.bvec' \ # The b-vectors.
123
+
-anat '/Users/dPys/PyNets/tests/examples/sub-002/ses-1/anat/ANAT_PREPROCESSED_NATIVE.nii.gz' \ # The T1w anatomical image.
124
+
-ua '/Users/dPys/.atlases/MyCustomParcellation-scale1.nii.gz' '/Users/dPys/.atlases/MyCustomParcellation-scale2.nii.gz' \ # The parcellations.
125
+
-mod 'csd' 'csa' 'sfm' \ # The (diffusion) connectivity model(s).
126
+
-dg 'prob' 'det' \ # The tractography direction-getting method.
127
+
-mst -min_thr 0.20 -max_thr 0.80 -step_thr 0.10 # Multi-thresholding from the Minimum-Spanning Tree, with AUC graph analysis.
128
+
-n 'Default' # The resting-state network definition to restrict node-making.
0 commit comments