From aaea21d31235f0867b61f9d417bb53596ef6ddd2 Mon Sep 17 00:00:00 2001 From: Caralyn Reisle Date: Tue, 19 Jan 2021 14:30:50 -0800 Subject: [PATCH] Fix spelling error in generating statement templates --- src/sentenceTemplates.js | 2 +- test/sentenceTemplates.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sentenceTemplates.js b/src/sentenceTemplates.js index 27a2e80..0c73a5a 100644 --- a/src/sentenceTemplates.js +++ b/src/sentenceTemplates.js @@ -27,7 +27,7 @@ const DEFAULT_TEMPLATE = `Given ${ const chooseDefaultTemplate = (record) => { const conditionTypes = record.conditions.map(c => c['@class'].toLowerCase()); const multiVariant = conditionTypes.filter(t => t.endsWith('variant')).length > 1 - ? 'Co-occurence of ' + ? 'Co-occurrence of ' : ''; const hasVariant = conditionTypes.some(t => t.endsWith('variant')); const hasDisease = conditionTypes.includes('disease'); diff --git a/test/sentenceTemplates.test.js b/test/sentenceTemplates.test.js index 72a9685..08b8e0f 100644 --- a/test/sentenceTemplates.test.js +++ b/test/sentenceTemplates.test.js @@ -14,7 +14,7 @@ describe('generateStatementSentence', () => { test('multiple variants predict prognosis in disease', () => { const key = 'subject:Vocabulary|conditions:Disease;PositionalVariant;PositionalVariant;Vocabulary|relevance:favourable prognosis'; - const result = 'Co-occurence of chr19:y.qcopyloss, and chr1:y.pcopyloss predicts favourable prognosis in anaplastic oligodendroglioma [C4326]'; + const result = 'Co-occurrence of chr19:y.qcopyloss, and chr1:y.pcopyloss predicts favourable prognosis in anaplastic oligodendroglioma [C4326]'; const { content } = generateStatementSentence(schemaDefn, examples[key]); expect(content.replace(' ({evidence})', '')).toEqual(result); }); @@ -58,7 +58,7 @@ describe('generateStatementSentence', () => { test('multiple variants result in sensitivity to therapy', () => { const key = 'subject:Therapy|conditions:Disease;PositionalVariant;PositionalVariant;Therapy|relevance:sensitivity'; - const result = 'Co-occurence of KIT:p.V560D, and KIT:p.D820G is associated with sensitivity to imatinib [DB00619] in gastrointestinal stromal tumor [C3868]'; + const result = 'Co-occurrence of KIT:p.V560D, and KIT:p.D820G is associated with sensitivity to imatinib [DB00619] in gastrointestinal stromal tumor [C3868]'; const { content } = generateStatementSentence(schemaDefn, examples[key]); expect(content.replace(' ({evidence})', '')).toEqual(result); }); @@ -66,7 +66,7 @@ describe('generateStatementSentence', () => { describe('functional effects', () => { test('co-occuring variants result in tumourigenesis', () => { - const result = 'Co-occurence of PARK2 copy loss, and APC mutation contributes to tumourigenesis of colorectal cancer'; + const result = 'Co-occurrence of PARK2 copy loss, and APC mutation contributes to tumourigenesis of colorectal cancer'; const input = { conditions: [ {