Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
plugins
GSEA
Commits
fc06322a
Commit
fc06322a
authored
Jan 22, 2020
by
David Hoksza
Browse files
fixed issue with transferring some information between subsequent overlays selections
parent
faaf461b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/js/index.js
View file @
fc06322a
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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