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
7cc8ba6b
Commit
7cc8ba6b
authored
Nov 06, 2019
by
Piotr Gawron
Browse files
modification residues were not layouted inside complexes
parent
06772034
Pipeline
#16308
passed with stage
in 16 minutes and 45 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
7cc8ba6b
...
...
@@ -3,6 +3,8 @@ minerva (14.0.3) stable; urgency=medium
due
to
problems
with
identifiers
used
by
SBGN
(#
1006
)
*
Bug
fix
:
upload
of
data
overlay
with
conflicting
overlay
types
caused
error
(#
998
)
*
Bug
fix
:
upload
of
sbml
file
with
protein
modifications
inside
complex
crashed
visualization
(#
966
)
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Wed
,
06
Nov
2019
12
:
00
:
00
+
0200
...
...
model-command/src/main/java/lcsb/mapviewer/commands/layout/ApplySimpleLayoutModelCommand.java
View file @
7cc8ba6b
...
...
@@ -318,9 +318,12 @@ public class ApplySimpleLayoutModelCommand extends ApplyLayoutModelCommand {
element
.
setX
(
elementCenterX
-
SPECIES_WIDTH
/
2
);
element
.
setY
(
elementCenterY
-
SPECIES_HEIGHT
/
2
);
index
++;
if
(
element
instanceof
SpeciesWithModificationResidue
)
{
modifyElementModificationResiduesLocation
((
SpeciesWithModificationResidue
)
element
);
}
}
}
for
(
Species
element
:
speciesList
)
{
if
(
element
instanceof
SpeciesWithModificationResidue
)
{
modifyElementModificationResiduesLocation
((
SpeciesWithModificationResidue
)
element
);
}
}
...
...
model-command/src/test/java/lcsb/mapviewer/commands/layout/ApplySimpleLayoutModelCommandTest.java
View file @
7cc8ba6b
...
...
@@ -19,6 +19,7 @@ import lcsb.mapviewer.model.map.model.ModelFullIndexed;
import
lcsb.mapviewer.model.map.reaction.*
;
import
lcsb.mapviewer.model.map.reaction.type.TransportReaction
;
import
lcsb.mapviewer.model.map.species.*
;
import
lcsb.mapviewer.model.map.species.field.BindingRegion
;
import
lcsb.mapviewer.model.map.species.field.Residue
;
public
class
ApplySimpleLayoutModelCommandTest
extends
CommandTestFunctions
{
...
...
@@ -198,6 +199,27 @@ public class ApplySimpleLayoutModelCommandTest extends CommandTestFunctions {
}
@Test
public
void
testModifyResiduesLocationInComplex
()
{
ApplySimpleLayoutModelCommand
layoutModelCommand
=
new
ApplySimpleLayoutModelCommand
(
null
);
GenericProtein
p1
=
createProtein
();
Complex
c1
=
createComplex
();
c1
.
addSpecies
(
p1
);
BindingRegion
r
=
new
BindingRegion
();
p1
.
addBindingRegion
(
r
);
Set
<
Species
>
elements
=
new
HashSet
<>();
elements
.
add
(
p1
);
elements
.
add
(
c1
);
layoutModelCommand
.
modifySpeciesListLocation
(
elements
,
new
Point2D
.
Double
(
100
,
100
),
new
DoubleDimension
(
200
,
200
));
assertTrue
(
p1
.
getX
()
>=
100
);
assertTrue
(
p1
.
getY
()
>=
100
);
assertTrue
(
p1
.
getBorder
().
getMaxX
()
<=
300
);
assertTrue
(
p1
.
getBorder
().
getMaxY
()
<=
300
);
assertNotNull
(
r
.
getPosition
());
}
@Test
public
void
testModifyElementLocation
()
{
ApplySimpleLayoutModelCommand
layoutModelCommand
=
new
ApplySimpleLayoutModelCommand
(
null
);
...
...
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