Skip to content

Commit 8922d4d

Browse files
committed
deepgo: minor code change
1 parent 14db9d6 commit 8922d4d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

chebai/preprocessing/datasets/go_uniprot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ def _name(self) -> str:
764764
Returns:
765765
str: A formatted name string for the data.
766766
"""
767-
threshold_part = f"GO{self.THRESHOLD}_" if self.THRESHOLD is not None else ""
767+
threshold_part = f"GO{self.THRESHOLD}_" if self.THRESHOLD is not None else "GO_"
768768

769769
if self.go_branch != self._ALL_GO_BRANCHES:
770770
return f"{threshold_part}{self.go_branch}_{self.max_sequence_length}"

chebai/preprocessing/migration/deep_go/migrate_deep_go_1_data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ def _load_data(self) -> None:
104104
)
105105

106106
except FileNotFoundError as e:
107-
print(f"Error loading data: {e}")
107+
raise FileNotFoundError(
108+
f"Data file not found in directory: {e}. "
109+
"Please ensure all required files are available in the specified directory."
110+
)
108111

109112
@staticmethod
110113
def _get_train_val_split(

chebai/preprocessing/migration/deep_go/migrate_deep_go_2_data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ def _load_data(self) -> None:
9696
pd.read_pickle(os.path.join(self._data_dir, "terms.pkl"))
9797
)
9898
except FileNotFoundError as e:
99-
print(f"Error loading data: {e}")
99+
raise FileNotFoundError(
100+
f"Data file not found in directory: {e}. "
101+
"Please ensure all required files are available in the specified directory."
102+
)
100103

101104
def _record_splits(self) -> pd.DataFrame:
102105
"""

0 commit comments

Comments
 (0)