From 4f884eb14d08515fb79d6eaf10bfbbf5fd8f1ac4 Mon Sep 17 00:00:00 2001 From: mboudet Date: Tue, 11 Jun 2024 15:19:03 +0000 Subject: [PATCH] fix tests --- imports/api/genomes/annotation/addAnnotation.test.js | 2 +- imports/api/genomes/annotation/parser/annotationParserGff3.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imports/api/genomes/annotation/addAnnotation.test.js b/imports/api/genomes/annotation/addAnnotation.test.js index 9772ed6b..1179e144 100644 --- a/imports/api/genomes/annotation/addAnnotation.test.js +++ b/imports/api/genomes/annotation/addAnnotation.test.js @@ -63,7 +63,7 @@ describe('AddAnnotation', function testAnnotation() { chai.assert.equal(gene.start, 13640); chai.assert.equal(gene.end, 15401); - chai.assert.lengthOf(gene.subfeatures, 13, 'Number of subfeatures is not 13'); + chai.assert.lengthOf(gene.subfeatures, 14, 'Number of subfeatures is not 14'); // Check CDS with the same ID has_default_cds = gene.subfeatures.some((sub) => sub.type == "CDS" && sub.ID == "Bni|B01g000010.2N.1.cds1") diff --git a/imports/api/genomes/annotation/parser/annotationParserGff3.js b/imports/api/genomes/annotation/parser/annotationParserGff3.js index 3fb22629..72f2e626 100644 --- a/imports/api/genomes/annotation/parser/annotationParserGff3.js +++ b/imports/api/genomes/annotation/parser/annotationParserGff3.js @@ -395,7 +395,7 @@ class AnnotationProcessor { // Manage case of discontinuous CDS: Same ID -> we add a suffix to avoid crashing if (typeAttr === 'CDS'){ - if identifiant in this.cds_ids: + if (identifiant in this.cds_ids){ identifiant = identifiant + "." + this.cds_ids[identifiant] this.cds_ids[identifiant] += 1 } else {