Skip to content

Commit

Permalink
missing and extra modalities detected by string for subject and timep…
Browse files Browse the repository at this point in the history
…oint in the

CSVCreator missing and extra modalities lists which are long lived
attributes over iterations through subjects and timepoints
  • Loading branch information
brandon-edwards committed Aug 24, 2023
1 parent 99aefe4 commit 2fca4ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlcubes/data_preparation/project/stages/get_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ def execute(self, index: Union[str, int], report: pd.DataFrame) -> pd.DataFrame:
"data_path": tp_out_path,
"labels_path": "",
}
if self.csv_processor.subject_timepoint_missing_modalities:
if f"{id}_{tp}" in self.csv_processor.subject_timepoint_missing_modalities:
shutil.rmtree(tp_out_path, ignore_errors=True)
comment = "There are missing modalities. Please check the data"
report_data["status"] = -1.1
report_data["status_name"] = "MISSING_MODALITIES"
report_data["data_path"] = tp_path
report_data["comment"] = comment
elif self.csv_processor.subject_timepoint_extra_modalities:
elif f"{id}_{tp}" in self.csv_processor.subject_timepoint_extra_modalities:
shutil.rmtree(tp_out_path, ignore_errors=True)
comment = "There are extra modalities. Please check the data"
report_data["status"] = -1.2
Expand Down

0 comments on commit 2fca4ca

Please sign in to comment.