Commit 1fcaaaef authored by Piotr Gawron's avatar Piotr Gawron
Browse files

gene name column is allowed only in genetic variant data overlay

parent 2f7a2aac
......@@ -11,6 +11,8 @@ minerva (12.3.1~beta.1) unstable; urgency=low
* Bug fix: redirect url from export panel is fixed (#819)
* Bug fix: allow to reupload the same file without closing add overlay dialog
(#833)
* Bug fix: gene_name column is allowed only in the genetic variant data
overlay
* Bug fix: protein types are sorted properly in "Select valid annotations"
dialog (#815)
* Bug fix: if there is a description of (sub)map then it is available in
......
......@@ -162,6 +162,9 @@ public class ColorSchemaReader {
Integer nameColumn = schemaColumns.get(ColorSchemaColumn.NAME);
if (nameColumn == null) {
nameColumn = schemaColumns.get(ColorSchemaColumn.GENE_NAME);
} else if (schemaColumns.get(ColorSchemaColumn.GENE_NAME) != null) {
throw new InvalidColorSchemaException(ColorSchemaColumn.GENE_NAME + " and " + ColorSchemaColumn.NAME
+ " column cannot appear in the same dataset");
}
Integer modelNameColumn = schemaColumns.get(ColorSchemaColumn.MODEL_NAME);
Integer identifierColumn = schemaColumns.get(ColorSchemaColumn.IDENTIFIER);
......@@ -292,7 +295,7 @@ public class ColorSchemaReader {
gv.setContig(values[contigColumn]);
schema.addGeneVariation(gv);
if (schema.getName()!=null && schema.getName().contains(";")) {
if (schema.getName() != null && schema.getName().contains(";")) {
String[] names = schema.getName().split(";");
for (String string : names) {
if (!string.trim().isEmpty()) {
......
......@@ -21,7 +21,7 @@ public enum ColorSchemaColumn {
*/
NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }),
GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }),
GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }),
/**
* Name of the element.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment