oceanproc 1.3.1__tar.gz → 1.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {oceanproc-1.3.1 → oceanproc-1.3.2}/PKG-INFO +1 -1
  2. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/ocean_proc.py +4 -4
  3. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/preprocessing_wrapper.py +9 -1
  4. {oceanproc-1.3.1 → oceanproc-1.3.2}/pyproject.toml +1 -1
  5. {oceanproc-1.3.1 → oceanproc-1.3.2}/README.md +0 -0
  6. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/__init__.py +0 -0
  7. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/bids_wrapper.py +0 -0
  8. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/events_long.py +0 -0
  9. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/firstlevel/__init__.py +0 -0
  10. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/firstlevel/run_glm.py +0 -0
  11. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/firstlevel/tests/__init__.py +0 -0
  12. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/firstlevel/tests/test_run_glm.py +0 -0
  13. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/group_series.py +0 -0
  14. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/grouplevel/__init__.py +0 -0
  15. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/grouplevel/computations.py +0 -0
  16. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/grouplevel/design_mat_utils.py +0 -0
  17. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/grouplevel/dscalar_utils.py +0 -0
  18. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/grouplevel/utils.py +0 -0
  19. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/oceanparse.py +0 -0
  20. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/segmentation_wrapper.py +0 -0
  21. {oceanproc-1.3.1 → oceanproc-1.3.2}/oceanproc/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oceanproc
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: MRI preprocessing for WUSTL Ocean labs
5
5
  Author-Email: Ramone Agard <rhagard@wustl.edu>, Joey Scanga <joeyscanga92@gmail.com>
6
6
  Requires-Python: <3.13,>=3.10
@@ -103,7 +103,7 @@ def main():
103
103
  epilog="An arguments file can be accepted with @FILEPATH.\nAny additional arguments not listed in the help message will be passed to the preprocessing subprocess.",
104
104
  allow_abbrev=False
105
105
  )
106
- parser.add_argument("--version", action="version", version='%(prog)s v1.3.1')
106
+ parser.add_argument("--version", action="version", version='%(prog)s v1.3.2')
107
107
  session_args = parser.add_argument_group("Session Specific")
108
108
  config_args = parser.add_argument_group("Configuration Arguments", "These arguments are saved to a file if the '--export_args' option is used")
109
109
 
@@ -157,11 +157,11 @@ def main():
157
157
  help="framewise displacement threshold (in mm) to determine outlier framee (Default is 0.9).")
158
158
  config_args.add_argument("--skip_bids_validation", action=argparse.BooleanOptionalAction,
159
159
  help="Specifies skipping BIDS validation (only enabled for fMRIprep step)")
160
- config_args.add_argument("--fs_subjects_dir", "-fs", type=ExistingDir,
160
+ config_args.add_argument("--fs_subjects_dir", "--fs-subjects-dir", "-fs", type=ExistingDir, dest="fs_subjects_dir",
161
161
  help="The path to the directory that contains previous FreeSurfer outputs/derivatives to use for fMRIPrep. If empty, this is the path where new FreeSurfer outputs will be stored.")
162
162
  config_args.add_argument("--allow_uneven_fmap_groups", action="store_true",
163
163
  help="Flag to allow for automated fieldmap pairing when there's more AP- than PA-encoded fieldmaps, or vice versa (will still error out if at least one of each is not present.)")
164
- config_args.add_argument("--extract_best_fmap", action="store_true",
164
+ config_args.add_argument("--extract_best_fmap", action=argparse.BooleanOptionalAction,
165
165
  help="Flag to specify that the lowest variance fieldmap volume should be extracted from each fieldmap, and used for distortion correction (opposed to all volumes being used)")
166
166
  config_args.add_argument("--dscans_path", type=ExistingDir,
167
167
  help="""The path to the directory containing 'dscans' files for inserting dummy scans into bold runs. Must be named exactly as corresponding bold image except with 'dscans' as
@@ -170,7 +170,7 @@ def main():
170
170
  help="A list of paths to any BIDS-style precomputed derivatives that should be used in preprocessing. (Ex. /path/to/bibsnet)")
171
171
  config_args.add_argument("--work_dir", "-w", type=ExistingDir, required=True,
172
172
  help="The path to the working directory used to store intermediate files")
173
- config_args.add_argument("--fs_license", "-l", type=ExistingFile, required=True,
173
+ config_args.add_argument("--fs_license", "--fs-license-file", "-l", type=ExistingFile, dest="fs_license", required=True,
174
174
  help="The path to the license file for the local installation of FreeSurfer")
175
175
  config_args.add_argument("--image_version", "-iv", default=None,
176
176
  help=f"""The version of fmriprep to use; It is reccomended that an entire study use the same version.
@@ -13,6 +13,7 @@ import nibabel as nib
13
13
  import json
14
14
  import os
15
15
  import copy
16
+ import subprocess
16
17
  from types import SimpleNamespace
17
18
 
18
19
  logger = logging.getLogger(__name__)
@@ -86,6 +87,13 @@ def run_preprocessing(subject:str,
86
87
  mount_flag = "-B"
87
88
  else:
88
89
  cmd_prelude = f"docker run --rm -i -u {flags.uid}:{flags.gid}"
90
+ import grp
91
+ mygids = (
92
+ grp.getgrnam(groupname).gr_gid for groupname in
93
+ subprocess.run('groups', capture_output=True).stdout.decode().strip().split()
94
+ )
95
+ for mygid in mygids:
96
+ cmd_prelude += f" --group-add {mygid} "
89
97
  mount_flag = "-v"
90
98
 
91
99
  additional_mount_paths = []
@@ -407,4 +415,4 @@ def process_data(subject:str,
407
415
  )
408
416
 
409
417
  if not preproc_success:
410
- exit_program_early(f"Program '{preproc_title}' has run into an error.")
418
+ exit_program_early(f"Program '{preproc_title}' has run into an error.")
@@ -34,7 +34,7 @@ dependencies = [
34
34
  "pybids>=0.16.3",
35
35
  ]
36
36
  name = "oceanproc"
37
- version = "1.3.1"
37
+ version = "1.3.2"
38
38
  description = "MRI preprocessing for WUSTL Ocean labs"
39
39
  readme = "README.md"
40
40
 
File without changes
File without changes