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
f6c99d46
Commit
f6c99d46
authored
Jun 29, 2020
by
Piotr Gawron
Browse files
export map notes to gpml
parent
48f4a169
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
f6c99d46
minerva
(
15.0.2
)
stable
;
urgency
=
medium
*
Bug
fix
:
annotations
using
identifiers
.
org
urls
sometimes
required
http
and
sometimes
required
https
url
(#
1297
)
*
Bug
fix
:
map
notes
were
not
exported
to
GPML
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Mon
,
29
Jun
2020
11
:
00
:
00
+
0200
...
...
pathvisio/src/main/java/lcsb/mapviewer/wikipathway/XML/ModelToGPML.java
View file @
f6c99d46
...
...
@@ -805,6 +805,9 @@ public class ModelToGPML {
StringBuilder
gpml
=
new
StringBuilder
(
""
);
gpml
.
append
(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
);
gpml
.
append
(
"<Pathway xmlns=\"http://pathvisio.org/GPML/2013a\" Name=\"Generated\">\n"
);
if
(
model
.
getNotes
()
!=
null
)
{
gpml
.
append
(
" <Comment>"
+
model
.
getNotes
().
trim
()
+
"</Comment>\n"
);
}
gpml
.
append
(
" <Graphics BoardWidth=\""
+
model
.
getWidth
()
+
"\" BoardHeight=\""
+
model
.
getHeight
()
+
"\"/>\n"
);
gpml
.
append
(
getDataNodes
(
model
));
...
...
pathvisio/src/test/java/lcsb/mapviewer/wikipathway/XML/ModelToGPMLTest.java
View file @
f6c99d46
...
...
@@ -200,7 +200,7 @@ public class ModelToGPMLTest extends WikipathwaysTestFunctions {
assertEquals
(
reaction
.
isReversible
(),
newReaction
.
isReversible
());
}
private
Reaction
createReaction
(
Protein
p1
,
Protein
p2
)
{
private
Reaction
createReaction
(
Species
p1
,
Species
p2
)
{
Reaction
reaction
=
new
TransportReaction
(
"re"
+
(
speciesCounter
++));
Reactant
reactant
=
new
Reactant
(
p1
);
Product
product
=
new
Product
(
p2
);
...
...
@@ -396,4 +396,18 @@ public class ModelToGPMLTest extends WikipathwaysTestFunctions {
assertEquals
(
0
,
new
ModelComparator
().
compare
(
model
,
model2
));
}
@Test
public
void
testMapNotes
()
throws
Exception
{
Model
model
=
new
ModelFullIndexed
(
null
);
model
.
setWidth
(
1000
);
model
.
setHeight
(
1000
);
model
.
setNotes
(
"xyz"
);
lcsb
.
mapviewer
.
wikipathway
.
GpmlParser
parser
=
new
lcsb
.
mapviewer
.
wikipathway
.
GpmlParser
();
String
xml
=
parser
.
model2String
(
model
);
Model
model2
=
parser
.
createModel
(
new
ConverterParams
().
inputStream
(
new
ByteArrayInputStream
(
xml
.
getBytes
())));
assertEquals
(
0
,
new
ModelComparator
().
compare
(
model
,
model2
));
}
}
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