Commit 5a088347 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

always show gentic data overlays

parent 375a3081
Pipeline #47688 passed with stage
in 18 minutes and 10 seconds
minerva (16.0.0~beta.3) stable; urgency=medium
* Bug fix: show genetic data overlays in InfoWindow even when no data is
available (#1562)
* Bug fix: speed of opening map is improved (#1558)
* Bug fix: typo (#1555)
* Bug fix: gene mapping with empty url caused issues when opening info window
......@@ -8,7 +10,7 @@ minerva (16.0.0~beta.3) stable; urgency=medium
* Bug fix: sometimes wrong icn numbers were attached to search results
(#1556)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 27 Sep 2021 08:00:00 +0200
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 27 Sep 2021 14:00:00 +0200
minerva (16.0.0~beta.2) stable; urgency=medium
* Small improvement: backgrounds are separated from general overlays (#1532)
......
......@@ -366,6 +366,12 @@ AliasInfoWindow.prototype.adjustPileupRangeVisibility = function (pileupRange) {
pileupRange.stop += Math.ceil((50 - dist) / 2);
}
if (pileupRange.stop < pileupRange.start) {
var tmp = pileupRange.stop;
pileupRange.stop = pileupRange.start;
pileupRange.start = tmp;
}
if (pileupRange.start < 0) {
pileupRange.stop -= pileupRange.start;
pileupRange.start = 0;
......@@ -414,8 +420,12 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) {
var promises = [];
var overlaysData = [];
overlays.forEach(function (overlay) {
var overlayGeneticInformation = [];
overlays.forEach(function (overlay, index) {
promises.push(overlay.getFullAliasesById(self.getAlias().getId()));
globalGeneVariants[index] = [];
overlayGeneticInformation[index] = (overlay.getType() === LayoutAlias.GENETIC_VARIANT);
if (overlay.getType() === LayoutAlias.GENETIC_VARIANT) {
geneticInformation = true;
promises.push(self.getCustomMap().getTopMap().getReferenceGenome(overlay.getGenomeType(),
......@@ -429,7 +439,7 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) {
logger.warn("Genome for " + overlay.getGenomeType() + ","
+ overlay.getGenomeVersion() + " not loaded");
}
}, function () {
}).catch(function () {
logger.warn("Genome for " + overlay.getGenomeType() + ","
+ overlay.getGenomeVersion() + " not loaded");
......@@ -472,7 +482,6 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) {
}
for (i = 0; i < overlaysData.length; i++) {
var data = overlaysData[i];
globalGeneVariants[i] = [];
if (data !== null && data !== undefined && data.getType() === LayoutAlias.GENETIC_VARIANT) {
var geneVariants = data.getGeneVariants();
for (var j = 0; j < geneVariants.length; j++) {
......@@ -495,9 +504,12 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) {
contentElement.innerHTML = "No reference genome defined for this MINERVA instance, cannot display variant data.";
}
} else {
for (i = 0; i < overlaysData.length; i++) {
if (globalGeneVariants[i].length > 0) {
var vcfContent = self.createVcfString(globalGeneVariants[i]);
for (i = 0; i < overlays.length; i++) {
var vcfContent = undefined;
if (overlayGeneticInformation[i]) {
vcfContent = self.createVcfString(globalGeneVariants[i]);
}
if (vcfContent !== undefined) {
pileupSource.push({
viz: pileup.viz.variants(),
data: pileup.formats.vcf({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment