Skip to content

Commit 36275c7

Browse files
authored
Merge pull request #1586 from virtualcell/dan-pathway-commons-improv
replaced Map with linkedHashMap, evaluate work for biopax lvl 3
2 parents 027dd3b + bf5a7e1 commit 36275c7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

vcell-client/src/main/java/cbit/vcell/client/desktop/biomodel/BioModelEditorPathwayCommonsPanel.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ public void showPathway() {
360360
public void run(final Hashtable<String, Object> hashTable) throws Exception {
361361

362362
String id = extractReactomeId(pathway.primaryId());
363+
// TODO: we do have a lvl 3 parser, PathwayReaderBiopax3.parse() invoked in extractPathwayFromJDOM()
364+
// we only need to fix its potential bugs and use it, just replace Level2 with Level3 here
365+
// of course probably reconcileReferences may also need work, much simplification anyway
366+
// since SequenceParticipant is gone
363367
final URL url = new URL(" https://reactome.org/ReactomeRESTfulAPI/RESTfulWS/biopaxExporter/Level2/" + id);
364368

365369
System.out.println(url.toString());

vcell-core/src/main/java/org/vcell/util/bioregistry/ncbitaxon/OrganismLookup.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.io.IOException;
44
import java.time.Duration;
5+
import java.util.LinkedHashMap;
56
import java.util.Map;
67
import java.net.URI;
78
import java.net.http.HttpClient;
@@ -27,7 +28,7 @@ public enum NameType {
2728

2829
private static final String PREFIX = "http://bioregistry.io/ncbitaxon:";
2930

30-
private static final Map<String, String> COMMON_NAMES = Map.ofEntries(
31+
private static final Map<String, String> COMMON_NAMES = new LinkedHashMap<>(Map.ofEntries(
3132
Map.entry("9606", "human"),
3233
Map.entry("10090", "house mouse"),
3334
Map.entry("10116", "Norway rat"),
@@ -46,10 +47,10 @@ public enum NameType {
4647
Map.entry("9825", "domestic pig"),
4748
Map.entry("9796", "horse"),
4849
Map.entry("9940", "sheep"),
49-
Map.entry("9925", "Goat")
50-
);
50+
Map.entry("9925", "goat")
51+
));
5152

52-
private static final Map<String, String> SCIENTIFIC_NAMES = Map.ofEntries(
53+
private static final Map<String, String> SCIENTIFIC_NAMES = new LinkedHashMap<>(Map.ofEntries(
5354
Map.entry("9606", "Homo sapiens"),
5455
Map.entry("10090", "Mus musculus"),
5556
Map.entry("10116", "Rattus norvegicus"),
@@ -69,7 +70,7 @@ public enum NameType {
6970
Map.entry("9796", "Equus caballus"),
7071
Map.entry("9940", "Ovis aries"),
7172
Map.entry("9925", "Capra hircus")
72-
);
73+
));
7374

7475
// get name from full URI
7576
public static String getName(String fullUri, NameType type) {

0 commit comments

Comments
 (0)