-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* saving full cmd in real_params.json + solved some bugs
- Loading branch information
1 parent
8483483
commit 47449ae
Showing
4 changed files
with
75 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
# Kepkee Loh ([email protected]) | ||
# Julien Sein ([email protected]) | ||
|
||
import sys | ||
import os | ||
import os.path as op | ||
|
||
|
@@ -80,7 +81,7 @@ | |
############################################################################### | ||
|
||
|
||
def create_main_workflow(data_dir, process_dir, soft, species, datatypes, | ||
def create_main_workflow(cmd, data_dir, process_dir, soft, species, datatypes, | ||
subjects, sessions, acquisitions, reconstructions, | ||
params_file, indiv_params_file, mask_file, | ||
template_path, template_files, nprocs, reorient, | ||
|
@@ -455,6 +456,8 @@ def create_main_workflow(data_dir, process_dir, soft, species, datatypes, | |
# saving real params.json | ||
params["macapype_version"] = __version__ | ||
|
||
params["full_command"] = cmd | ||
|
||
real_params_file = op.join(process_dir, wf_name, "real_params.json") | ||
with open(real_params_file, 'w+') as fp: | ||
json.dump(params, fp) | ||
|
@@ -553,9 +556,12 @@ def main(): | |
|
||
args = parser.parse_args() | ||
|
||
cmd = " ".join(sys.argv) | ||
|
||
# main_workflow | ||
print("Initialising the pipeline...") | ||
create_main_workflow( | ||
cmd=cmd, | ||
data_dir=args.data, | ||
soft=args.soft, | ||
process_dir=args.out, | ||
|