EC2 Default User
commited on
Commit
·
319c343
1
Parent(s):
fc382c2
remove unzip
Browse files- oas-paired-sequence-data.py +16 -17
oas-paired-sequence-data.py
CHANGED
@@ -122,21 +122,20 @@ class OasPairedSequenceData(datasets.GeneratorBasedBuilder):
|
|
122 |
|
123 |
def _generate_examples(self, filepaths):
|
124 |
for filepath in filepaths:
|
125 |
-
with
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
}
|
142 |
|
|
|
122 |
|
123 |
def _generate_examples(self, filepaths):
|
124 |
for filepath in filepaths:
|
125 |
+
with open(filepath, "r") as f:
|
126 |
+
reader = csv.reader(f, delimiter=",")
|
127 |
+
for key, row in enumerate(reader):
|
128 |
+
if key < 2:
|
129 |
+
continue
|
130 |
+
else:
|
131 |
+
yield key - 2, {
|
132 |
+
"sequence_alignment_aa_heavy": row[10],
|
133 |
+
"cdr1_aa_heavy": row[35],
|
134 |
+
"cdr2_aa_heavy": row[39],
|
135 |
+
"cdr3_aa_heavy": row[43],
|
136 |
+
"sequence_alignment_aa_light": row[100],
|
137 |
+
"cdr1_aa_light": row[123],
|
138 |
+
"cdr2_aa_light": row[127],
|
139 |
+
"cdr3_aa_light": row[131],
|
140 |
+
}
|
|
|
141 |
|