Skip to content

Commit

Permalink
[FIX] Fix OASIS1 BIDSSubjectID Method (aramis-lab#1312)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceJoubert authored Oct 4, 2024
1 parent 0d4309b commit 2623ab5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clinica/iotools/bids_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def from_original_study_id(cls, study_id: str) -> str:
)

def to_original_study_id(self) -> str:
return "OAS1" + self.split("OASIS1")[1] + "MR1"
return f"OAS1_{self.split('OASIS1')[1]}_MR1"


class OASIS3BIDSSubjectID(BIDSSubjectID):
Expand Down
3 changes: 1 addition & 2 deletions test/unittests/iotools/test_bids_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def test_study_to_bids_id_value_error(study, study_id):
(StudyName.GENFI, "MAPT009", "sub-MAPT009"),
(StudyName.OASIS3, "OAS30001", "sub-OAS30001"),
(StudyName.HABS, "P_INIBUB", "sub-HABSINIBUB"),
# (StudyName.OASIS, "OAS1_0001_MR1", "sub-OASIS10001"),
# todo : check OASIS
(StudyName.OASIS, "OAS1_0001_MR1", "sub-OASIS10001"),
(StudyName.IXI, "IXI001", "sub-IXI001"),
],
)
Expand Down

0 comments on commit 2623ab5

Please sign in to comment.