Skip to content

Commit

Permalink
Minor update - set unif xref.db from data instead of using 'MeSH 2013'
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorRodchenkov committed Sep 2, 2019
1 parent 9e7d7cf commit 3d315ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>pathwaycommons</groupId>
<artifactId>ctd-to-biopax</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<name>ctd-to-biopax</name>

<description>
Expand Down Expand Up @@ -64,8 +64,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/ctdbase/converter/CTDChemicalConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Model convert(InputStream inputStream) throws IOException {
2 - CasRN
3 - Definition
4 - ParentIDs (MESH:*)
5- TreeNumber
5 - TreeNumber
6 - ParentTreeNumber
7 - Synonyms (sep w/ |)
8 - DrugBank IDs
Expand Down Expand Up @@ -126,10 +126,10 @@ private RelationshipXref createDrugBankXref(Model model, String dbId) {
}

private UnificationXref createUnificationXrefFromId(Model model, String chemicalId) {
String[] tokens = chemicalId.split(":");
String[] tokens = chemicalId.split(":"); //length=2 always
String uri = CtdUtil.sanitizeId("rxref_" + chemicalId + "_" + UUID.randomUUID());
UnificationXref xref = create(UnificationXref.class, uri);
xref.setDb("MeSH 2013");
xref.setDb(tokens[0]); //mesh
xref.setId(tokens[1]);
model.add(xref);
return xref;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/ctdbase/converter/CTDGeneConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private EntityReference generateReference(
2 - GeneID
3 - AltGeneIDs
4 - Synonyms
5- BioGRIDIds
5 - BioGRIDIds
6 - PharmGKBs
7 - UniProtIds
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package org.ctdbase.converter;

import org.biopax.paxtools.io.SimpleIOHandler;
import org.biopax.paxtools.model.Model;
import org.biopax.paxtools.model.level3.*;
import org.biopax.paxtools.trove.TProvider;
import org.biopax.paxtools.util.BPCollections;
import org.ctdbase.util.CtdUtil;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.*;
Expand Down

0 comments on commit 3d315ba

Please sign in to comment.