Skip to content

Commit

Permalink
#6 mapping blanks and non-common SOs
Browse files Browse the repository at this point in the history
  • Loading branch information
shamseen committed Jul 26, 2017
1 parent 42163ea commit 29bc6cf
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ public static DnaComponent toDnaComponent(PartType objType, DnaComponent parent,
private static URI soMapping(String s) {

URI retVal = URI.create(DEFAULT_URI);

if (s.isEmpty()) {
s = "Device";
}
switch (s) {
case "Five_Prime_UTR":
retVal = SequenceOntology.FIVE_PRIME_UTR;
Expand Down Expand Up @@ -566,17 +570,20 @@ private static URI soMapping(String s) {
retVal = SequenceOntology.TERMINATOR;
break;

// Blank term or new Device is Engineered Foreign Region
case "Device":

// not recognized by SBOL
// set to SO of Engineered Foreign Region
default:
try {
retVal = new URI("http://purl.obolibrary.org/obo/SO_0000805");
} catch (Exception e) {
e.printStackTrace();
}
;

break;

// Not a common term nor empty, assuming it's new part
// and value is the SO number. Append to URI namespace.
default:
retVal = URI.create(SequenceOntology.NAMESPACE.toString() + "SO_" + s);
break;
}

Expand Down

0 comments on commit 29bc6cf

Please sign in to comment.