Skip to content

Commit 286d839

Browse files
committed
enable esm2 embeddings for deepgo class
1 parent a2902a6 commit 286d839

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

chebai_proteins/preprocessing/datasets/deepGO/go_uniprot.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,18 @@ class _GOUniProtDataExtractor(_DynamicDataset, ABC):
110110
"CC": "cellular_component", # smallest branch, with 2,000+ GO terms
111111
}
112112

113-
def __init__(self, go_branch: str, max_sequence_len: int = 1002, **kwargs):
113+
READER = None
114+
115+
def __init__(
116+
self,
117+
go_branch: str,
118+
max_sequence_len: int = 1002,
119+
use_esm2_embeddings: bool = False,
120+
**kwargs,
121+
):
122+
if use_esm2_embeddings:
123+
self.READER = dr.ESM2ProteinDataReader
124+
114125
self.go_branch: str = self._get_go_branch(go_branch)
115126

116127
self.max_sequence_length: int = int(max_sequence_len)

0 commit comments

Comments
 (0)