Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce label noise, omit accessions, fix search bug in Gene Hints #290

Merged
merged 2 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/js/annotations/labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion src/js/kit/related-genes.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,16 @@ async function fetchParalogs(annot, ideo) {
const homologs = ensemblHomologs.data[0].homologies;

// Fetch positions of paralogs
const annots =
let annots =
await fetchParalogPositionsFromMyGeneInfo(homologs, 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.]+$/);
return !isAccVer;
});

return annots;
}

Expand Down Expand Up @@ -1040,6 +1047,8 @@ function _initGeneHints(config, annotsInList) {

initAnalyzeRelatedGenes(ideogram);

initGeneCache(ideogram.config.organism, ideogram);

return ideogram;
}

Expand Down