Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Devrim Gunyel
core
Commits
c017f87a
Commit
c017f87a
authored
May 28, 2019
by
Piotr Gawron
Browse files
export of reaction with two modifiers connected with operator was skipping some points
parent
9d49eb0b
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
c017f87a
...
...
@@ -2,8 +2,11 @@ minerva (14.0.0~alpha.0) unstable; urgency=low
*
Feature
:
log4j
is
replaced
with
log4j2
logging
mechanism
(#
291
)
*
Feature
:
database
installed
via
debian
package
is
done
via
dbconfig
-
commons
(#
469
)
*
Feature
:
Replaced
connection
pool
manager
C3P0
with
better
maintained
Hikari
(#
564
)
*
Feature
:
Replaced
connection
pool
manager
C3P0
with
better
maintained
Hikari
(#
564
)
*
Feature
removal
:
BioCompendium
annotator
removed
(#
32
)
*
Bug
fix
:
export
to
CellDesigner
of
reaction
with
two
modifiers
connected
with
boolean
operator
resulted
was
skipping
some
layout
information
--
Sascha
Herzinger
<
sascha
.
herzinger
@
uni
.
lu
>
Wed
,
22
May
2019
10
:
30
:
00
+
0200
...
...
converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/reaction/ReactionToXml.java
View file @
c017f87a
...
...
@@ -292,7 +292,7 @@ public class ReactionToXml {
line
=
line
.
reverse
();
List
<
Point2D
>
points
=
lineTransformation
.
getPointsFromLine
(
line
);
sb
.
append
(
" editPoints=\""
);
for
(
int
i
=
1
;
i
<
points
.
size
()
-
1
;
i
++)
{
for
(
int
i
=
0
;
i
<
points
.
size
();
i
++)
{
sb
.
append
(
points
.
get
(
i
).
getX
()
+
","
+
points
.
get
(
i
).
getY
()
+
" "
);
}
sb
.
append
(
line
.
getEndPoint
().
getX
()
+
","
+
line
.
getEndPoint
().
getY
());
...
...
converter-CellDesigner/src/test/java/lcsb/mapviewer/converter/model/celldesigner/reaction/ReactionParserTests.java
View file @
c017f87a
...
...
@@ -1843,6 +1843,25 @@ public class ReactionParserTests extends CellDesignerTestFunctions {
}
}
@Test
public
void
testModifierWithOperator
()
throws
Exception
{
try
{
Model
model
=
getModelForFile
(
"testFiles/reactions/modifier_with_operator.xml"
);
Reaction
reaction
=
model
.
getReactionByReactionId
(
"re1"
);
assertEquals
(
3
,
reaction
.
getOperators
().
iterator
().
next
().
getLine
().
getPoints
().
size
());
assertEquals
(
3
,
reaction
.
getModifiers
().
get
(
0
).
getLine
().
getPoints
().
size
());
assertEquals
(
3
,
reaction
.
getModifiers
().
get
(
1
).
getLine
().
getPoints
().
size
());
Model
model2
=
super
.
serializeModel
(
model
);
reaction
=
model2
.
getReactionByReactionId
(
"re1"
);
assertEquals
(
3
,
reaction
.
getOperators
().
iterator
().
next
().
getLine
().
getPoints
().
size
());
assertEquals
(
3
,
reaction
.
getModifiers
().
get
(
0
).
getLine
().
getPoints
().
size
());
assertEquals
(
3
,
reaction
.
getModifiers
().
get
(
1
).
getLine
().
getPoints
().
size
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
e
;
}
}
@Test
public
void
testProblematicHeterodimerAssociation
()
throws
Exception
{
Model
model
;
...
...
converter-CellDesigner/testFiles/reactions/modifier_with_operator.xml
0 → 100644
View file @
c017f87a
<?xml version="1.0" encoding="UTF-8"?>
<sbml
xmlns=
"http://www.sbml.org/sbml/level2/version4"
xmlns:celldesigner=
"http://www.sbml.org/2001/ns/celldesigner"
level=
"2"
version=
"4"
>
<model
metaid=
"untitled"
id=
"untitled"
>
<annotation>
<celldesigner:extension>
<celldesigner:modelVersion>
4.0
</celldesigner:modelVersion>
<celldesigner:modelDisplay
sizeX=
"600"
sizeY=
"400"
/>
<celldesigner:listOfCompartmentAliases/>
<celldesigner:listOfComplexSpeciesAliases/>
<celldesigner:listOfSpeciesAliases>
<celldesigner:speciesAlias
id=
"sa1"
species=
"s1"
>
<celldesigner:activity>
inactive
</celldesigner:activity>
<celldesigner:bounds
x=
"74.0"
y=
"204.0"
w=
"80.0"
h=
"40.0"
/>
<celldesigner:font
size=
"12"
/>
<celldesigner:view
state=
"usual"
/>
<celldesigner:usualView>
<celldesigner:innerPosition
x=
"0.0"
y=
"0.0"
/>
<celldesigner:boxSize
width=
"80.0"
height=
"40.0"
/>
<celldesigner:singleLine
width=
"1.0"
/>
<celldesigner:paint
color=
"ffccffcc"
scheme=
"Color"
/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition
x=
"0.0"
y=
"0.0"
/>
<celldesigner:boxSize
width=
"80.0"
height=
"60.0"
/>
<celldesigner:singleLine
width=
"0.0"
/>
<celldesigner:paint
color=
"3fff0000"
scheme=
"Color"
/>
</celldesigner:briefView>
<celldesigner:info
state=
"empty"
angle=
"-1.5707963267948966"
/>
</celldesigner:speciesAlias>
<celldesigner:speciesAlias
id=
"sa2"
species=
"s2"
>
<celldesigner:activity>
inactive
</celldesigner:activity>
<celldesigner:bounds
x=
"306.0"
y=
"207.0"
w=
"80.0"
h=
"40.0"
/>
<celldesigner:font
size=
"12"
/>
<celldesigner:view
state=
"usual"
/>
<celldesigner:usualView>
<celldesigner:innerPosition
x=
"0.0"
y=
"0.0"
/>
<celldesigner:boxSize
width=
"80.0"
height=
"40.0"
/>
<celldesigner:singleLine
width=
"1.0"
/>
<celldesigner:paint
color=
"ffccffcc"
scheme=
"Color"
/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition
x=
"0.0"
y=
"0.0"
/>
<celldesigner:boxSize
width=
"80.0"
height=
"60.0"
/>
<celldesigner:singleLine
width=
"0.0"
/>
<celldesigner:paint
color=
"3fff0000"
scheme=
"Color"
/>
</celldesigner:briefView>
<celldesigner:info
state=
"empty"
angle=
"-1.5707963267948966"
/>
</celldesigner:speciesAlias>
<celldesigner:speciesAlias
id=
"sa3"
species=
"s3"
>
<celldesigner:activity>
inactive
</celldesigner:activity>
<celldesigner:bounds
x=
"59.0"
y=
"49.0"
w=
"80.0"
h=
"40.0"
/>
<celldesigner:font
size=
"12"
/>
<celldesigner:view
state=
"usual"
/>
<celldesigner:usualView>
<celldesigner:innerPosition
x=
"0.0"
y=
"0.0"
/>
<celldesigner:boxSize
width=
"80.0"
height=
"40.0"
/>
<celldesigner:singleLine
width=
"1.0"
/>
<celldesigner:paint
color=
"ffccffcc"
scheme=
"Color"
/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition
x=
"0.0"
y=
"0.0"
/>
<celldesigner:boxSize
width=
"80.0"
height=
"60.0"
/>
<celldesigner:singleLine
width=
"0.0"
/>
<celldesigner:paint
color=
"3fff0000"
scheme=
"Color"
/>
</celldesigner:briefView>
<celldesigner:info
state=
"empty"
angle=
"-1.5707963267948966"
/>
</celldesigner:speciesAlias>
<celldesigner:speciesAlias
id=
"sa4"
species=
"s4"
>
<celldesigner:activity>
inactive
</celldesigner:activity>
<celldesigner:bounds
x=
"254.0"
y=
"75.0"
w=
"80.0"
h=
"40.0"
/>
<celldesigner:font
size=
"12"
/>
<celldesigner:view
state=
"usual"
/>
<celldesigner:usualView>
<celldesigner:innerPosition
x=
"0.0"
y=
"0.0"
/>
<celldesigner:boxSize
width=
"80.0"
height=
"40.0"
/>
<celldesigner:singleLine
width=
"1.0"
/>
<celldesigner:paint
color=
"ffccffcc"
scheme=
"Color"
/>
</celldesigner:usualView>
<celldesigner:briefView>
<celldesigner:innerPosition
x=
"0.0"
y=
"0.0"
/>
<celldesigner:boxSize
width=
"80.0"
height=
"60.0"
/>
<celldesigner:singleLine
width=
"0.0"
/>
<celldesigner:paint
color=
"3fff0000"
scheme=
"Color"
/>
</celldesigner:briefView>
<celldesigner:info
state=
"empty"
angle=
"-1.5707963267948966"
/>
</celldesigner:speciesAlias>
</celldesigner:listOfSpeciesAliases>
<celldesigner:listOfGroups/>
<celldesigner:listOfProteins>
<celldesigner:protein
id=
"pr1"
name=
"s1"
type=
"GENERIC"
/>
<celldesigner:protein
id=
"pr2"
name=
"s2"
type=
"GENERIC"
/>
<celldesigner:protein
id=
"pr3"
name=
"s3"
type=
"GENERIC"
/>
<celldesigner:protein
id=
"pr4"
name=
"s4"
type=
"GENERIC"
/>
</celldesigner:listOfProteins>
<celldesigner:listOfGenes/>
<celldesigner:listOfRNAs/>
<celldesigner:listOfAntisenseRNAs/>
<celldesigner:listOfLayers/>
<celldesigner:listOfBlockDiagrams/>
</celldesigner:extension>
</annotation>
<listOfUnitDefinitions>
<unitDefinition
metaid=
"substance"
id=
"substance"
name=
"substance"
>
<listOfUnits>
<unit
metaid=
"CDMT00005"
kind=
"mole"
/>
</listOfUnits>
</unitDefinition>
<unitDefinition
metaid=
"volume"
id=
"volume"
name=
"volume"
>
<listOfUnits>
<unit
metaid=
"CDMT00006"
kind=
"litre"
/>
</listOfUnits>
</unitDefinition>
<unitDefinition
metaid=
"area"
id=
"area"
name=
"area"
>
<listOfUnits>
<unit
metaid=
"CDMT00007"
kind=
"metre"
exponent=
"2"
/>
</listOfUnits>
</unitDefinition>
<unitDefinition
metaid=
"length"
id=
"length"
name=
"length"
>
<listOfUnits>
<unit
metaid=
"CDMT00008"
kind=
"metre"
/>
</listOfUnits>
</unitDefinition>
<unitDefinition
metaid=
"time"
id=
"time"
name=
"time"
>
<listOfUnits>
<unit
metaid=
"CDMT00009"
kind=
"second"
/>
</listOfUnits>
</unitDefinition>
</listOfUnitDefinitions>
<listOfCompartments>
<compartment
metaid=
"default"
id=
"default"
size=
"1"
units=
"volume"
/>
</listOfCompartments>
<listOfSpecies>
<species
metaid=
"s1"
id=
"s1"
name=
"s1"
compartment=
"default"
initialAmount=
"0"
>
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>
inside
</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>
PROTEIN
</celldesigner:class>
<celldesigner:proteinReference>
pr1
</celldesigner:proteinReference>
</celldesigner:speciesIdentity>
</celldesigner:extension>
</annotation>
</species>
<species
metaid=
"s2"
id=
"s2"
name=
"s2"
compartment=
"default"
initialAmount=
"0"
>
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>
inside
</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>
PROTEIN
</celldesigner:class>
<celldesigner:proteinReference>
pr2
</celldesigner:proteinReference>
</celldesigner:speciesIdentity>
</celldesigner:extension>
</annotation>
</species>
<species
metaid=
"s3"
id=
"s3"
name=
"s3"
compartment=
"default"
initialAmount=
"0"
>
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>
inside
</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>
PROTEIN
</celldesigner:class>
<celldesigner:proteinReference>
pr3
</celldesigner:proteinReference>
</celldesigner:speciesIdentity>
<celldesigner:listOfCatalyzedReactions>
<celldesigner:catalyzed
reaction=
"re1"
/>
</celldesigner:listOfCatalyzedReactions>
</celldesigner:extension>
</annotation>
</species>
<species
metaid=
"s4"
id=
"s4"
name=
"s4"
compartment=
"default"
initialAmount=
"0"
>
<annotation>
<celldesigner:extension>
<celldesigner:positionToCompartment>
inside
</celldesigner:positionToCompartment>
<celldesigner:speciesIdentity>
<celldesigner:class>
PROTEIN
</celldesigner:class>
<celldesigner:proteinReference>
pr4
</celldesigner:proteinReference>
</celldesigner:speciesIdentity>
<celldesigner:listOfCatalyzedReactions>
<celldesigner:catalyzed
reaction=
"re1"
/>
</celldesigner:listOfCatalyzedReactions>
</celldesigner:extension>
</annotation>
</species>
</listOfSpecies>
<listOfReactions>
<reaction
metaid=
"re1"
id=
"re1"
reversible=
"false"
>
<annotation>
<celldesigner:extension>
<celldesigner:reactionType>
STATE_TRANSITION
</celldesigner:reactionType>
<celldesigner:baseReactants>
<celldesigner:baseReactant
species=
"s1"
alias=
"sa1"
>
<celldesigner:linkAnchor
position=
"INACTIVE"
/>
</celldesigner:baseReactant>
</celldesigner:baseReactants>
<celldesigner:baseProducts>
<celldesigner:baseProduct
species=
"s2"
alias=
"sa2"
>
<celldesigner:linkAnchor
position=
"INACTIVE"
/>
</celldesigner:baseProduct>
</celldesigner:baseProducts>
<celldesigner:connectScheme
connectPolicy=
"direct"
rectangleIndex=
"0"
>
<celldesigner:listOfLineDirection>
<celldesigner:lineDirection
index=
"0"
value=
"unknown"
/>
</celldesigner:listOfLineDirection>
</celldesigner:connectScheme>
<celldesigner:line
width=
"1.0"
color=
"ff000000"
/>
<celldesigner:listOfModification>
<celldesigner:modification
type=
"BOOLEAN_LOGIC_GATE_AND"
modifiers=
"s3,s4"
aliases=
"sa3,sa4"
modificationType=
"CATALYSIS"
targetLineIndex=
"-1,2"
editPoints=
"0.3679805529917881,0.3895642712552996 206.66666666666666,126.0"
>
<celldesigner:connectScheme
connectPolicy=
"direct"
>
<celldesigner:listOfLineDirection>
<celldesigner:lineDirection
index=
"0"
value=
"unknown"
/>
<celldesigner:lineDirection
index=
"1"
value=
"unknown"
/>
</celldesigner:listOfLineDirection>
</celldesigner:connectScheme>
<celldesigner:line
width=
"1.0"
color=
"ff000000"
/>
</celldesigner:modification>
<celldesigner:modification
type=
"CATALYSIS"
modifiers=
"s3"
aliases=
"sa3"
editPoints=
"0.5027027027027031,-0.31493598862019895"
>
<celldesigner:connectScheme
connectPolicy=
"direct"
>
<celldesigner:listOfLineDirection>
<celldesigner:lineDirection
index=
"0"
value=
"unknown"
/>
<celldesigner:lineDirection
index=
"1"
value=
"unknown"
/>
</celldesigner:listOfLineDirection>
</celldesigner:connectScheme>
<celldesigner:linkTarget
species=
"s3"
alias=
"sa3"
>
<celldesigner:linkAnchor
position=
"INACTIVE"
/>
</celldesigner:linkTarget>
<celldesigner:line
width=
"1.0"
color=
"ff000000"
/>
</celldesigner:modification>
<celldesigner:modification
type=
"CATALYSIS"
modifiers=
"s4"
aliases=
"sa4"
editPoints=
"0.6153467972520144,0.6324634831097264"
>
<celldesigner:connectScheme
connectPolicy=
"direct"
>
<celldesigner:listOfLineDirection>
<celldesigner:lineDirection
index=
"0"
value=
"unknown"
/>
<celldesigner:lineDirection
index=
"1"
value=
"unknown"
/>
</celldesigner:listOfLineDirection>
</celldesigner:connectScheme>
<celldesigner:linkTarget
species=
"s4"
alias=
"sa4"
>
<celldesigner:linkAnchor
position=
"INACTIVE"
/>
</celldesigner:linkTarget>
<celldesigner:line
width=
"1.0"
color=
"ff000000"
/>
</celldesigner:modification>
</celldesigner:listOfModification>
</celldesigner:extension>
</annotation>
<listOfReactants>
<speciesReference
metaid=
"CDMT00001"
species=
"s1"
>
<annotation>
<celldesigner:extension>
<celldesigner:alias>
sa1
</celldesigner:alias>
</celldesigner:extension>
</annotation>
</speciesReference>
</listOfReactants>
<listOfProducts>
<speciesReference
metaid=
"CDMT00002"
species=
"s2"
>
<annotation>
<celldesigner:extension>
<celldesigner:alias>
sa2
</celldesigner:alias>
</celldesigner:extension>
</annotation>
</speciesReference>
</listOfProducts>
<listOfModifiers>
<modifierSpeciesReference
metaid=
"CDMT00003"
species=
"s3"
>
<annotation>
<celldesigner:extension>
<celldesigner:alias>
sa3
</celldesigner:alias>
</celldesigner:extension>
</annotation>
</modifierSpeciesReference>
<modifierSpeciesReference
metaid=
"CDMT00004"
species=
"s4"
>
<annotation>
<celldesigner:extension>
<celldesigner:alias>
sa4
</celldesigner:alias>
</celldesigner:extension>
</annotation>
</modifierSpeciesReference>
</listOfModifiers>
</reaction>
</listOfReactions>
</model>
</sbml>
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