Skip to content

Commit

Permalink
Merge pull request #1 from bcgsc/feature/fix-typo
Browse files Browse the repository at this point in the history
Fix spelling error in generating statement templates
  • Loading branch information
creisle authored Jan 19, 2021
2 parents f769ed7 + aaea21d commit bfc1e7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/sentenceTemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
6 changes: 3 additions & 3 deletions test/sentenceTemplates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down Expand Up @@ -58,15 +58,15 @@ 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);
});
});

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: [
{
Expand Down

0 comments on commit bfc1e7d

Please sign in to comment.