diff --git a/models/genes.mjs b/models/genes.mjs index bdd5b4eb..af115606 100644 --- a/models/genes.mjs +++ b/models/genes.mjs @@ -8,14 +8,21 @@ const GENE_RENAMES = { FAM214B: "ATOSB", BZRAP1: "TSPOAP1", C19orf60: "REX1BD", + KIAA0100: "BLTP2", + CRAMP1L: "CRAMP1", + TCEB3: "ELOA", }; -export const normalizeGeneName = name => { - const nameNorm = name.replace(/[^a-zA-Z\d]/g, '-'); - if (nameNorm in GENE_RENAMES) return GENE_RENAMES[nameNorm]; - return nameNorm; -} +export const renameGeneIfNeeded = (name) => { + if (name in GENE_RENAMES) return GENE_RENAMES[name]; + return name; +}; + +export const normalizeGeneName = (name) => { + return renameGeneIfNeeded(name.replace(/[^a-zA-Z\d]/g, '-')); +}; export default { + renameGeneIfNeeded, normalizeGeneName, }; diff --git a/scripts/import-genes.mjs b/scripts/import-genes.mjs index 3b86f53a..af10cee5 100644 --- a/scripts/import-genes.mjs +++ b/scripts/import-genes.mjs @@ -26,7 +26,7 @@ const parseGene = line => { const fields = line.trim().split('\t'); return [ Gene.normalizeGeneName(fields[0]), // id - fields[0], // name + Gene.renameGeneIfNeeded(fields[0]), // name ]; };