Skip to content

Commit

Permalink
Merge pull request #2126 from birajstha/bids_ingress
Browse files Browse the repository at this point in the history
added sub- and ses- in the relative paths
  • Loading branch information
birajstha authored Jun 27, 2024
2 parents ee092d6 + b1bbc36 commit 4aab3f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CPAC/pipeline/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,10 @@ def __init__(self, row, CpacProvenance=()):
self.finfo = {k: v for k, v in row.items() if k.startswith('finfo')}
self.metadata = row['meta__json']
self.filename = self.finfo['finfo__file_path'].split("/")[-1]
self.rel_path = f"{self.entity['ent__sub']}/{self.entity['ent__ses']}/{self.entity['ent__datatype']}"
self.rel_path = f"sub-{self.entity['ent__sub']}"
if self.entity['ent__ses'] != "None":
self.rel_path += f"/ses-{self.entity['ent__ses']}"
self.rel_path += f"/{self.entity['ent__datatype']}"

super().__init__(
self.ds['ds__dataset'],
Expand Down

0 comments on commit 4aab3f7

Please sign in to comment.