Commit 26d702c3 authored by David Hoksza's avatar David Hoksza
Browse files

fix situtation when a pathway is obtained before any species

parent abcb5bc1
Pipeline #15708 passed with stage
in 1 minute
require('../css/styles.css');
const pluginName = 'GSEA';
const pluginVersion = '0.9.0';
const pluginVersion = '0.9.1';
const globals = {
models: {},
......@@ -196,6 +196,17 @@ function calculatePathways() {
modelAllProteinRnaGene[modelId] = [];
}
if (!(modelId in globals.ModelPathway)) {
globals.ModelPathway[modelId] = {};
//empty pathway name stands for the whole submap
globals.ModelPathway[modelId][''] = {
bioEntities: [],
hgncNames: new Set(),
pVal: undefined
};
modelHgncs[modelId] = [];
}
if (eType === "Pathway") {
pwIdName[e.id] = e.getName();
const pwName = e.getName();
......@@ -214,17 +225,6 @@ function calculatePathways() {
const hgncs = [...new Set(e.getReferences().filter(ref => ref.getType() === "HGNC_SYMBOL").map(ann => ann.getResource()))];
globals.hgncProteinRnaGene[e.id] = hgncs;
if (!(modelId in globals.ModelPathway)) {
globals.ModelPathway[modelId] = {};
//empty pathway name stands for the whole submap
globals.ModelPathway[modelId][''] = {
bioEntities: [],
hgncNames: new Set(),
pVal: undefined
};
modelHgncs[modelId] = [];
}
if (hgncs.length > 0) {
//empty pathway name stands for the whole (sub)map
modelHgncs[modelId]= modelHgncs[modelId].concat(hgncs);
......
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