Skip to content

Commit e59bce8

Browse files
authored
Bugfix: Stockholm parser: always compute derived annotations (#62)
1 parent 1e50bbb commit e59bce8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/common/StockholmAlignment.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,17 @@ export class StockholmAlignment extends Alignment {
176176

177177
for (const seq of sequences) {
178178
const id = seq.annotations[DEFAULT_ANNOTATION_FIELDS.ID];
179+
const description = metadata.GS[id]?.["DE"]?.join("") ?? "";
180+
Object.assign(seq.annotations, parseSequenceAnnotations(id, seq.sequence, description));
179181
if (metadata.GS[id]) {
180-
const description = metadata.GS[id]["DE"]?.join("");
181-
Object.assign(seq.annotations, parseSequenceAnnotations(id, seq.sequence, description));
182182
for (const key of Object.keys(metadata.GS[id])) {
183183
if (key !== "DE") {
184184
seq.annotations[key] = metadata.GS[id][key].join(" ");
185185
}
186186
}
187187
}
188188
}
189-
189+
190190
try {
191191
return new StockholmAlignment({
192192
name: fileName,

0 commit comments

Comments
 (0)