Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sshugsc committed Feb 13, 2024
1 parent e7e0f41 commit 7714533
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/cancergenomeinterpreter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const kbParser = require('@bcgsc-pori/graphkb-parser');
const {
loadDelimToJson,
convertRowFields,
hashRecordToId,
} = require('../util');
const {
orderPreferredOntologyTerms, rid,
Expand All @@ -30,7 +29,7 @@ const HEADER = {
evidenceLevel: 'Evidence level',
gene: 'Gene',
genomic: 'gDNA',
protein: 'individual_mutation',
protein: 'protein',
relevance: 'Association',
reviewData: 'Curation date',
reviewer: 'Curator',
Expand Down Expand Up @@ -493,23 +492,23 @@ const uploadFile = async ({

for (let index = 0; index < rows.length; index++) {
let match,
individual_mutation;
protein;

if (match = /^(\w+) \(([A-Z0-9*,;]+)\)$/.exec(rows[index].Biomarker)) {
const mutations = match[2].split(',');

for (let i = 0; i < mutations.length; i++) {
individual_mutation = `${match[1]}:${mutations[i]}`;
protein = `${match[1]}:${mutations[i]}`;
perVariantRows.push({
...rows[i],
individual_mutation,
protein,
sourceId: `${index + 1}:${i + 1}`,
});
}
} else {
perVariantRows.push({
...rows[index],
individual_mutation: '',
protein: '',
sourceId: `${index + 1}`,
});
}
Expand Down

0 comments on commit 7714533

Please sign in to comment.