Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions cubids/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ def _parse_copy_exemplars():
type=PathExists,
action="store",
help=(
"absolute path to the root of a BIDS dataset "
"containing one subject from each Acquisition Group. "
"name of the directory to create where to store exemplar dataset. "
"It will include one subject from each Acquisition Group. "
"It should contain sub-X directories and "
"dataset_description.json."
),
Expand All @@ -454,9 +454,12 @@ def _parse_copy_exemplars():
type=IsFile,
action="store",
help=(
"absolute path to the .tsv file that lists one "
"path to the .tsv that lists one "
"subject from each Acquisition Group "
"(*_AcqGrouping.tsv from the cubids-group output)"
"(*_AcqGrouping.tsv from the cubids-group output). "
"If the file is located in the code/CuBIDS "
"directory, then users can just pass the .tsv "
"filename instead of the full path "
),
)
parser.add_argument(
Expand Down Expand Up @@ -489,6 +492,12 @@ def _parse_copy_exemplars():
action="store",
help="Docker image tag or Singularity image file.",
)
parser.add_argument(
"--force-unlock",
action="store_true",
default=False,
help="unlock dataset before adding nifti info ",
)
return parser


Expand Down
8 changes: 6 additions & 2 deletions cubids/cubids.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def apply_tsv_changes(self, summary_tsv, files_tsv, new_prefix, raise_on_error=T

full_cmd = "\n".join(merge_commands + move_ops)
if full_cmd:
renames = new_prefix + "_full_cmd.sh"
renames = str(Path(self.path) / (new_prefix + "_full_cmd.sh"))

# write full_cmd to a .sh file
with open(renames, "w") as fo:
Expand Down Expand Up @@ -683,7 +683,11 @@ def copy_exemplars(self, exemplars_dir, exemplars_tsv, min_group_size):
exemplars_dir,
]
)

if os.sep not in str(exemplars_tsv):
if not self.cubids_code_dir:
self.create_cubids_code_dir()
exemplars_tsv = self.path + "/code/CuBIDS/" + exemplars_tsv

# load the exemplars tsv
subs = pd.read_table(exemplars_tsv)

Expand Down
Loading