Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
akhanf committed Dec 20, 2024
1 parent e3b0af9 commit 0d9b01d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
13 changes: 8 additions & 5 deletions hippunfold/config/snakebids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,6 @@ parse_args:
nargs: '+'
help: 'Run hipp (CA + subiculum) alone or include dentate (default: %(default)s)'

--workdir:
help: 'Folder for storing working files, if not specified, will make a temporary folder with tempfile.mkdtemp() (default: %(default)s)'
default: None
type: Path

--force_nnunet_model:
help: 'Force nnunet model to use (expert option). (default: %(default)s)'
default: False
Expand All @@ -294,6 +289,14 @@ parse_args:
action: "store_false"
default: True

--workdir:
help: |
Folder for storing working files. If not specified, a temporary folder
will be made in your system's temp directory (e.g. /tmp). You can also
use environment variables when setting the workdir, e.g. --workdir '$SLURM_TMPDIR'.
default: null
type: str


--version:
help: 'Print the version of HippUnfold'
Expand Down
7 changes: 3 additions & 4 deletions hippunfold/workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import snakebids
from snakebids import bids, set_bids_spec
from tempfile import mkdtemp


configfile: "config/snakebids.yml"


Expand Down Expand Up @@ -94,13 +95,11 @@ wildcard_constraints:
template="[a-zA-Z0-9]+",


#root = os.path.normpath(os.path.join(config["root"], "hippunfold"))
#work = os.path.normpath(os.path.join(config["root"], "work"))

root = os.path.expandvars(config["root"])
if config["workdir"] == None:
config["workdir"] = mkdtemp()
work = os.path.expandvars(config["workdir"])
root = os.path.expandvars(config["root"])


include: "rules/common.smk"
include: "rules/download.smk"
Expand Down
3 changes: 0 additions & 3 deletions hippunfold/workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ if "corobl" in ref_spaces:
"cp {input} {output}"



def get_download_dir():
if "HIPPUNFOLD_CACHE_DIR" in os.environ.keys():
download_dir = os.environ["HIPPUNFOLD_CACHE_DIR"]
Expand All @@ -385,5 +384,3 @@ def get_download_dir():
dirs = AppDirs("hippunfold", "khanlab")
download_dir = dirs.user_cache_dir
return download_dir


0 comments on commit 0d9b01d

Please sign in to comment.