Pan6461188 commited on
Commit
4dcc0b6
·
1 Parent(s): bcc9868

set msa as list; label as tensor

Browse files
fold_prediction-rag.py → fold_prediction_rag.py RENAMED
@@ -149,11 +149,12 @@ _CITATION = """
149
 
150
  # You can copy an official description
151
  _DESCRIPTION = """
 
152
  """
153
 
154
- _HOMEPAGE = "xxxxx"
155
 
156
- _LICENSE = "xxxxx"
157
 
158
  class DownStreamConfig(datasets.BuilderConfig):
159
  """BuilderConfig for downstream taks dataset."""
@@ -176,7 +177,7 @@ class DownStreamTasks(datasets.GeneratorBasedBuilder):
176
  {
177
  "seq": datasets.Value("string"),
178
  "label": datasets.Value("int32"),
179
- "msa": datasets.Value("string"),
180
  "str_emb": datasets.Array2D(shape=(None, 384), dtype='float32'),
181
  }
182
  )
@@ -264,3 +265,16 @@ class DownStreamTasks(datasets.GeneratorBasedBuilder):
264
  "msa": "|".join(msa),
265
  "str_emb": str_emb
266
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
150
  # You can copy an official description
151
  _DESCRIPTION = """
152
+ Fold class prediction is a scientific classification task that assigns protein sequences to one of 1,195 known folds. The primary application of this task lies in the identification of novel remote homologs among proteins of interest, such as emerging antibiotic-resistant genes and industrial enzymes. The study of protein fold holds great significance in fields like proteomics and structural biology, as it facilitates the analysis of folding patterns, leading to the discovery of remote homologies and advancements in disease research.
153
  """
154
 
155
+ _HOMEPAGE = "https://huggingface.co/datasets/genbio-ai/fold_prediction_rag"
156
 
157
+ _LICENSE = "Apache license 2.0"
158
 
159
  class DownStreamConfig(datasets.BuilderConfig):
160
  """BuilderConfig for downstream taks dataset."""
 
177
  {
178
  "seq": datasets.Value("string"),
179
  "label": datasets.Value("int32"),
180
+ "msa": datasets.Sequence(datasets.Value("string")),
181
  "str_emb": datasets.Array2D(shape=(None, 384), dtype='float32'),
182
  }
183
  )
 
265
  "msa": "|".join(msa),
266
  "str_emb": str_emb
267
  }
268
+
269
+ def _as_dataset(
270
+ self,
271
+ split: Optional[datasets.Split] = None,
272
+ **kwargs
273
+ ) -> datasets.Dataset:
274
+ dataset = super()._as_dataset(split=split, **kwargs)
275
+ dataset.set_format(
276
+ type="numpy",
277
+ columns=["str_emb"],
278
+ output_all_columns=True
279
+ )
280
+ return dataset