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
1edd2369
Commit
1edd2369
authored
Jul 02, 2019
by
Piotr Gawron
Browse files
Merge remote-tracking branch 'origin/devel_13.1.x' into merge-13.1.1
parents
1645df37
6b41b024
Pipeline
#11322
passed with stage
in 10 minutes and 6 seconds
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
1edd2369
...
...
@@ -27,6 +27,18 @@ minerva (14.0.0~alpha.0) unstable; urgency=low
--
Sascha
Herzinger
<
sascha
.
herzinger
@
uni
.
lu
>
Wed
,
22
May
2019
10
:
30
:
00
+
0200
minerva
(
13.1.1
)
stable
;
urgency
=
medium
*
Bug
fix
:
adding
gene
mapping
before
the
genome
caused
an
error
(#
835
)
*
Bug
fix
:
"Terms of Use"
change
to
"Terms of Service"
in
all
places
(#
843
)
*
Bug
fix
:
upgrade
to
13.1.0
crashed
on
machines
where
every
element
was
inside
compartment
(#
856
)
*
Bug
fix
:
searching
for
some
drugs
in
chembl
didn
't provide any results even
though that data exists, for instance '
DORLIMOMAB
ARITOX
' (#842)
* Bug fix: user wasn'
t
logged
out
in
all
tabs
when
the
log
out
event
appeard
in
only
one
of
them
(#
847
)
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Tue
,
2
Jul
2019
19
:
00
:
00
+
0200
minerva
(
13.1.0
)
stable
;
urgency
=
medium
*
Feature
:
annotators
are
more
flexible
-
you
can
define
set
of
input
and
outputs
used
by
annotator
(#
617
)
...
...
annotation/src/main/java/lcsb/mapviewer/annotation/services/ChEMBLParser.java
View file @
1edd2369
...
...
@@ -256,12 +256,15 @@ public class ChEMBLParser extends DrugAnnotation implements IExternalService {
MiriamData
result
=
null
;
Node
uniprotAccessionId
=
XmlParser
.
getNode
(
"accession"
,
targetComponent
.
getChildNodes
());
if
(
uniprotAccessionId
!=
null
)
{
try
{
result
=
uniprotAnnotator
.
uniProtToHgnc
(
new
MiriamData
(
MiriamType
.
UNIPROT
,
uniprotAccessionId
.
getTextContent
()));
result
.
setAnnotator
(
null
);
}
catch
(
UniprotSearchException
e
)
{
throw
new
DrugSearchException
(
e
);
String
uniprotId
=
uniprotAccessionId
.
getTextContent
();
if
(
uniprotId
!=
null
&&
!
uniprotId
.
isEmpty
())
{
try
{
result
=
uniprotAnnotator
.
uniProtToHgnc
(
new
MiriamData
(
MiriamType
.
UNIPROT
,
uniprotId
));
result
.
setAnnotator
(
null
);
}
catch
(
UniprotSearchException
e
)
{
throw
new
DrugSearchException
(
e
);
}
}
}
return
result
;
...
...
annotation/src/test/java/lcsb/mapviewer/annotation/services/ChEMBLParserTest.java
View file @
1edd2369
...
...
@@ -273,6 +273,19 @@ public class ChEMBLParserTest extends AnnotationTestFunctions {
}
@Test
public
void
testGetTargetWithRnaComponent
()
throws
Exception
{
try
{
Target
test
=
chemblParser
.
getTargetFromId
(
new
MiriamData
(
MiriamType
.
CHEMBL_TARGET
,
"CHEMBL2363135"
));
assertEquals
(
test
.
getSource
().
getResource
(),
"CHEMBL2363135"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
e
;
}
}
@Test
public
void
testGetTargetFromInvalidId
()
throws
Exception
{
try
{
...
...
frontend-js/src/main/js/ServerConnector.js
View file @
1edd2369
...
...
@@ -99,6 +99,30 @@ ServerConnector.getMinOverlayColorInt = function () {
});
};
ServerConnector
.
checkIfUserLogoutFromDifferentTab
=
function
()
{
var
self
=
this
;
var
sessionLogin
=
self
.
getSessionData
(
null
).
getLogin
();
var
tabLogin
=
self
.
_currentTabLogin
;
if
(
tabLogin
===
undefined
)
{
self
.
_currentTabLogin
=
ServerConnector
.
getSessionData
(
null
).
getLogin
();
tabLogin
=
self
.
_currentTabLogin
;
}
if
(
tabLogin
!==
sessionLogin
)
{
setTimeout
(
function
()
{
var
sessionLogin
=
self
.
getSessionData
(
null
).
getLogin
();
var
tabLogin
=
self
.
_currentTabLogin
;
if
(
tabLogin
!==
sessionLogin
)
{
logger
.
warn
(
"
User was log out in different tab. Reloading page
"
);
window
.
location
.
reload
(
false
);
}
},
100
);
}
};
setInterval
(
function
()
{
ServerConnector
.
checkIfUserLogoutFromDifferentTab
();
},
1000
);
ServerConnector
.
returnUserOrSystemColor
=
function
(
userColor
,
systemPromisedColor
)
{
return
systemPromisedColor
.
then
(
function
(
systemColor
)
{
var
color
=
userColor
;
...
...
@@ -1884,9 +1908,10 @@ ServerConnector.login = function (login, password) {
if
(
data
[
"
login
"
]
!==
undefined
)
{
params
.
login
=
data
[
"
login
"
];
}
self
.
_currentTabLogin
=
params
.
login
;
self
.
getSessionData
().
setLogin
(
params
.
login
);
return
Promise
.
resolve
(
self
.
getSessionData
().
getToken
());
}
,
function
(
error
)
{
}
).
catch
(
function
(
error
)
{
if
(
error
instanceof
NetworkError
&&
error
.
statusCode
===
HttpStatus
.
FORBIDDEN
)
{
throw
new
InvalidCredentialsError
(
"
Invalid credentials
"
);
}
else
{
...
...
@@ -2822,5 +2847,4 @@ ServerConnector.submitErrorToMinervaNet = function (report, callback) {
},
callback
);
};
module
.
exports
=
ServerConnector
;
frontend-js/src/main/js/gui/admin/EditGenomeDialog.js
View file @
1edd2369
...
...
@@ -175,7 +175,8 @@ EditGenomeDialog.prototype.createGeneMappingTabContent = function () {
var
result
=
Functions
.
createElement
({
type
:
"
div
"
,
style
:
"
margin-top:10px;
"
style
:
"
margin-top:10px;
"
,
className
:
"
minerva-gene-mapping-tab
"
});
var
geneMappingTable
=
Functions
.
createElement
({
...
...
@@ -513,6 +514,10 @@ EditGenomeDialog.prototype.refresh = function () {
//it should be simplified, but I couldn't make it work
dataTable
.
clear
().
rows
.
add
(
data
).
page
(
page
).
draw
(
false
).
page
(
page
).
draw
(
false
);
if
(
self
.
isNew
())
{
guiUtils
.
disableTab
(
$
(
"
.minerva-gene-mapping-tab
"
,
self
.
getElement
())[
0
],
"
First add a genome to be able to add mapping
"
);
}
return
self
.
_fillOrganismSelect
(
genome
);
});
};
...
...
frontend-js/src/main/js/minerva.js
View file @
1edd2369
...
...
@@ -127,7 +127,7 @@ function requestConsent(user, termsOfUseUrl) {
var
dialogContent
=
document
.
createElement
(
"
div
"
);
dialogContent
.
appendChild
(
functions
.
createElement
({
type
:
"
span
"
,
content
:
"
I agree to the minerva <a href='
"
+
termsOfUseUrl
+
"
' target='_blank'>Terms of
Us
e</a>.
"
,
content
:
"
I agree to the minerva <a href='
"
+
termsOfUseUrl
+
"
' target='_blank'>Terms of
Servic
e</a>.
"
,
xss
:
false
}));
var
checkbox
=
functions
.
createElement
({
type
:
"
input
"
,
inputType
:
"
checkbox
"
,
style
:
"
float: left
"
});
...
...
@@ -167,7 +167,7 @@ function requestConsent(user, termsOfUseUrl) {
},
modal
:
true
,
closeOnEscape
:
false
,
title
:
"
Terms of
Us
e
"
title
:
"
Terms of
Servic
e
"
}).
siblings
(
'
.ui-dialog-titlebar
'
).
css
(
"
background
"
,
"
red
"
);
$
(
"
.ui-dialog-titlebar-close
"
,
$
(
dialog
).
dialog
().
siblings
(
'
.ui-dialog-titlebar
'
)).
hide
();
$
(
dialog
).
dialog
(
"
open
"
);
...
...
frontend-js/src/test/js/ServerConnector-mock.js
View file @
1edd2369
...
...
@@ -43,6 +43,10 @@ function encodeParams(params) {
return
result
;
}
ServerConnectorMock
.
checkIfUserLogoutFromDifferentTab
=
function
()
{
logger
.
debug
(
"
checkIfUserLogoutFromDifferentTab is ignored
"
);
};
ServerConnectorMock
.
_sendRequest
=
function
(
params
)
{
var
self
=
this
;
var
url
=
params
.
url
;
...
...
persist/src/main/resources/db/migration/13.1.0~alpha.0/V13.1.0.20190503__z_index_to_elements_added.sql
View file @
1edd2369
...
...
@@ -2,6 +2,8 @@
alter
table
element_table
add
column
z
integer
;
alter
table
reaction_table
add
column
z
integer
;
--add artificial element outside compartment, so the update queries will always return non-null values
insert
into
element_table
(
id
,
element_type_db
,
visibility_level
,
width
,
height
)
values
(
-
1
,
'GENERIC_PROTEIN'
,
0
,
1
,
1
);
with
v_element_table
as
(
...
...
@@ -69,3 +71,6 @@ update element_table set z = (select max(z) from element_table) where z is null;
ALTER
TABLE
element_table
ALTER
COLUMN
z
SET
NOT
NULL
;
ALTER
TABLE
reaction_table
ALTER
COLUMN
z
SET
NOT
NULL
;
--remove artificial element added at the beginning of the script
delete
from
element_table
where
id
=
-
1
;
rest-api/src/main/java/lcsb/mapviewer/api/BaseRestImpl.java
View file @
1edd2369
...
...
@@ -491,7 +491,7 @@ public abstract class BaseRestImpl {
return
result
;
}
protected
Integer
parseInteger
(
Object
value
)
throws
QueryException
{
protected
Integer
parseInteger
(
Object
value
,
String
fieldName
)
throws
QueryException
{
if
(
value
instanceof
Integer
)
{
return
(
Integer
)
value
;
}
else
if
(
value
instanceof
Double
)
{
...
...
@@ -506,12 +506,16 @@ public abstract class BaseRestImpl {
try
{
return
Integer
.
parseInt
((
String
)
value
);
}
catch
(
NumberFormatException
e
)
{
throw
new
QueryException
(
"Invalid
integer
value: "
+
value
);
throw
new
QueryException
(
"Invalid
"
+
fieldName
+
"
value: "
+
value
);
}
}
}
else
{
throw
new
QueryException
(
"Invalid
integer
value: "
+
value
);
throw
new
QueryException
(
"Invalid
"
+
fieldName
+
"
value: "
+
value
);
}
}
protected
Integer
parseInteger
(
Object
value
)
throws
QueryException
{
return
parseInteger
(
value
,
"integer"
);
}
}
rest-api/src/main/java/lcsb/mapviewer/api/genomics/ReferenceGenomeRestImpl.java
View file @
1edd2369
...
...
@@ -256,8 +256,9 @@ public class ReferenceGenomeRestImpl extends BaseRestImpl {
if
(!
getUserService
().
userHasPrivilege
(
token
,
PrivilegeType
.
MANAGE_GENOMES
))
{
throw
new
SecurityException
(
"Access denied"
);
}
int
id
=
Integer
.
parseInt
(
genomeId
);
int
id
=
parseInt
eger
(
genomeId
,
"genomeId"
);
try
{
ReferenceGenome
genome
=
referenceGenomeService
.
getReferenceGenomeById
(
id
,
token
);
String
name
=
getFirstValue
(
formData
.
get
(
"name"
));
...
...
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