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
56b8ba58
Commit
56b8ba58
authored
Jul 22, 2019
by
Piotr Gawron
Browse files
redundant references field in gene variants data overlay is now deprecated
parent
346254c0
Pipeline
#11975
passed with stage
in 11 minutes and 56 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
56b8ba58
...
...
@@ -17,6 +17,8 @@ minerva (14.0.0~alpha.0) unstable; urgency=low
*
Small
improvement
:
overlay
name
is
obligatory
(#
698
)
*
Small
improvement
:
target
gene
in
search
panel
contains
also
information
about
type
of
database
that
identifies
the
target
(#
66
)
*
Small
improvement
:
redundant
'references'
field
in
gene
variants
data
overlay
is
now
deprecated
(#
850
)
*
Bug
fix
:
export
to
CellDesigner
of
reaction
with
two
modifiers
connected
with
boolean
operator
resulted
was
skipping
some
layout
information
*
Bug
fix
:
reaction
in
SBGNML
file
containing
two
products
was
improperly
...
...
model/src/main/java/lcsb/mapviewer/model/map/layout/GeneVariation.java
View file @
56b8ba58
...
...
@@ -74,11 +74,6 @@ public class GeneVariation implements Serializable {
*/
private
String
referenceGenomeVersion
;
/**
* List of references connected to this variant.
*/
private
List
<
MiriamData
>
references
=
new
ArrayList
<>();
/**
* Constructor that creates copy of the {@link GeneVariation}.
*
...
...
@@ -91,7 +86,6 @@ public class GeneVariation implements Serializable {
this
.
setModifiedDna
(
original
.
getModifiedDna
());
this
.
setReferenceGenomeType
(
original
.
getReferenceGenomeType
());
this
.
setReferenceGenomeVersion
(
original
.
getReferenceGenomeVersion
());
this
.
addReferences
(
original
.
getReferences
());
this
.
setContig
(
original
.
getContig
());
this
.
setAllelFrequency
(
original
.
getAllelFrequency
());
this
.
setVariantIdentifier
(
original
.
getVariantIdentifier
());
...
...
@@ -104,19 +98,6 @@ public class GeneVariation implements Serializable {
public
GeneVariation
()
{
}
/**
* Adds references.
*
* @param references
* references to add
* @see #references
*/
private
void
addReferences
(
Collection
<
MiriamData
>
references
)
{
for
(
MiriamData
reference
:
references
)
{
addReference
(
reference
);
}
}
/**
* @return the position
* @see #position
...
...
@@ -185,14 +166,6 @@ public class GeneVariation implements Serializable {
this
.
referenceGenomeType
=
referenceGenomeType
;
}
/**
* @return the references
* @see #references
*/
public
List
<
MiriamData
>
getReferences
()
{
return
references
;
}
/**
* @return the referenceGenomeVersion
* @see #referenceGenomeVersion
...
...
@@ -210,17 +183,6 @@ public class GeneVariation implements Serializable {
this
.
referenceGenomeVersion
=
referenceGenomeVersion
;
}
/**
* Adds reference.
*
* @param reference
* reference to add
* @see #references
*/
public
void
addReference
(
MiriamData
reference
)
{
this
.
references
.
add
(
reference
);
}
/**
* Creates copy of the object.
*
...
...
model/src/test/java/lcsb/mapviewer/model/map/layout/GeneVariationTest.java
View file @
56b8ba58
...
...
@@ -46,18 +46,6 @@ public class GeneVariationTest {
}
}
@Test
public
void
testAddReference
()
throws
Exception
{
try
{
GeneVariation
gv
=
new
GeneVariation
();
gv
.
addReference
(
new
MiriamData
());
assertEquals
(
1
,
gv
.
getReferences
().
size
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
e
;
}
}
@Test
public
void
testCopy
()
throws
Exception
{
try
{
...
...
@@ -66,12 +54,10 @@ public class GeneVariationTest {
GeneVariation
gv
=
new
GeneVariation
();
gv
.
setModifiedDna
(
modifiedDna
);
gv
.
addReference
(
new
MiriamData
());
GeneVariation
copy
=
gv
.
copy
();
assertEquals
(
gv
.
getModifiedDna
(),
copy
.
getModifiedDna
());
assertEquals
(
1
,
copy
.
getReferences
().
size
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
e
;
...
...
service/src/main/java/lcsb/mapviewer/services/impl/LayoutService.java
View file @
56b8ba58
...
...
@@ -655,11 +655,6 @@ public class LayoutService implements ILayoutService {
sb
.
append
(
schema
.
getGeneVariations
().
get
(
0
).
getReferenceGenomeVersion
()
+
"\t"
);
}
else
if
(
column
.
equals
(
ColorSchemaColumn
.
CONTIG
))
{
sb
.
append
(
schema
.
getGeneVariations
().
get
(
0
).
getContig
()
+
"\t"
);
}
else
if
(
column
.
equals
(
ColorSchemaColumn
.
REFERENCES
))
{
MiriamConnector
mc
=
new
MiriamConnector
();
for
(
MiriamData
md
:
schema
.
getGeneVariations
().
get
(
0
).
getReferences
())
{
sb
.
append
(
mc
.
miriamDataToUri
(
md
)
+
"\t"
);
}
}
else
{
throw
new
InvalidArgumentException
(
"Unknown column type: "
+
column
+
" for schema type: "
+
schema
.
getClass
());
}
...
...
service/src/main/java/lcsb/mapviewer/services/utils/ColorSchemaReader.java
View file @
56b8ba58
...
...
@@ -177,7 +177,6 @@ public class ColorSchemaReader {
Integer
originalDnaColumn
=
schemaColumns
.
get
(
ColorSchemaColumn
.
ORIGINAL_DNA
);
Integer
alternativeDnaColumn
=
schemaColumns
.
get
(
ColorSchemaColumn
.
ALTERNATIVE_DNA
);
Integer
descriptionColumn
=
schemaColumns
.
get
(
ColorSchemaColumn
.
DESCRIPTION
);
Integer
referencesColumn
=
schemaColumns
.
get
(
ColorSchemaColumn
.
REFERENCES
);
Integer
referenceGenomeTypeColumn
=
schemaColumns
.
get
(
ColorSchemaColumn
.
REFERENCE_GENOME_TYPE
);
Integer
referenceGenomeVersionColumn
=
schemaColumns
.
get
(
ColorSchemaColumn
.
REFERENCE_GENOME_VERSION
);
Integer
aminoAcidChangeColumn
=
schemaColumns
.
get
(
ColorSchemaColumn
.
AMINO_ACID_CHANGE
);
...
...
@@ -273,16 +272,6 @@ public class ColorSchemaReader {
if
(
aminoAcidChangeColumn
!=
null
)
{
gv
.
setAminoAcidChange
(
values
[
aminoAcidChangeColumn
]);
}
if
(
referencesColumn
!=
null
)
{
String
[]
references
=
values
[
referencesColumn
].
split
(
";"
);
for
(
String
string
:
references
)
{
try
{
gv
.
addReference
(
MiriamType
.
getMiriamByUri
(
string
));
}
catch
(
InvalidArgumentException
e
)
{
throw
new
InvalidColorSchemaException
(
"[Line "
+
lineIndex
+
"] Invalid reference: "
+
string
,
e
);
}
}
}
if
(
referenceGenomeTypeColumn
!=
null
)
{
gv
.
setReferenceGenomeType
(
extractReferenceGenomeType
(
values
[
referenceGenomeTypeColumn
]));
}
else
{
...
...
service/src/main/java/lcsb/mapviewer/services/utils/data/ColorSchemaColumn.java
View file @
56b8ba58
...
...
@@ -53,7 +53,7 @@ public enum ColorSchemaColumn {
/**
* Identifier of the element.
*/
IDENTIFIER
(
new
ColorSchemaType
[]
{
ColorSchemaType
.
GENERIC
,
ColorSchemaType
.
GENETIC_VARIANT
}),
IDENTIFIER
(
"references"
,
new
ColorSchemaType
[]
{
ColorSchemaType
.
GENERIC
,
ColorSchemaType
.
GENETIC_VARIANT
}),
/**
* Element identifier.
...
...
@@ -91,11 +91,6 @@ public enum ColorSchemaColumn {
*/
DESCRIPTION
(
new
ColorSchemaType
[]
{
ColorSchemaType
.
GENETIC_VARIANT
,
ColorSchemaType
.
GENERIC
}),
/**
* Variant references.
*/
REFERENCES
(
new
ColorSchemaType
[]
{
ColorSchemaType
.
GENETIC_VARIANT
}),
/**
* What's the {@link ReferenceGenomeType}.
*/
...
...
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