feat: add chromatin access support
Browse files- agro-nt-tasks.py +7 -10
agro-nt-tasks.py
CHANGED
|
@@ -4,13 +4,9 @@
|
|
| 4 |
"""TODO: Add a description here."""
|
| 5 |
|
| 6 |
|
| 7 |
-
import csv
|
| 8 |
-
import json
|
| 9 |
import os
|
| 10 |
from typing import List
|
| 11 |
from Bio import SeqIO
|
| 12 |
-
import numpy as np
|
| 13 |
-
|
| 14 |
import datasets
|
| 15 |
|
| 16 |
|
|
@@ -57,14 +53,13 @@ _TASK_NAMES = ['poly_a.arabidopsis_thaliana',
|
|
| 57 |
'gene_exp.solanum_lycopersicum',
|
| 58 |
'gene_exp.zea_mays',
|
| 59 |
'gene_exp.arabidopsis_thaliana',
|
| 60 |
-
'chromatin_access.arabidopis_thaliana',
|
| 61 |
-
'chromatin_access.sorghum_bicolor',
|
| 62 |
-
'chromatin_access.oryza_sativa_ZS97_RS2',
|
| 63 |
'chromatin_access.oryza_sativa_MH63_RS2',
|
| 64 |
-
'chromatin_access.zea_mays',
|
| 65 |
-
'chromatin_access.brachypodium_distachyon',
|
| 66 |
'chromatin_access.setaria_italica',
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
|
| 70 |
_TASK_INFO = {'poly_a':{'type': 'binary', 'val_set':False},
|
|
@@ -117,6 +112,8 @@ class AgroNtTasks(datasets.GeneratorBasedBuilder):
|
|
| 117 |
feature_dit["label"] = datasets.Value("float32")
|
| 118 |
elif self.config.task_type == 'multi_regression':
|
| 119 |
feature_dit['labels'] = [datasets.Value("float32")]
|
|
|
|
|
|
|
| 120 |
|
| 121 |
features = datasets.Features(feature_dit)
|
| 122 |
|
|
|
|
| 4 |
"""TODO: Add a description here."""
|
| 5 |
|
| 6 |
|
|
|
|
|
|
|
| 7 |
import os
|
| 8 |
from typing import List
|
| 9 |
from Bio import SeqIO
|
|
|
|
|
|
|
| 10 |
import datasets
|
| 11 |
|
| 12 |
|
|
|
|
| 53 |
'gene_exp.solanum_lycopersicum',
|
| 54 |
'gene_exp.zea_mays',
|
| 55 |
'gene_exp.arabidopsis_thaliana',
|
|
|
|
|
|
|
|
|
|
| 56 |
'chromatin_access.oryza_sativa_MH63_RS2',
|
|
|
|
|
|
|
| 57 |
'chromatin_access.setaria_italica',
|
| 58 |
+
'chromatin_access.oryza_sativa_ZS97_RS2',
|
| 59 |
+
'chromatin_access.arabidopis_thaliana',
|
| 60 |
+
'chromatin_access.brachypodium_distachyon',
|
| 61 |
+
'chromatin_access.sorghum_bicolor',
|
| 62 |
+
'chromatin_access.zea_mays',]
|
| 63 |
|
| 64 |
|
| 65 |
_TASK_INFO = {'poly_a':{'type': 'binary', 'val_set':False},
|
|
|
|
| 112 |
feature_dit["label"] = datasets.Value("float32")
|
| 113 |
elif self.config.task_type == 'multi_regression':
|
| 114 |
feature_dit['labels'] = [datasets.Value("float32")]
|
| 115 |
+
elif self.config.task_type == 'multi_label':
|
| 116 |
+
feature_dit['labels'] = [datasets.Value("int8")]
|
| 117 |
|
| 118 |
features = datasets.Features(feature_dit)
|
| 119 |
|