Commit fc06322a authored by David Hoksza's avatar David Hoksza
Browse files

fixed issue with transferring some information between subsequent overlays selections

parent faaf461b
......@@ -5,13 +5,13 @@ const pluginVersion = '0.9.1';
const globals = {
models: {},
selected: [],
// selected: [],
allBioEntities: [],
hgncProteinRnaGene: {},
allProteinRnaGene: [],
modelBioentities: {},
ModelPathway: {},
quickAliases: []
// quickAliases: []
};
// ******************************************************************************
......@@ -270,7 +270,7 @@ function calculateGSEA() {
return minervaProxy.project.map.getVisibleDataOverlays()
}).then(function (overlays) {
if (overlays.length == 0) {
if (overlays.length === 0) {
alert("No overlay selected");
return;
}
......@@ -304,11 +304,11 @@ function calculateGSEA() {
var N = globals.allProteinRnaGene.length;
var n = ovHgncNames.size;
// console.log('pw', pwName);
// console.log('m', m);
// console.log('k', k);
// console.log('N', N);
// console.log('n', n);
console.log('pw', pwName);
console.log('m', m);
console.log('k', k);
console.log('N', N);
console.log('n', n);
if (k > 0) {
//var px = (kcomb(m,k)*kcomb(N-m,n-k))/kcomb(N,n);
......@@ -320,6 +320,8 @@ function calculateGSEA() {
pwModelId: modelId
});
cntPVals += 1;
} else {
pw.pVal = undefined;
}
});
});
......@@ -379,7 +381,7 @@ function calculateGSEA() {
return a.adjustedPVal - b.adjustedPVal;
}).forEach(p => {
const pValText = p.adjustedPVal < 0.0001 ? "< 0.0001" : `${p.adjustedPVal.toFixed(4)}`;
if (p.pw.bioEntities.length == 0) {
if (p.pw.bioEntities.length === 0) {
const $title = $mapResultsPanel.find(".panel-title");
$mapResultsPanel.find(".panel-title").text(`${$title.text()} (enriched with adj. p-val ${pValText})`);
return;
......
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