Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
553efe16
Commit
553efe16
authored
Apr 21, 2021
by
Piotr Gawron
Browse files
genome information is stored in data overlay
parent
6776cd9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/map/data/DataOverlay.js
View file @
553efe16
...
...
@@ -33,6 +33,10 @@ function DataOverlay(overlayId, name) {
this
.
setGoogleLicenseConsent
(
object
.
googleLicenseConsent
);
this
.
setInputDataAvailable
(
object
.
inputDataAvailable
);
this
.
setType
(
object
.
type
);
if
(
this
.
getType
()
===
LayoutAlias
.
GENETIC_VARIANT
)
{
this
.
setGenomeVersion
(
object
.
genomeVersion
);
this
.
setGenomeType
(
object
.
genomeType
);
}
if
(
!
this
.
getInputDataAvailable
())
{
this
.
setInitialized
(
true
);
}
...
...
@@ -390,6 +394,38 @@ DataOverlay.prototype.setType = function (type) {
this
.
_type
=
type
;
};
/**
*
* @returns {string}
*/
DataOverlay
.
prototype
.
getGenomeType
=
function
()
{
return
this
.
_genomeType
;
};
/**
*
* @param {string} type
*/
DataOverlay
.
prototype
.
setGenomeType
=
function
(
type
)
{
this
.
_genomeType
=
type
;
};
/**
*
* @returns {string}
*/
DataOverlay
.
prototype
.
getGenomeVersion
=
function
()
{
return
this
.
_genomeVersion
;
};
/**
*
* @param {string} version
*/
DataOverlay
.
prototype
.
setGenomeVersion
=
function
(
version
)
{
this
.
_genomeVersion
=
version
;
};
/**
*
* @param {boolean} value
...
...
frontend-js/src/main/js/map/window/AliasInfoWindow.js
View file @
553efe16
...
...
@@ -403,35 +403,30 @@ AliasInfoWindow.prototype.createGenomicDiv = function (params) {
overlays
.
forEach
(
function
(
overlay
)
{
promises
.
push
(
overlay
.
getFullAliasesById
(
self
.
getAlias
().
getId
()));
if
(
overlay
.
getType
()
===
LayoutAlias
.
GENETIC_VARIANT
)
{
geneticInformation
=
true
;
promises
.
push
(
self
.
getCustomMap
().
getTopMap
().
getReferenceGenome
(
overlay
.
getGenomeType
(),
overlay
.
getGenomeVersion
()).
then
(
function
(
genome
)
{
if
(
genome
.
getUrl
()
!==
null
&&
genome
.
getUrl
()
!==
undefined
)
{
if
(
genomes
[
genome
.
getUrl
()]
===
undefined
)
{
genomes
[
genome
.
getUrl
()]
=
genome
;
genomeUrls
.
push
(
genome
.
getUrl
());
}
}
else
{
logger
.
warn
(
"
Genome for
"
+
overlay
.
getGenomeType
()
+
"
,
"
+
overlay
.
getGenomeVersion
()
+
"
not loaded
"
);
}
},
function
()
{
logger
.
warn
(
"
Genome for
"
+
overlay
.
getGenomeType
()
+
"
,
"
+
overlay
.
getGenomeVersion
()
+
"
not loaded
"
);
}));
}
});
return
Promise
.
all
(
promises
).
then
(
function
(
result
)
{
promises
=
[];
result
.
forEach
(
function
(
overlayEntries
)
{
overlaysData
=
overlaysData
.
concat
(
overlayEntries
);
for
(
var
i
=
0
;
i
<
overlayEntries
.
length
;
i
++
)
{
var
data
=
overlayEntries
[
i
];
if
(
data
!==
null
&&
data
!==
undefined
&&
data
.
getType
()
===
LayoutAlias
.
GENETIC_VARIANT
)
{
geneticInformation
=
true
;
promises
.
push
(
Promise
.
each
(
data
.
getGeneVariants
(),
function
(
variant
)
{
return
self
.
getCustomMap
().
getTopMap
().
getReferenceGenome
(
variant
.
getReferenceGenomeType
(),
variant
.
getReferenceGenomeVersion
()).
then
(
function
(
genome
)
{
if
(
genome
.
getUrl
()
!==
null
&&
genome
.
getUrl
()
!==
undefined
)
{
if
(
genomes
[
genome
.
getUrl
()]
===
undefined
)
{
genomes
[
genome
.
getUrl
()]
=
genome
;
genomeUrls
.
push
(
genome
.
getUrl
());
}
}
else
{
logger
.
warn
(
"
Genome for
"
+
variant
.
getReferenceGenomeType
()
+
"
,
"
+
variant
.
getReferenceGenomeVersion
()
+
"
not loaded
"
);
}
},
function
()
{
logger
.
warn
(
"
Genome for
"
+
variant
.
getReferenceGenomeType
()
+
"
,
"
+
variant
.
getReferenceGenomeVersion
()
+
"
not loaded
"
);
});
}));
}
}
});
return
Promise
.
all
(
promises
);
}).
then
(
function
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment