Skip to content

Commit

Permalink
Merge pull request #426 from dPys/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
dPys authored Aug 25, 2020
2 parents 2d3e1f2 + eced3a7 commit 9385bc9
Show file tree
Hide file tree
Showing 18 changed files with 315 additions and 132 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ where the `-config` flag specifies that path to a .json configuration spec that
"es": "['mean', 'median']" # Indicates the method(s) of nodal time-series signal extraction.
},
"dwi": { # dMRI options. If you only have structural (i.e. DWI) data, set each of the `func` options to "None"
"dg": "None",
"ml": "None",
"mod": "None",
"em": "None"
"dg": "det", # The directional assumptions of tractography (e.g. deterministic, probabilistic)
"ml": "40", # The minimum length criterion for streamlines in tractography
"mod": "csd", # The diffusion model type
"tol": "8" # The tolerance distance (in the units of the streamlines, usually mm). If any node in the streamline is within this distance from the center of any voxel in the ROI, then the connection is counted as an edge"
},
"gen": { # These are general options that apply to all modalities
"a": "['BrainnetomeAtlasFan2016', 'atlas_harvard_oxford', 'destrieux2009_rois']", # Anatomical atlases to define nodes.
Expand Down
2 changes: 1 addition & 1 deletion pynets/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# from ._version import get_versions
# __version__ = get_versions()['version']
# del get_versions
__version__ = "1.0.11"
__version__ = "1.0.12"

__packagename__ = "pynets"
__copyright__ = "Copyright 2017, Derek Pisner"
Expand Down
11 changes: 7 additions & 4 deletions pynets/cli/pynets_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def get_parser():
"minimums, separate the list by space (e.g. 10 30 50).\n",
)
parser.add_argument(
"-em",
"-tol",
metavar="Error margin",
default=8,
nargs="+",
Expand Down Expand Up @@ -761,7 +761,7 @@ def build_workflow(args, retval):
int(list(psutil.virtual_memory())[4]/1000000000) - 2]
else:
procmem = list(eval(str(resources)))
procmem[1] = procmem[1] - 2
procmem[1] = procmem[1] - 1
if args.thr is None:
thr = float(1.0)
else:
Expand Down Expand Up @@ -832,6 +832,8 @@ def build_workflow(args, retval):
else:
extract_strategy_list = None
roi = args.roi
if isinstance(roi, list):
roi = roi[0]
conn_model = args.mod
if conn_model:
if (isinstance(conn_model, list)) and (len(conn_model) > 1):
Expand Down Expand Up @@ -985,7 +987,7 @@ def build_workflow(args, retval):
min_length_list = None
else:
min_length_list = None
error_margin = args.em
error_margin = args.tol
if error_margin:
if (isinstance(error_margin, list)) and (len(error_margin) > 1):
error_margin_list = error_margin
Expand Down Expand Up @@ -1843,7 +1845,8 @@ def build_workflow(args, retval):
'roi_neighborhood_tol preset cannot be less than '
'the value of the structural connectome error_margin'
' parameter.')
print(f"{Fore.GREEN}Iterating minimum streamline lengths:")
print(f"{Fore.GREEN}Iterating ROI-streamline intersection "
f"tolerance:")
print(f"{Fore.BLUE}{', '.join(error_margin_list)}")

if target_samples:
Expand Down
2 changes: 1 addition & 1 deletion pynets/config/bids_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dg": "['prob', 'det']",
"ml": "['10', '40']",
"mod": "['csd', 'csa']",
"em": 8
"tol": 8
},
"func": {
"ct": "['rena', 'ward', 'kmeans']",
Expand Down
2 changes: 1 addition & 1 deletion pynets/config/bids_config_anatomical_atlases.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dg": "['det', 'prob', 'clos']",
"ml": "['0', '20', '40']",
"mod": "['csd', 'csa', 'tensor', 'sfm']",
"em": 8
"tol": 8
},
"func": {
"ct": "None",
Expand Down
2 changes: 1 addition & 1 deletion pynets/config/bids_config_anatomical_atlases_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dg": "['prob']",
"ml": "['0']",
"mod": "['csd']",
"em": 8
"tol": 8
},
"func": {
"ct": "None",
Expand Down
3 changes: 2 additions & 1 deletion pynets/config/bids_config_bold.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"dwi": {
"dg": "None",
"ml": "None",
"mod": "None"
"mod": "None",
"tol": "None"
},
"func": {
"ct": "None",
Expand Down
2 changes: 1 addition & 1 deletion pynets/config/bids_config_clustering.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dg": "None",
"ml": "None",
"mod": "None",
"em": "None"
"tol": "None"
},
"func": {
"ct": "['rena']",
Expand Down
2 changes: 1 addition & 1 deletion pynets/config/bids_config_dwi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dg": "['det', 'prob']",
"ml": "['0', '20']",
"mod": "['csa']",
"em": 8
"tol": 8
},
"func": {
"ct": "None",
Expand Down
2 changes: 1 addition & 1 deletion pynets/config/bids_config_embed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dg": "['clos']",
"ml": "['0']",
"mod": "['csa']",
"em": 8
"tol": 8
},
"func": {
"ct": "None",
Expand Down
2 changes: 1 addition & 1 deletion pynets/config/bids_config_rsns.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dg": "['clos']",
"ml": "['0']",
"mod": "['csa']",
"em": 8
"tol": 8
},
"func": {
"ct": "None",
Expand Down
2 changes: 1 addition & 1 deletion pynets/config/bids_config_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dg": "None",
"ml": "None",
"mod": "None",
"em": "None"
"tol": "None"
},
"func": {
"ct": "None",
Expand Down
Loading

0 comments on commit 9385bc9

Please sign in to comment.