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
3fbdcc2f
Commit
3fbdcc2f
authored
Jun 25, 2020
by
Piotr Gawron
Browse files
export transcription and translation reactions
parent
39b6a42b
Changes
5
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
3fbdcc2f
...
...
@@ -13,6 +13,8 @@ minerva (15.1.0) unstable; urgency=medium
*
Small
improvement
:
process
rectangle
can
be
specified
in
SBML
with
reaction
bounding
box
(#
1292
)
*
Small
improvement
:
API
allows
to
remove
plugin
data
entry
(#
1298
)
*
Small
improvement
:
transport
/
translation
/
transcription
reactions
are
exported
to
SBGN
PD
(#
1302
)
*
Bug
fix
:
export
to
image
from
selected
polygon
contained
all
elements
inside
rectangle
bounded
by
the
polygon
coordinates
(#
1096
)
*
Bug
fix
:
continuous
refreshing
list
of
project
when
uploading
/
removing
...
...
converter-SBGNML/src/main/java/lcsb/mapviewer/converter/model/sbgnml/SbgnmlXmlExporter.java
View file @
3fbdcc2f
...
...
@@ -102,7 +102,7 @@ public class SbgnmlXmlExporter {
ColorParser
colorParser
=
new
ColorParser
();
XmlAnnotationParser
xap
=
new
XmlAnnotationParser
(
new
ArrayList
<>(),
true
);
/**
* Transforms model into SBGN-ML xml.
*
...
...
@@ -236,7 +236,7 @@ public class SbgnmlXmlExporter {
private
org
.
w3c
.
dom
.
Element
getAnnotationExtension
(
Element
element
)
{
try
{
String
content
=
xap
.
dataSetToXmlString
(
element
.
getMiriamData
(),
element
.
getElementId
());
String
content
=
xap
.
dataSetToXmlString
(
element
.
getMiriamData
(),
element
.
getElementId
());
content
=
"<annotation>"
+
content
+
"</annotation>"
;
DocumentBuilderFactory
dbf
=
DocumentBuilderFactory
.
newInstance
();
dbf
.
setNamespaceAware
(
true
);
...
...
@@ -710,8 +710,8 @@ public class SbgnmlXmlExporter {
private
GlyphClazz
getGlyphClazzFromReaction
(
Reaction
reaction
)
{
if
(
reaction
instanceof
StateTransitionReaction
||
reaction
instanceof
TransportReaction
||
reaction
instanceof
State
Trans
i
tionReaction
)
{
reaction
instanceof
Trans
la
tionReaction
||
reaction
instanceof
TranscriptionReaction
)
{
return
GlyphClazz
.
PROCESS
;
}
if
(
reaction
instanceof
HeterodimerAssociationReaction
)
{
...
...
converter-SBGNML/src/test/java/lcsb/mapviewer/converter/model/sbgnml/SbgnmlXmlExporterTest.java
View file @
3fbdcc2f
...
...
@@ -21,7 +21,7 @@ import lcsb.mapviewer.model.map.InconsistentModelException;
import
lcsb.mapviewer.model.map.model.Model
;
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.reaction.type.
*
;
import
lcsb.mapviewer.model.map.species.Ion
;
@RunWith
(
Parameterized
.
class
)
...
...
@@ -39,6 +39,8 @@ public class SbgnmlXmlExporterTest extends SbgnmlTestFunctions {
public
static
Collection
<
Object
[]>
data
()
throws
Exception
{
Collection
<
Object
[]>
data
=
new
ArrayList
<>();
data
.
add
(
createTestEntry
(
createReaction
(
TransportReaction
.
class
)));
data
.
add
(
createTestEntry
(
createReaction
(
TranslationReaction
.
class
)));
data
.
add
(
createTestEntry
(
createReaction
(
TranscriptionReaction
.
class
)));
return
data
;
}
...
...
model/src/main/java/lcsb/mapviewer/model/map/reaction/type/TranscriptionReaction.java
View file @
3fbdcc2f
...
...
@@ -27,6 +27,10 @@ public class TranscriptionReaction extends Reaction implements SimpleReactionInt
public
TranscriptionReaction
()
{
super
();
}
public
TranscriptionReaction
(
String
elementId
)
{
super
(
elementId
);
}
/**
* Constructor that copies data from the parameter given in the argument.
...
...
model/src/main/java/lcsb/mapviewer/model/map/reaction/type/TranslationReaction.java
View file @
3fbdcc2f
...
...
@@ -29,6 +29,10 @@ public class TranslationReaction extends Reaction implements SimpleReactionInter
super
();
}
public
TranslationReaction
(
String
elementId
)
{
super
(
elementId
);
}
/**
* Constructor that copies data from the parameter given in the argument.
*
...
...
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