From 9a4252ef72a1a88a32bd3d904a90340b7b44dbe3 Mon Sep 17 00:00:00 2001 From: Eric Weitz Date: Wed, 5 Jan 2022 06:13:41 -0500 Subject: [PATCH] Reduce padding and # labels, fix search bug in Gene Hints --- src/js/annotations/labels.js | 4 ++-- src/js/kit/related-genes.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/annotations/labels.js b/src/js/annotations/labels.js index 55c2a442..33919918 100644 --- a/src/js/annotations/labels.js +++ b/src/js/annotations/labels.js @@ -225,7 +225,7 @@ function fillAnnotLabels(sortedAnnots=[]) { sortedAnnots = ideo.flattenAnnots(); } - const m = 5; // padding + const m = 3; // padding sortedAnnots.forEach((annot, i) => { const layout = getAnnotLabelLayout(annot, ideo); @@ -265,7 +265,7 @@ function fillAnnotLabels(sortedAnnots=[]) { }); - spacedAnnots = applyRankCutoff(spacedAnnots, 20, ideo); + spacedAnnots = applyRankCutoff(spacedAnnots, 10, ideo); // Ensure highest-ranked annots are ordered last in SVG, // to ensure the are written before lower-ranked annots diff --git a/src/js/kit/related-genes.js b/src/js/kit/related-genes.js index e9e4fd87..561dcd68 100644 --- a/src/js/kit/related-genes.js +++ b/src/js/kit/related-genes.js @@ -430,7 +430,7 @@ async function fetchParalogs(annot, ideo) { // Omit genes named like "AC113554.1", which is an "accession.version". // Such accVers are raw and poorly suited here. annots = annots.filter(annot => { - const isAccVer = annot.name.match(/AC[0-9.]+$/); + const isAccVer = annot.name.match(/^AC[0-9.]+$/); return !isAccVer; }); @@ -1047,6 +1047,8 @@ function _initGeneHints(config, annotsInList) { initAnalyzeRelatedGenes(ideogram); + initGeneCache(ideogram.config.organism, ideogram); + return ideogram; }