Skip to content

Commit cdc6883

Browse files
author
Sam Hokin
committed
Require chromosome or supercontig prefix in datastore_config.properties.
1 parent 220ba6d commit cdc6883

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lis-datastore/src/main/java/org/intermine/bio/dataconversion/DatastoreUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ public boolean isSupercontig(String primaryIdentifier) {
130130
String assy = fields[2];
131131
String name = fields[3];
132132
String key = gensp+"."+strainIdentifier;
133+
List<String> chrPrefixes = chromosomePrefixes.get(key);
133134
List<String> scPrefixes = supercontigPrefixes.get(key);
135+
if (chrPrefixes==null && scPrefixes==null) {
136+
throw new RuntimeException(primaryIdentifier+": missing chromosome and supercontig prefixes in datastore_config.properties. One is required.");
137+
}
134138
if (scPrefixes==null) {
135139
// we don't know
136140
return false;
@@ -176,6 +180,9 @@ public boolean isChromosome(String primaryIdentifier) {
176180
String key = gensp+"."+strainIdentifier;
177181
List<String> chrPrefixes = chromosomePrefixes.get(key);
178182
List<String> scPrefixes = supercontigPrefixes.get(key);
183+
if (chrPrefixes==null && scPrefixes==null) {
184+
throw new RuntimeException("Missing chromosome and supercontig prefixes in datastore_config.properties. One is required.");
185+
}
179186
if (chrPrefixes==null) {
180187
// we don't know
181188
return false;

0 commit comments

Comments
 (0)