You can subscribe to this list here.
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(5) |
Aug
(8) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
(1) |
Nov
(4) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(23) |
Apr
(11) |
May
(33) |
Jun
(13) |
Jul
(86) |
Aug
(46) |
Sep
(104) |
Oct
(9) |
Nov
(1) |
Dec
|
| 2016 |
Jan
(9) |
Feb
(19) |
Mar
(8) |
Apr
|
May
(4) |
Jun
(25) |
Jul
(24) |
Aug
(14) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2017 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
(6) |
Apr
(7) |
May
(8) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
|
From: <nik...@us...> - 2018-06-20 09:31:27
|
Revision: 732
http://sourceforge.net/p/sbfc/code/732
Author: niko-rodrigue
Date: 2018-06-20 09:31:25 +0000 (Wed, 20 Jun 2018)
Log Message:
-----------
replace a forgotten usage of Modulation so that the conversion of modifier works properly in all the cases.
Modified Paths:
--------------
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2018-05-25 12:02:10 UTC (rev 731)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2018-06-20 09:31:25 UTC (rev 732)
@@ -396,16 +396,15 @@
}
else if (sbml2BioPAXUtilities.isControlType(modifier2.getSBOTerm()))
{
-
- Modulation modulation = (Modulation) sbml2BioPAXUtilities.convertModifier(bpModel, modifier2, reaction);
+ Control control = (Control) sbml2BioPAXUtilities.convertModifier(bpModel, modifier2, reaction);
if (pathway!= null)
{
- pathway.addPathwayComponent(modulation);
+ pathway.addPathwayComponent(control);
}
- modulation.addControlled(catalysis);
+ control.addControlled(catalysis);
Controller controller2 = (Controller) sbml2BioPAXUtilities.convertSpecies(bpModel, species2, species2.getCompartmentInstance(), submodelId, mapReplacements);
- modulation.addController(controller2);
+ control.addController(controller2);
}
}
}
@@ -413,16 +412,16 @@
{
// We create a control from the modifier
Control control = sbml2BioPAXUtilities.convertModifier(bpModel, modifier, reaction);
-
- if (pathway!= null)
- {
- pathway.addPathwayComponent(control);
- }
-
- Controller controller = (Controller) sbml2BioPAXUtilities.convertSpecies(bpModel, species, species.getCompartmentInstance(), submodelId, mapReplacements);
- control.addController(controller);
- control.addControlled((org.biopax.paxtools.model.level3.Process) interaction);
-
+
+ if (pathway!= null)
+ {
+ pathway.addPathwayComponent(control);
+ }
+
+ Controller controller = (Controller) sbml2BioPAXUtilities.convertSpecies(bpModel, species, species.getCompartmentInstance(), submodelId, mapReplacements);
+ control.addController(controller);
+ control.addControlled((org.biopax.paxtools.model.level3.Process) interaction);
+
}
}
// Modifiers -> Controls [end]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-05-25 12:02:13
|
Revision: 731
http://sourceforge.net/p/sbfc/code/731
Author: niko-rodrigue
Date: 2018-05-25 12:02:10 +0000 (Fri, 25 May 2018)
Log Message:
-----------
corrected linux scripts to include the paxtools jar. Put back the creation of BioPAX EntityReferences that will old the annotations
Modified Paths:
--------------
trunk/build.xml
trunk/lib/sbfc-1.3.8-SNAPSHOT.jar
trunk/sbfConverter.sh
trunk/sbfConverterGUI.sh
trunk/sbfConverterList.sh
trunk/sbfModelList.sh
trunk/sbml2biopax.sh
trunk/sbml2biopax3.bat
trunk/sbml2biopax3.sh
trunk/sbml2biopax_gsoc16.sh
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l2.java
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l3.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/build.xml 2018-05-25 12:02:10 UTC (rev 731)
@@ -59,7 +59,7 @@
<include name="*.jar"/>
<exclude name="{name}.jar"/>
</fileset>
- <fileset dir="${jars.dir}/paxtools-4.2/">
+ <fileset dir="${jars.dir}/paxtools/">
<include name="*.jar"/>
<exclude name="{name}.jar"/>
</fileset>
@@ -271,7 +271,7 @@
<!-- all the dependencies jars -->
<zipgroupfileset dir="${jars.dir}" includes="*.jar" />
<!-- latest paxtools jar -->
- <zipgroupfileset dir="${jars.dir}/paxtools-4.2" includes="*.jar" />
+ <zipgroupfileset dir="${jars.dir}/paxtools" includes="*.jar" />
</jar>
</target>
@@ -305,7 +305,7 @@
<!-- Copy all the dependencies jar files -->
<copy todir="${dist.dir}/lib"><fileset dir="${jars.dir}/" includes="*.jar"/></copy>
<copy todir="${dist.dir}/lib/pathvisio"><fileset dir="${jars.dir}/pathvisio/" includes="*.jar"/></copy>
- <copy todir="${dist.dir}/lib/paxtools-4.2"><fileset dir="${jars.dir}/paxtools-4.2/" includes="*.jar"/></copy>
+ <copy todir="${dist.dir}/lib/paxtools"><fileset dir="${jars.dir}/paxtools/" includes="*.jar"/></copy>
<copy todir="${dist.dir}">
@@ -342,7 +342,7 @@
<!-- Restores the *.sh and lib folder -->
<copy todir="${dist.dir}/lib"><fileset dir="${jars.dir}/" includes="*.jar"/></copy>
<copy todir="${dist.dir}/lib/pathvisio"><fileset dir="${jars.dir}/pathvisio/" includes="*.jar"/></copy>
- <copy todir="${dist.dir}/lib/paxtools-4.2"><fileset dir="${jars.dir}/paxtools-4.2/" includes="*.jar"/></copy>
+ <copy todir="${dist.dir}/lib/paxtools"><fileset dir="${jars.dir}/paxtools/" includes="*.jar"/></copy>
<copy todir="${dist.dir}">
<fileset dir="${basedir}/" includes="*.sh *.bat"/>
@@ -465,7 +465,7 @@
<!-- Including only the necessary jar files -->
<copy todir="${dist.dir}/lib"><fileset dir="${jars.dir}/" includes="jsbml*.jar ${name}-${version}.jar miriam*"/></copy>
- <copy todir="${dist.dir}/lib/paxtools-4.2"><fileset dir="${jars.dir}/paxtools-4.2/" includes="*.jar"/></copy>
+ <copy todir="${dist.dir}/lib/paxtools"><fileset dir="${jars.dir}/paxtools/" includes="*.jar"/></copy>
<antcall target="converter.generic.package"/>
Modified: trunk/lib/sbfc-1.3.8-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: trunk/sbfConverter.sh
===================================================================
--- trunk/sbfConverter.sh 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/sbfConverter.sh 2018-05-25 12:02:10 UTC (rev 731)
@@ -70,7 +70,11 @@
if [ ${PATHVISIO_CONVERTER} == "no" ];
then
- export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools*.jar
+ for jarFile in $LIB_PATH/paxtools/*.jar
+ do
+ export CLASSPATH=$CLASSPATH:$jarFile
+ done
+
else
for jarFile in $LIB_PATH/pathvisio/*.jar
do
Modified: trunk/sbfConverterGUI.sh
===================================================================
--- trunk/sbfConverterGUI.sh 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/sbfConverterGUI.sh 2018-05-25 12:02:10 UTC (rev 731)
@@ -23,7 +23,10 @@
do
export CLASSPATH=$CLASSPATH:$jarFile
done
-export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools*.jar
+for jarFile in $LIB_PATH/paxtools/*.jar
+do
+ export CLASSPATH=$CLASSPATH:$jarFile
+done
java -Dmiriam.xml.export=${SBF_CONVERTER_HOME}/miriam.xml org.sbfc.converter.ConverterGUI
Modified: trunk/sbfConverterList.sh
===================================================================
--- trunk/sbfConverterList.sh 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/sbfConverterList.sh 2018-05-25 12:02:10 UTC (rev 731)
@@ -11,7 +11,10 @@
do
export CLASSPATH=$CLASSPATH:$jarFile
done
-export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools-*.jar
+for jarFile in $LIB_PATH/paxtools/*.jar
+do
+ export CLASSPATH=$CLASSPATH:$jarFile
+done
COMMAND="java "
Modified: trunk/sbfModelList.sh
===================================================================
--- trunk/sbfModelList.sh 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/sbfModelList.sh 2018-05-25 12:02:10 UTC (rev 731)
@@ -11,7 +11,10 @@
do
export CLASSPATH=$CLASSPATH:$jarFile
done
-export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools*.jar
+for jarFile in $LIB_PATH/paxtools/*.jar
+do
+ export CLASSPATH=$CLASSPATH:$jarFile
+done
COMMAND="java "
Modified: trunk/sbml2biopax.sh
===================================================================
--- trunk/sbml2biopax.sh 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/sbml2biopax.sh 2018-05-25 12:02:10 UTC (rev 731)
@@ -6,7 +6,7 @@
SBF_CONVERTER_HOME=`dirname ${RESOLVE_LINK}`
-${SBF_CONVERTER_HOME}/sbml2biopax2.sh $@
+# ${SBF_CONVERTER_HOME}/sbml2biopax2.sh $@
${SBF_CONVERTER_HOME}/sbml2biopax3.sh $@
Modified: trunk/sbml2biopax3.bat
===================================================================
--- trunk/sbml2biopax3.bat 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/sbml2biopax3.bat 2018-05-25 12:02:10 UTC (rev 731)
@@ -4,4 +4,4 @@
set CONVERTER_HOME=%~dp0
-%CONVERTER_HOME%\sbfConverter.bat SBMLModel SBML2BioPAX_l3 %*
+%CONVERTER_HOME%\sbfConverter.bat SBMLModel SBML2BioPAX_Tramy %*
Modified: trunk/sbml2biopax3.sh
===================================================================
--- trunk/sbml2biopax3.sh 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/sbml2biopax3.sh 2018-05-25 12:02:10 UTC (rev 731)
@@ -7,5 +7,5 @@
SBF_CONVERTER_HOME=`dirname ${RESOLVE_LINK}`
-${SBF_CONVERTER_HOME}/sbfConverter.sh SBMLModel SBML2BioPAX_l3 $1
+${SBF_CONVERTER_HOME}/sbfConverter.sh SBMLModel SBML2BioPAX_Tramy $1
Modified: trunk/sbml2biopax_gsoc16.sh
===================================================================
--- trunk/sbml2biopax_gsoc16.sh 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/sbml2biopax_gsoc16.sh 2018-05-25 12:02:10 UTC (rev 731)
@@ -5,6 +5,6 @@
SBF_CONVERTER_HOME=`dirname ${RESOLVE_LINK}`
-${SBF_CONVERTER_HOME}/sbfConverter.sh SBMLModel SBML2BioPAX_Arman $1
+${SBF_CONVERTER_HOME}/sbfConverter.sh SBMLModel SBML2BioPAX_Tramy $1
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java 2018-05-25 12:02:10 UTC (rev 731)
@@ -99,7 +99,7 @@
@Override
public String getName() {
- return "SBML2BioPAX GSOC 2016";
+ return "SBML2BioPAX";
}
@Override
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l2.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l2.java 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l2.java 2018-05-25 12:02:10 UTC (rev 731)
@@ -316,7 +316,7 @@
@Override
public String getName() {
- return "SBML2BioPAX_l2";
+ return "SBML to BioPAX Level 2 (old)";
}
@Override
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l3.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l3.java 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l3.java 2018-05-25 12:02:10 UTC (rev 731)
@@ -43,7 +43,7 @@
@Override
public String getName() {
- return "SBML2BioPAX_l3";
+ return "SBML to BioPAX Level 3 (old converter)";
}
@Override
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2018-05-24 14:35:27 UTC (rev 730)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2018-05-25 12:02:10 UTC (rev 731)
@@ -36,7 +36,6 @@
import org.biopax.paxtools.model.level3.GeneticInteraction;
import org.biopax.paxtools.model.level3.Interaction;
import org.biopax.paxtools.model.level3.KPrime;
-import org.biopax.paxtools.model.level3.Modulation;
import org.biopax.paxtools.model.level3.MolecularInteraction;
import org.biopax.paxtools.model.level3.Named;
import org.biopax.paxtools.model.level3.Pathway;
@@ -58,6 +57,7 @@
import org.biopax.paxtools.model.level3.Transport;
import org.biopax.paxtools.model.level3.TransportWithBiochemicalReaction;
import org.biopax.paxtools.model.level3.UnificationXref;
+import org.biopax.paxtools.model.level3.XReferrable;
import org.biopax.paxtools.model.level3.Xref;
import org.identifiers.registry.RegistryUtilities;
import org.identifiers.registry.data.DataType;
@@ -585,26 +585,31 @@
*/
public <T extends SimplePhysicalEntity, S extends EntityReference> T convertSpeciesToSPE(Model bpModel, Class<T> entityClass, Class<S> refClass, Species species) {
T entity = createBPEfromSBMLE(bpModel, entityClass, species);
- for (Xref xref : generateXrefsForSBase(bpModel, species)) {
- entity.addXref(xref);
- }
+ Set<Xref> xrefs = generateXrefsForSBase(bpModel, species);
+
+// for (Xref xref : xrefs) {
+// entity.addXref(xref);
+// }
+
+
// TODO: check if there is an sbml group element that can be used to create the biopax entityReference
// TODO - if the group package is not defined and/or we could not linked a group to the species, create a new EntityReference for the species
/*
- * old deleted code to put back
- *
+ * case where there are no sbml group associated with the Species
+ * We create an EntityReference for each Species.
+ */
HashSet<XReferrable> ers = new HashSet<XReferrable>();
- for (Xref xref : xrefs) {
- for (XReferrable xReferrable : xref.getXrefOf()) {
- // Only add the entity references
- if(xReferrable instanceof EntityReference) {
- ers.add(xReferrable);
- }
- }
- }
+ for (Xref xref : xrefs) {
+ for (XReferrable xReferrable : xref.getXrefOf()) {
+ // Only add the entity references
+ if(xReferrable instanceof EntityReference) {
+ ers.add(xReferrable);
+ }
+ }
+ }
S reference;
if(ers.isEmpty()) {
@@ -615,17 +620,16 @@
} else if(ers.size() == 1) { // There shouldn't be more than one
reference = (S) ers.iterator().next();
} else {
- log.warn(
- "There are more than one EntityReferences that match with the same unification xref for species: "
- + species.getName()
- + ". Picking the first one: "
- + ers.iterator().next().getRDFId()
- );
+ log.warn(
+ "There are more than one EntityReferences that match with the same unification xref for species: "
+ + species.getName()
+ + ". Picking the first one: "
+ + ers.iterator().next().getUri()
+ );
- reference = (S) ers.iterator().next();
+ reference = (S) ers.iterator().next();
}
- T entity = createBPEfromSBMLE(bpModel, entityClass, species);
entity.setEntityReference(reference);
// Clean-up non-used xrefs
@@ -633,9 +637,8 @@
if(xref.getXrefOf().isEmpty()) {
bpModel.remove(xref);
}
- }*/
+ }
- //entity.setEntityReference(reference);
return entity;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-05-24 14:35:29
|
Revision: 730
http://sourceforge.net/p/sbfc/code/730
Author: niko-rodrigue
Date: 2018-05-24 14:35:27 +0000 (Thu, 24 May 2018)
Log Message:
-----------
updated paxtools version in the pom file as well.
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2018-05-24 14:21:20 UTC (rev 729)
+++ trunk/pom.xml 2018-05-24 14:35:27 UTC (rev 730)
@@ -21,7 +21,7 @@
<test.dir>test</test.dir>
<slf4j.version>1.7.13</slf4j.version>
- <paxtools.version>4.2.0</paxtools.version>
+ <paxtools.version>5.0.1</paxtools.version>
<commons-io.version>2.5</commons-io.version>
<miriam-common.version>0.1-SNAPSHOT</miriam-common.version>
<jsbml.version>1.3.1</jsbml.version>
@@ -64,7 +64,7 @@
mvn install:install-file \
-Dfile=lib/libsbml-5.15.0.jar \
-DgroupId=org.sbml \
- -DartifactId=libsbml \
+ -DartifactId=libSBML \
-Dversion=5.15.0 \
-Dpackaging=jar \
-DgeneratePom=true \
@@ -127,21 +127,17 @@
<repository>
<id>ebi-repo</id>
<name>EBI Maven Repository</name>
- <url>http://www.ebi.ac.uk/~maven/m2repo/</url>
+ <url>https://www.ebi.ac.uk/~maven/m2repo/</url>
</repository>
<repository>
<id>ebi-repo-snapshots</id>
<name>EBI Maven Snapshot Repository</name>
- <url>http://www.ebi.ac.uk/~maven/m2repo_snapshots/</url>
+ <url>https://www.ebi.ac.uk/~maven/m2repo_snapshots/</url>
</repository>
- <repository>
- <id>biopax-release</id>
- <url>http://www.biopax.org/m2repo/releases/</url>
- </repository>
<!-- for libsbgn -->
<repository>
<id>SEMS</id>
- <url>http://mvn.sems.uni-rostock.de/releases/</url>
+ <url>https://mvn.sems.uni-rostock.de/releases/</url>
</repository>
</repositories>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-05-24 14:21:23
|
Revision: 729
http://sourceforge.net/p/sbfc/code/729
Author: niko-rodrigue
Date: 2018-05-24 14:21:20 +0000 (Thu, 24 May 2018)
Log Message:
-----------
renamed the paxtools folder to remove the mention of the version and updated the scripts so that they use the new folder and are not dependent of a change in the paxtools version.
Modified Paths:
--------------
trunk/sbfConverter.bat
trunk/sbfConverter.sh
trunk/sbfConverterGUI.bat
trunk/sbfConverterGUI.sh
trunk/sbfConverterList.bat
trunk/sbfConverterList.sh
trunk/sbfConverterOnline.sh
trunk/sbfModelList.bat
trunk/sbfModelList.sh
Added Paths:
-----------
trunk/lib/paxtools/
trunk/lib/paxtools/paxtools-5.0.1.jar
Removed Paths:
-------------
trunk/lib/paxtools-4.2/
Added: trunk/lib/paxtools/paxtools-5.0.1.jar
===================================================================
(Binary files differ)
Index: trunk/lib/paxtools/paxtools-5.0.1.jar
===================================================================
--- trunk/lib/paxtools/paxtools-5.0.1.jar 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/lib/paxtools/paxtools-5.0.1.jar 2018-05-24 14:21:20 UTC (rev 729)
Property changes on: trunk/lib/paxtools/paxtools-5.0.1.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/zip
\ No newline at end of property
Modified: trunk/sbfConverter.bat
===================================================================
--- trunk/sbfConverter.bat 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfConverter.bat 2018-05-24 14:21:20 UTC (rev 729)
@@ -21,7 +21,7 @@
)
if %PATHVISIO_CONVERTER% == "no" (
- set CLASSPATH=%CONVERTER_HOME%.;%CONVERTER_HOME%lib\*;%CONVERTER_HOME%lib\paxtools-4.2\*
+ set CLASSPATH=%CONVERTER_HOME%.;%CONVERTER_HOME%lib\*;%CONVERTER_HOME%lib\paxtools\*
) else (
set CLASSPATH=%CONVERTER_HOME%.;%CONVERTER_HOME%lib\*;%CONVERTER_HOME%lib\pathvisio\*
set MODEL_NAME=BioPaxOldModel
Modified: trunk/sbfConverter.sh
===================================================================
--- trunk/sbfConverter.sh 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfConverter.sh 2018-05-24 14:21:20 UTC (rev 729)
@@ -70,7 +70,7 @@
if [ ${PATHVISIO_CONVERTER} == "no" ];
then
- export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools-4.2/paxtools-4.2.0-no-jena.jar
+ export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools*.jar
else
for jarFile in $LIB_PATH/pathvisio/*.jar
do
Modified: trunk/sbfConverterGUI.bat
===================================================================
--- trunk/sbfConverterGUI.bat 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfConverterGUI.bat 2018-05-24 14:21:20 UTC (rev 729)
@@ -2,7 +2,7 @@
set CONVERTER_HOME=%~dp0
-set CLASSPATH=%CONVERTER_HOME%.;%CONVERTER_HOME%lib\*;%CONVERTER_HOME%lib\paxtools-4.2\*
+set CLASSPATH=%CONVERTER_HOME%.;%CONVERTER_HOME%lib\*;%CONVERTER_HOME%lib\paxtools\*
rem echo "classpath= %CLASSPATH% "
rem echo %~dp0
Modified: trunk/sbfConverterGUI.sh
===================================================================
--- trunk/sbfConverterGUI.sh 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfConverterGUI.sh 2018-05-24 14:21:20 UTC (rev 729)
@@ -23,7 +23,7 @@
do
export CLASSPATH=$CLASSPATH:$jarFile
done
-export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools-4.2/paxtools*.jar
+export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools*.jar
java -Dmiriam.xml.export=${SBF_CONVERTER_HOME}/miriam.xml org.sbfc.converter.ConverterGUI
Modified: trunk/sbfConverterList.bat
===================================================================
--- trunk/sbfConverterList.bat 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfConverterList.bat 2018-05-24 14:21:20 UTC (rev 729)
@@ -2,7 +2,7 @@
set CONVERTER_HOME=%~dp0
-set CLASSPATH=%CONVERTER_HOME%.;%CONVERTER_HOME%lib\*;%CONVERTER_HOME%lib\paxtools-4.2\*
+set CLASSPATH=%CONVERTER_HOME%.;%CONVERTER_HOME%lib\*;%CONVERTER_HOME%lib\paxtools\*
rem echo "classpath= %CLASSPATH% "
rem echo %~dp0
Modified: trunk/sbfConverterList.sh
===================================================================
--- trunk/sbfConverterList.sh 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfConverterList.sh 2018-05-24 14:21:20 UTC (rev 729)
@@ -11,7 +11,7 @@
do
export CLASSPATH=$CLASSPATH:$jarFile
done
-export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools-4.2/paxtools-4.2.0-no-jena.jar
+export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools-*.jar
COMMAND="java "
Modified: trunk/sbfConverterOnline.sh
===================================================================
--- trunk/sbfConverterOnline.sh 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfConverterOnline.sh 2018-05-24 14:21:20 UTC (rev 729)
@@ -61,7 +61,7 @@
if [ ${PATHVISIO_CONVERTER} == "no" ];
then
- export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools-4.2/paxtools-4.2.0-no-jena.jar
+ export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools*.jar
else
for jarFile in $LIB_PATH/pathvisio/*.jar
do
Modified: trunk/sbfModelList.bat
===================================================================
--- trunk/sbfModelList.bat 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfModelList.bat 2018-05-24 14:21:20 UTC (rev 729)
@@ -2,7 +2,7 @@
set MODEL_HOME=%~dp0
-set CLASSPATH=%MODEL_HOME%.;%MODEL_HOME%lib\*;%CONVERTER_HOME%lib\paxtools-4.2\*
+set CLASSPATH=%MODEL_HOME%.;%MODEL_HOME%lib\*;%CONVERTER_HOME%lib\paxtools\*
rem echo "classpath= %CLASSPATH% "
rem echo %~dp0
Modified: trunk/sbfModelList.sh
===================================================================
--- trunk/sbfModelList.sh 2018-05-24 13:20:58 UTC (rev 728)
+++ trunk/sbfModelList.sh 2018-05-24 14:21:20 UTC (rev 729)
@@ -11,7 +11,7 @@
do
export CLASSPATH=$CLASSPATH:$jarFile
done
-export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools-4.2/paxtools-4.2.0-no-jena.jar
+export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools/paxtools*.jar
COMMAND="java "
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-05-24 13:21:01
|
Revision: 728
http://sourceforge.net/p/sbfc/code/728
Author: niko-rodrigue
Date: 2018-05-24 13:20:58 +0000 (Thu, 24 May 2018)
Log Message:
-----------
Upgraded to the latest paxtools, version 5.0.1. Fixed the problem with the creation of Control, we were creating Modulation by default but it can be used only for specific interaction, using Control by default fixed the problem.
Modified Paths:
--------------
trunk/lib/sbfc-1.3.8-SNAPSHOT.jar
trunk/sbfConverterGUI.sh
trunk/src/org/sbfc/converter/biopax2sbml/BioPAX2SBML.java
trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java
trunk/test/org/sbfc/test/sbml2biopax/SBMLSpeciesArmanTests.java
trunk/test/org/sbfc/test/sbml2biopax/TestSBMLFiles.java
Added Paths:
-----------
trunk/lib/paxtools-4.2/paxtools-5.0.1.jar
Removed Paths:
-------------
trunk/lib/paxtools-4.2/paxtools-4.2.0-no-jena.jar
Deleted: trunk/lib/paxtools-4.2/paxtools-4.2.0-no-jena.jar
===================================================================
(Binary files differ)
Added: trunk/lib/paxtools-4.2/paxtools-5.0.1.jar
===================================================================
(Binary files differ)
Index: trunk/lib/paxtools-4.2/paxtools-5.0.1.jar
===================================================================
--- trunk/lib/paxtools-4.2/paxtools-5.0.1.jar 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/lib/paxtools-4.2/paxtools-5.0.1.jar 2018-05-24 13:20:58 UTC (rev 728)
Property changes on: trunk/lib/paxtools-4.2/paxtools-5.0.1.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/zip
\ No newline at end of property
Modified: trunk/lib/sbfc-1.3.8-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: trunk/sbfConverterGUI.sh
===================================================================
--- trunk/sbfConverterGUI.sh 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/sbfConverterGUI.sh 2018-05-24 13:20:58 UTC (rev 728)
@@ -23,7 +23,7 @@
do
export CLASSPATH=$CLASSPATH:$jarFile
done
-export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools-4.2/paxtools-4.2.0-no-jena.jar
+export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools-4.2/paxtools*.jar
java -Dmiriam.xml.export=${SBF_CONVERTER_HOME}/miriam.xml org.sbfc.converter.ConverterGUI
Modified: trunk/src/org/sbfc/converter/biopax2sbml/BioPAX2SBML.java
===================================================================
--- trunk/src/org/sbfc/converter/biopax2sbml/BioPAX2SBML.java 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/src/org/sbfc/converter/biopax2sbml/BioPAX2SBML.java 2018-05-24 13:20:58 UTC (rev 728)
@@ -36,7 +36,6 @@
import org.biopax.paxtools.model.BioPAXElement;
import org.biopax.paxtools.model.BioPAXFactory;
import org.biopax.paxtools.model.BioPAXLevel;
-import org.biopax.paxtools.model.level2.evidence;
import org.biopax.paxtools.model.level3.BiochemicalPathwayStep;
import org.biopax.paxtools.model.level3.BiochemicalReaction;
import org.biopax.paxtools.model.level3.Catalysis;
@@ -80,17 +79,17 @@
import org.biopax.paxtools.model.level3.Xref;
import org.identifiers.registry.RegistryLocalProvider;
import org.identifiers.registry.RegistryUtilities;
+import org.sbfc.converter.GeneralConverter;
import org.sbfc.converter.biopaxL3converter.BioPAX2BioPAXL3;
import org.sbfc.converter.exceptions.ConversionException;
import org.sbfc.converter.exceptions.ReadModelException;
-import org.sbfc.converter.GeneralConverter;
import org.sbfc.converter.models.BioPAXModel;
import org.sbfc.converter.models.GeneralModel;
import org.sbfc.converter.models.SBMLModel;
import org.sbfc.ontology.OboOntology;
+import org.sbml.jsbml.ASTNode;
import org.sbml.jsbml.CVTerm;
import org.sbml.jsbml.CVTerm.Qualifier;
-import org.sbml.jsbml.ASTNode;
import org.sbml.jsbml.Compartment;
import org.sbml.jsbml.Creator;
import org.sbml.jsbml.History;
@@ -115,7 +114,6 @@
import org.sbml.jsbml.ext.comp.ModelDefinition;
import org.sbml.jsbml.ext.comp.ReplacedElement;
import org.sbml.jsbml.ext.comp.Submodel;
-import org.sbml.jsbml.ext.qual.QualModelPlugin;
import org.sbml.jsbml.xml.XMLAttributes;
import org.sbml.jsbml.xml.XMLNamespaces;
import org.sbml.jsbml.xml.XMLNode;
@@ -300,11 +298,11 @@
for (Gene gene : bioModel.getObjects(Gene.class))
{
- mappedEntities.put(gene.getRDFId(), parseEntity(gene));
+ mappedEntities.put(gene.getUri(), parseEntity(gene));
}
for (PhysicalEntity physicalEntity : bioModel.getObjects(PhysicalEntity.class))
{
- mappedEntities.put(physicalEntity.getRDFId(), parseEntity(physicalEntity));
+ mappedEntities.put(physicalEntity.getUri(), parseEntity(physicalEntity));
if(physicalEntity instanceof SimplePhysicalEntity)
{
@@ -404,7 +402,7 @@
boolean isControlledPathway = false;
for(org.biopax.paxtools.model.level3.Process controlledEntity : pathwayControl.getControlled())
{
- if(controlledEntity.getRDFId().equals(pathway.getRDFId()))
+ if(controlledEntity.getUri().equals(pathway.getUri()))
{
isControlledPathway = true;
break;
@@ -416,7 +414,7 @@
{
if(controller instanceof PhysicalEntity)
{
- Species controllerSpecies = (Species) mappedEntities.get(controller.getRDFId());
+ Species controllerSpecies = (Species) mappedEntities.get(controller.getUri());
addSpecies(controllerSpecies.getId(), subModel);
}
}
@@ -425,7 +423,7 @@
boolean isControllerPathway = false;
for(Controller controllerEntity : pathwayControl.getController())
{
- if(controllerEntity.getRDFId().equals(pathway.getRDFId()))
+ if(controllerEntity.getUri().equals(pathway.getUri()))
{
isControllerPathway = true;
break;
@@ -437,7 +435,7 @@
{
if(controlled instanceof PhysicalEntity)
{
- Reaction controlledReaction = (Reaction) mappedEntities.get(controlled.getRDFId());
+ Reaction controlledReaction = (Reaction) mappedEntities.get(controlled.getUri());
addReaction(controlledReaction.getId(), subModel);
}
}
@@ -451,7 +449,7 @@
//Add all species replacements and replacedby from submodels to toplevel_sbmlModel
for(PhysicalEntity physicalEntity : bioModel.getObjects(PhysicalEntity.class))
{
- Species species = (Species) mappedEntities.get(physicalEntity.getRDFId());
+ Species species = (Species) mappedEntities.get(physicalEntity.getUri());
//Keep track of how many times this species occur in each submodel
int count = 0;
for(ModelDefinition modelDef : compSBMLDocPlugin.getListOfModelDefinitions())
@@ -491,7 +489,7 @@
{
continue;
}
- Reaction reaction = (Reaction) mappedEntities.get(interactionEntity.getRDFId());
+ Reaction reaction = (Reaction) mappedEntities.get(interactionEntity.getUri());
//Keep track of how many times this reaction occur in the each submodel
int count = 0;
if(compSBMLDocPlugin.isSetListOfModelDefinitions())
@@ -743,7 +741,7 @@
//TODO: Find annotations example for this method.
if(entity.getAnnotations() != null && entity.getAnnotations().size() > 0)
{
- XMLNode annotNode = createAnnotatedObject(entityType, entity.getRDFId());
+ XMLNode annotNode = createAnnotatedObject(entityType, entity.getUri());
XMLNode commentNode = createAnnotatedProperty("annotations");
annotNode.addChild(commentNode);
for(Object annotObj : entity.getAnnotations().values())
@@ -773,7 +771,7 @@
//TODO: Find example for this method.
if(entity.getAvailability() != null && entity.getAvailability().size() > 0)
{
- XMLNode availNode = createAnnotatedObject(entityType, entity.getRDFId());
+ XMLNode availNode = createAnnotatedObject(entityType, entity.getUri());
XMLNode commentNode = createAnnotatedProperty("availability");
availNode.addChild(commentNode);
for(String availability : entity.getAvailability())
@@ -800,7 +798,7 @@
//TODO: Find example for this method.
if(entity.getComment() != null && entity.getComment().size() > 0)
{
- XMLNode commentAnnotNode = createAnnotatedObject(entityType, entity.getRDFId());
+ XMLNode commentAnnotNode = createAnnotatedObject(entityType, entity.getUri());
XMLNode commentNode = createAnnotatedProperty("comment");
commentAnnotNode.addChild(commentNode);
for(String comment : entity.getComment())
@@ -852,14 +850,14 @@
{
return;
}
- if(mappedEntities.get(entity.getRDFId()) != null)
+ if(mappedEntities.get(entity.getUri()) != null)
{
- Reaction pathwayComponent = (Reaction) mappedEntities.get(entity.getRDFId());
+ Reaction pathwayComponent = (Reaction) mappedEntities.get(entity.getUri());
addReaction(pathwayComponent.getId(), sbmlModel);
}
else
{
- throw new ConversionException("Unable to locate entity: " + entity.getRDFId() + " from the provided biopax file");
+ throw new ConversionException("Unable to locate entity: " + entity.getUri() + " from the provided biopax file");
}
}
else if(entity instanceof Pathway)
@@ -1190,7 +1188,7 @@
if(complex.getComponent().size() > 0)
{
BioPAXFactory bioPAXFactory = BioPAXLevel.L3.getDefaultFactory();
- ComplexAssembly complexAssembly = bioPAXFactory.create(ComplexAssembly.class, "ComplexAssembly_forComplexParticipant_" + complex.getRDFId());
+ ComplexAssembly complexAssembly = bioPAXFactory.create(ComplexAssembly.class, "ComplexAssembly_forComplexParticipant_" + complex.getUri());
Reaction caReaction = createReaction(complexAssembly);
caReaction.setReversible(false);
SpeciesReference product = createSpeciesReferences(complex);
@@ -1199,8 +1197,8 @@
ListOf<SpeciesReference> reactantList = addSpeciesReferences(complex.getComponent(), complex.getComponentStoichiometry());
caReaction.setListOfReactants(reactantList);
- sbmlId2biopaxId.put(caReaction.getId(), complexAssembly.getRDFId());
- mappedEntities.put(complexAssembly.getRDFId(), caReaction);
+ sbmlId2biopaxId.put(caReaction.getId(), complexAssembly.getUri());
+ mappedEntities.put(complexAssembly.getUri(), caReaction);
}
}
@@ -1240,7 +1238,7 @@
//TODO:
}
- String evidenceResouce = (evidenceCode_unifXrefId != null) ? evidenceCode_unifXrefId : evidence.getRDFId();
+ String evidenceResouce = (evidenceCode_unifXrefId != null) ? evidenceCode_unifXrefId : evidence.getUri();
//TODO: Determine QualifierType for Evidence entity
CVTerm evidence_CVTerm = createCVTerm(Qualifier.BQB_UNKNOWN, evidenceResouce);
@@ -1287,7 +1285,7 @@
annotationList = new ArrayList<XMLNode>();
if(evidenceCode.getComment() != null && evidenceCode.getComment().size() > 0)
{
- XMLNode commentAnnotNode = createAnnotatedObject("EvidenceCode", evidenceCode.getRDFId());
+ XMLNode commentAnnotNode = createAnnotatedObject("EvidenceCode", evidenceCode.getUri());
XMLNode commentNode = createAnnotatedProperty("comment");
commentAnnotNode.addChild(commentNode);
for(String comment : evidenceCode.getComment())
@@ -1332,9 +1330,9 @@
}
}
- if(entity.getRDFId() != null)
+ if(entity.getUri() != null)
{
- return entity.getRDFId();
+ return entity.getUri();
}
return null;
@@ -1348,25 +1346,25 @@
*/
private String getValidSBMLId(BioPAXElement entity)
{
- String RDFId = entity.getRDFId();
+ String RDFId = entity.getUri();
if(biopaxPrefixID != null && RDFId.startsWith(biopaxPrefixID))
{
RDFId = RDFId.replaceFirst(biopaxPrefixID, "");
}
- if(biopaxId2sbmlId.containsKey(entity.getRDFId()))
+ if(biopaxId2sbmlId.containsKey(entity.getUri()))
{
- return biopaxId2sbmlId.get(entity.getRDFId());
+ return biopaxId2sbmlId.get(entity.getUri());
}
else if(org.sbml.jsbml.validator.SyntaxChecker.isValidId(RDFId, sbmlLevel, sbmlVer))
{
- biopaxId2sbmlId.put(entity.getRDFId(), RDFId);
+ biopaxId2sbmlId.put(entity.getUri(), RDFId);
return RDFId;
}
//Convention for an SBML Id if the entity returns an invalid RDFId.
String newSBMLId = replaceInvalidSBMLcharId(RDFId);
- biopaxId2sbmlId.put(entity.getRDFId(), newSBMLId);
+ biopaxId2sbmlId.put(entity.getUri(), newSBMLId);
return newSBMLId;
}
@@ -1504,8 +1502,8 @@
}
- sbmlId2biopaxId.put(sbmlSpecies.getId(), entity.getRDFId());
- mappedEntities.put(entity.getRDFId(), sbmlSpecies);
+ sbmlId2biopaxId.put(sbmlSpecies.getId(), entity.getUri());
+ mappedEntities.put(entity.getUri(), sbmlSpecies);
return sbmlSpecies;
}
@@ -1630,15 +1628,15 @@
// Check if the compartment already exist in mappedEntities
if (cellularLocVocab != null)
{
- if (org.sbml.jsbml.validator.SyntaxChecker.isValidId(cellularLocVocab.getRDFId(), sbmlLevel, sbmlVer))
+ if (org.sbml.jsbml.validator.SyntaxChecker.isValidId(cellularLocVocab.getUri(), sbmlLevel, sbmlVer))
{
- if (mappedEntities.containsKey(physicalEntity.getCellularLocation().getRDFId()))
+ if (mappedEntities.containsKey(physicalEntity.getCellularLocation().getUri()))
{
- finalCompartment = (Compartment) mappedEntities.get(cellularLocVocab.getRDFId());
+ finalCompartment = (Compartment) mappedEntities.get(cellularLocVocab.getUri());
}
else
{
- org.sbml.jsbml.Compartment compartment = new Compartment(cellularLocVocab.getRDFId(), sbmlLevel, sbmlVer);
+ org.sbml.jsbml.Compartment compartment = new Compartment(cellularLocVocab.getUri(), sbmlLevel, sbmlVer);
String compartmentName = getValidSBMLName(cellularLocVocab);
if(compartmentName != null)
{
@@ -1661,7 +1659,7 @@
}
else
{
- String cellLocId = physicalEntity.getCellularLocation().getRDFId();
+ String cellLocId = physicalEntity.getCellularLocation().getUri();
String compartmentId = null;
if(cellLocId.contains("http://identifiers.org/"))
@@ -1697,8 +1695,8 @@
}
}
- sbmlId2biopaxId.put(finalCompartment.getId(), ((PhysicalEntity) entity).getCellularLocation().getRDFId());
- mappedEntities.put(((PhysicalEntity) entity).getCellularLocation().getRDFId(), finalCompartment);
+ sbmlId2biopaxId.put(finalCompartment.getId(), ((PhysicalEntity) entity).getCellularLocation().getUri());
+ mappedEntities.put(((PhysicalEntity) entity).getCellularLocation().getUri(), finalCompartment);
}
}
@@ -1724,7 +1722,7 @@
String compartmentId = null;
//Update this compartment uri with the latest uri if the uri is deprecated.
- String cellLocOfficialURI = link.getMiriamURI(cellLocVocab.getRDFId());
+ String cellLocOfficialURI = link.getMiriamURI(cellLocVocab.getUri());
if(cellLocOfficialURI != null)
{
@@ -1741,7 +1739,7 @@
if(compartmentId == null)
{
//http://identifiers.org/go/
- String temp = cellLocVocab.getRDFId().replace("http://identifiers.org/go/", "");
+ String temp = cellLocVocab.getUri().replace("http://identifiers.org/go/", "");
compartmentId = replaceInvalidSBMLcharId(temp);
}
return compartmentId;
@@ -1875,8 +1873,8 @@
}
setInteraction_SBO(entity, reaction);
- sbmlId2biopaxId.put(reaction.getId(), entity.getRDFId());
- mappedEntities.put(entity.getRDFId(), reaction);
+ sbmlId2biopaxId.put(reaction.getId(), entity.getUri());
+ mappedEntities.put(entity.getUri(), reaction);
}
/**
@@ -1924,7 +1922,7 @@
}
if(!hasModifier && !hasProduct)
{
- throw new ConversionException("This TemplateReaction must have as one modifier or one reactant: " + templateReaction.getRDFId());
+ throw new ConversionException("This TemplateReaction must have as one modifier or one reactant: " + templateReaction.getUri());
}
}
@@ -2080,8 +2078,8 @@
setConversion_SBO(conversion, reaction);
- sbmlId2biopaxId.put(reaction.getId(), conversion.getRDFId());
- mappedEntities.put(conversion.getRDFId(), reaction);
+ sbmlId2biopaxId.put(reaction.getId(), conversion.getUri());
+ mappedEntities.put(conversion.getUri(), reaction);
}
/**
@@ -2318,13 +2316,13 @@
{
ModifierSpeciesReference modifierSpecies = new ModifierSpeciesReference(sbmlLevel, sbmlVer);
- if(biopaxId2sbmlId.containsKey(entity.getRDFId()))
+ if(biopaxId2sbmlId.containsKey(entity.getUri()))
{
- modifierSpecies.setSpecies(biopaxId2sbmlId.get(entity.getRDFId()));
+ modifierSpecies.setSpecies(biopaxId2sbmlId.get(entity.getUri()));
}
else
{
- //throw new ConversionException("Unable to create a ModifierSpeciesReference with this entity: " + entity.getRDFId());
+ //throw new ConversionException("Unable to create a ModifierSpeciesReference with this entity: " + entity.getUri());
//TODO: if the entity is a pathway, TBD how to deal with it. maybe use annotations?
return null;
}
@@ -2432,14 +2430,14 @@
{
//Check if this process rdfId is contained within the hashmap table to see if sbml has this reaction id.
// get that equivalent sbml reaction and add the list of modifier reaction
- if(biopaxId2sbmlId.containsKey(process.getRDFId()))
+ if(biopaxId2sbmlId.containsKey(process.getUri()))
{
- Reaction controlledReaction = (Reaction) mappedEntities.get(process.getRDFId());
+ Reaction controlledReaction = (Reaction) mappedEntities.get(process.getUri());
controlledReactionList.add(controlledReaction);
}
else
{
- //throw new ConversionException("The reaction for " + process.getRDFId() + " must exist in the SBML Document in order to create a ModifierSpeciesReference for the Controlled interaction.");
+ //throw new ConversionException("The reaction for " + process.getUri() + " must exist in the SBML Document in order to create a ModifierSpeciesReference for the Controlled interaction.");
//TODO: if process is a pathway, then TBD. Maybe set as annotations?
}
}
@@ -2488,13 +2486,13 @@
SpeciesReference speciesReference = new SpeciesReference(sbmlLevel, sbmlVer);
//Check if participant species already exist in sbml model.
- if(biopaxId2sbmlId.containsKey(participant.getRDFId()))
+ if(biopaxId2sbmlId.containsKey(participant.getUri()))
{
- speciesReference.setSpecies(biopaxId2sbmlId.get(participant.getRDFId()));
+ speciesReference.setSpecies(biopaxId2sbmlId.get(participant.getUri()));
}
else
{
- throw new ConversionException("Could not find corresponding species for " + participant.getRDFId() + " to construct reaction reactant or product");
+ throw new ConversionException("Could not find corresponding species for " + participant.getUri() + " to construct reaction reactant or product");
}
/* Default settings for sbml SpeciesReference required attributes
Modified: trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java
===================================================================
--- trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java 2018-05-24 13:20:58 UTC (rev 728)
@@ -53,14 +53,13 @@
*
* @param model to be converted
* @return a BioPax L3 model
- * @throws ConversionException
- * @throws ReadModelException
+ * @throws ConversionException if an error occurs during conversion
+ * @throws ReadModelException if an error occurs while reading the model
*/
public GeneralModel biopaxExport(BioPAXModel model)
throws ConversionException, ReadModelException {
- if (model.getModel().getLevel().equals(BioPAXLevel.L1) ||
- model.getModel().getLevel().equals(BioPAXLevel.L2)) {
+ if (model.getModel().getLevel().equals(BioPAXLevel.L2)) {
LevelUpgrader levelUpgrader = new LevelUpgrader();
Model level3Model = levelUpgrader.filter(model.getModel());
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java 2018-05-24 13:20:58 UTC (rev 728)
@@ -1145,7 +1145,7 @@
Species speciesInstance = speciesReferenceObj.getSpeciesInstance();
//Creating the new PEP
- BioPAXElement newPEP = elementFactory.create(PHYSICAL_ENTITY_PARTICIPANT, direction + "_" + index + "_" + bioReaction.getRDFId() + "_" + speciesReference);
+ BioPAXElement newPEP = elementFactory.create(PHYSICAL_ENTITY_PARTICIPANT, direction + "_" + index + "_" + bioReaction.getUri() + "_" + speciesReference);
setDisplayName(newPEP, speciesReference);
@@ -1156,7 +1156,7 @@
//setting participant stoichiometry
double stoichiometry = speciesReferenceObj.getStoichiometry();
- BioPAXElement stoichio = setStoichiometry(bioReaction, newPEP, stoichiometry, direction + "_" + index + "_" + bioReaction.getRDFId() + "_" + speciesReference + "_STOICHIOMETRY", elementFactory);
+ BioPAXElement stoichio = setStoichiometry(bioReaction, newPEP, stoichiometry, direction + "_" + index + "_" + bioReaction.getUri() + "_" + speciesReference + "_STOICHIOMETRY", elementFactory);
if (direction.equals(LEFT_OF_REACTION))
{
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2018-05-24 13:20:58 UTC (rev 728)
@@ -65,6 +65,7 @@
import org.sbml.jsbml.AbstractSBase;
import org.sbml.jsbml.Annotation;
import org.sbml.jsbml.CVTerm;
+import org.sbml.jsbml.CVTerm.Qualifier;
import org.sbml.jsbml.Compartment;
import org.sbml.jsbml.KineticLaw;
import org.sbml.jsbml.LocalParameter;
@@ -73,7 +74,6 @@
import org.sbml.jsbml.SBO;
import org.sbml.jsbml.SBase;
import org.sbml.jsbml.Species;
-import org.sbml.jsbml.CVTerm.Qualifier;
/**
* The utility class where the conversion from a BioPAX Model to an SBML Model takes place.
@@ -319,8 +319,8 @@
KineticLaw reactionKL = reaction.getKineticLaw();
if(reactionKL != null)
{
- DeltaG deltaG = bioPAXFactory.create(DeltaG.class, biochemicalReaction.getRDFId() + "_deltaGId");
- KPrime kprime = bioPAXFactory.create(KPrime.class, biochemicalReaction.getRDFId() + "_KPrimeId");
+ DeltaG deltaG = bioPAXFactory.create(DeltaG.class, biochemicalReaction.getUri() + "_deltaGId");
+ KPrime kprime = bioPAXFactory.create(KPrime.class, biochemicalReaction.getUri() + "_KPrimeId");
for(LocalParameter localParam : reactionKL.getListOfLocalParameters())
{
@@ -491,7 +491,7 @@
}
else
{
- control = createBPEfromSBMLE(bpModel, Modulation.class, modifierSpeciesReference, modifierId);
+ control = createBPEfromSBMLE(bpModel, Control.class, modifierSpeciesReference, modifierId);
}
setControlType(control, modifierSpeciesReference.getSBOTerm());
@@ -1011,12 +1011,12 @@
for (Xref xref : complex.getXref()) {
ProteinReference proteinRef = xrefToProtein.get(xref.toString());
if(proteinRef != null) {
- String cProteinId = completeId(complex.getRDFId() + "_" + proteinRef.getRDFId());
+ String cProteinId = completeId(complex.getUri() + "_" + proteinRef.getUri());
Protein protein = bioPAXFactory.create(Protein.class, cProteinId);
protein.setDisplayName(proteinRef.getDisplayName());
protein.setStandardName(proteinRef.getStandardName());
protein.setEntityReference(proteinRef);
- if(!bpModel.containsID(protein.getRDFId())) {
+ if(!bpModel.containsID(protein.getUri())) {
components.add(protein);
bpModel.add(protein);
}
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java 2018-05-24 13:20:58 UTC (rev 728)
@@ -160,7 +160,7 @@
"There are more than one EntityReferences that match with the same unification xref for species: "
+ species.getName()
+ ". Picking the first one: "
- + ers.iterator().next().getRDFId()
+ + ers.iterator().next().getUri()
);
reference = (S) ers.iterator().next();
@@ -326,12 +326,12 @@
for (Xref xref : complex.getXref()) {
ProteinReference proteinRef = xrefToProtein.get(xref.toString());
if(proteinRef != null) {
- String cProteinId = completeId(complex.getRDFId() + "_" + proteinRef.getRDFId());
+ String cProteinId = completeId(complex.getUri() + "_" + proteinRef.getUri());
Protein protein = bioPAXFactory.create(Protein.class, cProteinId);
protein.setDisplayName(proteinRef.getDisplayName());
protein.setStandardName(proteinRef.getStandardName());
protein.setEntityReference(proteinRef);
- if(!bpModel.containsID(protein.getRDFId())) {
+ if(!bpModel.containsID(protein.getUri())) {
components.add(protein);
bpModel.add(protein);
}
Modified: trunk/test/org/sbfc/test/sbml2biopax/SBMLSpeciesArmanTests.java
===================================================================
--- trunk/test/org/sbfc/test/sbml2biopax/SBMLSpeciesArmanTests.java 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/test/org/sbfc/test/sbml2biopax/SBMLSpeciesArmanTests.java 2018-05-24 13:20:58 UTC (rev 728)
@@ -196,7 +196,7 @@
System.out.println("BioPAX Model contains an element with id 'S1' = " + biopaxModel.containsID(idBase + "S1") + ", "
+ (elem != null ? elem.getClass().getSimpleName() : " element 'S1' not found!"));
- System.out.println("BioPAX element with RDF:ID 'S1' = '" + elem.getRDFId() + "'");
+ System.out.println("BioPAX element with RDF:ID 'S1' = '" + elem.getUri() + "'");
assertTrue("The SBO ID 247 should be a biopax SmallMolecule", elem instanceof SmallMolecule);
Modified: trunk/test/org/sbfc/test/sbml2biopax/TestSBMLFiles.java
===================================================================
--- trunk/test/org/sbfc/test/sbml2biopax/TestSBMLFiles.java 2018-05-23 16:46:10 UTC (rev 727)
+++ trunk/test/org/sbfc/test/sbml2biopax/TestSBMLFiles.java 2018-05-24 13:20:58 UTC (rev 728)
@@ -91,7 +91,7 @@
//Get all compartments -> CellularLocationVocabulary
for(CellularLocationVocabulary compartment : bioModel.getObjects(CellularLocationVocabulary.class))
{
- if(!compartment.getRDFId().equals("CellularLocationVocabulary_3") && compartment.getRDFId().equals("defaultCompartment"))
+ if(!compartment.getUri().equals("CellularLocationVocabulary_3") && compartment.getUri().equals("defaultCompartment"))
{
Assert.assertFalse(true);
}
@@ -100,54 +100,54 @@
//Get all Species -> PhysicalEntity and Entity
for (PhysicalEntity physicalEntity : bioModel.getObjects(PhysicalEntity.class))
{
- if(physicalEntity.getRDFId().equals(XMLBase + "Protein_1"))
+ if(physicalEntity.getUri().equals(XMLBase + "Protein_1"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "CellularLocationVocabulary_3"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "CellularLocationVocabulary_3"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("Wnt8_protein"));
}
- else if(physicalEntity.getRDFId().equals(XMLBase + "Protein_25"))
+ else if(physicalEntity.getUri().equals(XMLBase + "Protein_25"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "defaultCompartment"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "defaultCompartment"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("Eve_protein"));
}
- else if(physicalEntity.getRDFId().equals(XMLBase + "Protein_2"))
+ else if(physicalEntity.getUri().equals(XMLBase + "Protein_2"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "CellularLocationVocabulary_3"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "CellularLocationVocabulary_3"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("beta-catenin_protein"));
}
- else if(physicalEntity.getRDFId().equals(XMLBase + "DnaRegion_23"))
+ else if(physicalEntity.getUri().equals(XMLBase + "DnaRegion_23"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "CellularLocationVocabulary_3"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "CellularLocationVocabulary_3"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("Eve_gene"));
}
- else if(physicalEntity.getRDFId().equals(XMLBase + "Complex_37"))
+ else if(physicalEntity.getUri().equals(XMLBase + "Complex_37"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "CellularLocationVocabulary_3"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "CellularLocationVocabulary_3"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("Beta-catenin-TCF1"));
}
- else if(physicalEntity.getRDFId().equals(XMLBase + "Protein_12"))
+ else if(physicalEntity.getUri().equals(XMLBase + "Protein_12"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "CellularLocationVocabulary_3"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "CellularLocationVocabulary_3"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("Blimp1/Krox_protein"));
}
- else if(physicalEntity.getRDFId().equals(XMLBase + "Protein_38"))
+ else if(physicalEntity.getUri().equals(XMLBase + "Protein_38"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "CellularLocationVocabulary_3"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "CellularLocationVocabulary_3"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("TCF1_protein"));
}
- else if(physicalEntity.getRDFId().equals(XMLBase + "DnaRegion_10"))
+ else if(physicalEntity.getUri().equals(XMLBase + "DnaRegion_10"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "CellularLocationVocabulary_3"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "CellularLocationVocabulary_3"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("Blimp1/Krox_gene"));
}
- else if(physicalEntity.getRDFId().equals(XMLBase + "DnaRegion_12"))
+ else if(physicalEntity.getUri().equals(XMLBase + "DnaRegion_12"))
{
- Assert.assertTrue(physicalEntity.getCellularLocation().getRDFId().equals(XMLBase + "CellularLocationVocabulary_3"));
+ Assert.assertTrue(physicalEntity.getCellularLocation().getUri().equals(XMLBase + "CellularLocationVocabulary_3"));
Assert.assertTrue(physicalEntity.getDisplayName().equals("Wnt8_gene"));
}
else
{
- System.out.println(physicalEntity.getRDFId());
+ System.out.println(physicalEntity.getUri());
Assert.assertFalse(true);
}
}
@@ -174,7 +174,7 @@
Assert.assertTrue(bioModel.getObjects(PhysicalEntity.class).size() == 0);
for (Gene gene : bioModel.getObjects(Gene.class))
{
- if(gene.getRDFId().equals(XMLBase + "Gene_1"))
+ if(gene.getUri().equals(XMLBase + "Gene_1"))
{
Assert.assertTrue(gene.getDisplayName().equals("MLC1"));
Assert.assertTrue(gene.getXref().size() == 1);
@@ -189,7 +189,7 @@
Assert.assertTrue(false);
}
}
- else if(gene.getRDFId().equals(XMLBase + "Gene_3"))
+ else if(gene.getUri().equals(XMLBase + "Gene_3"))
{
Assert.assertTrue(gene.getDisplayName().equals("MYO2"));
Assert.assertTrue(gene.getXref().size() == 1);
@@ -216,7 +216,7 @@
Assert.assertTrue(geneticInter.getDisplayName().equals("MYO2 - MLC1"));
for(Entity participant : geneticInter.getParticipant())
{
- if(!participant.getRDFId().equals(XMLBase + "Gene_1") && !participant.getRDFId().equals(XMLBase + "Gene_3"))
+ if(!participant.getUri().equals(XMLBase + "Gene_1") && !participant.getUri().equals(XMLBase + "Gene_3"))
{
Assert.assertTrue(false);
}
@@ -256,15 +256,15 @@
Assert.assertTrue(bioModel.getObjects(Protein.class).size() == 3);
for (Protein protein : bioModel.getObjects(Protein.class))
{
- if(protein.getRDFId().equals(XMLBase + "Protein_5"))
+ if(protein.getUri().equals(XMLBase + "Protein_5"))
{
Assert.assertTrue(protein.getDisplayName().equals("CHK2"));
}
- else if(protein.getRDFId().equals(XMLBase + "Protein_16"))
+ else if(protein.getUri().equals(XMLBase + "Protein_16"))
{
Assert.assertTrue(protein.getDisplayName().equals("CHK2"));
}
- else if(protein.getRDFId().equals(XMLBase + "Protein_27"))
+ else if(protein.getUri().equals(XMLBase + "Protein_27"))
{
Assert.assertTrue(protein.getDisplayName().equals("ATM"));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-05-23 16:46:13
|
Revision: 727
http://sourceforge.net/p/sbfc/code/727
Author: niko-rodrigue
Date: 2018-05-23 16:46:10 +0000 (Wed, 23 May 2018)
Log Message:
-----------
Several fixes to the sbml2biopax converter. Added back the main biopax pathway that was removed probably when working on sbml comp support. Added a name to the pathways. Trying to fix the conversion of sbml modifiers into biopax control.
Modified Paths:
--------------
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Arman.java
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java 2018-05-23 16:41:46 UTC (rev 726)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java 2018-05-23 16:46:10 UTC (rev 727)
@@ -126,7 +126,7 @@
public static String VERSION = "3.1";
// make this configurable in a configuration file ??
- public static final String MIRIAM_WS_URL = "http://www.ebi.ac.uk/miriamws/main/MiriamWebServices";
+ public static final String MIRIAM_WS_URL = "https://www.ebi.ac.uk/miriamws/main/MiriamWebServices";
@@ -824,7 +824,7 @@
//
// Set<? extends BioPAXElement> setOfcontrol = getListOfControl(bioReaction);
- String interactionId = "interaction_"+reaction.getId();
+ String interactionId = conversionId;
Set<? extends BioPAXElement> setOfInteraction = getListOfControl(bioReaction);
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Arman.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Arman.java 2018-05-23 16:41:46 UTC (rev 726)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Arman.java 2018-05-23 16:46:10 UTC (rev 727)
@@ -97,12 +97,12 @@
@Override
public String getResultExtension() {
- return ".owl";
+ return "-GSOC2014.owl";
}
@Override
public String getName() {
- return "SBML2BioPAX_Arman2014";
+ return "SBML2BioPAX GSOC 2014";
}
@Override
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java 2018-05-23 16:41:46 UTC (rev 726)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java 2018-05-23 16:46:10 UTC (rev 727)
@@ -94,12 +94,12 @@
@Override
public String getResultExtension() {
- return ".owl";
+ return "-GSOC2016.owl";
}
@Override
public String getName() {
- return "SBML2BioPAX_Tramy";
+ return "SBML2BioPAX GSOC 2016";
}
@Override
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2018-05-23 16:41:46 UTC (rev 726)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2018-05-23 16:46:10 UTC (rev 727)
@@ -28,7 +28,6 @@
import org.biopax.paxtools.model.level3.RnaRegion;
import org.biopax.paxtools.model.level3.Stoichiometry;
import org.biopax.paxtools.model.level3.TemplateReaction;
-import org.biopax.paxtools.model.level3.UnificationXref;
import org.sbml.jsbml.AbstractNamedSBase;
import org.sbml.jsbml.Compartment;
import org.sbml.jsbml.ListOf;
@@ -57,7 +56,13 @@
public class SBML2BioPAXConverter
{
+ /**
+ *
+ */
private static Log log = LogFactory.getLog(SBML2BioPAXConverter.class);
+ /**
+ *
+ */
private SBML2BioPAXUtilities sbml2BioPAXUtilities = new SBML2BioPAXUtilities();
/** SBML model id - SBase element id - SBase replacing element id - flag to indicate if replacement */
@@ -111,43 +116,45 @@
{
mapReplacements = new HashMap<String, Map<String, Map<String, Boolean>>>();
boolean isControlledReaction = false;
- org.sbml.jsbml.Model sbmlTopLevelModel = sbmlDocument.getModel();
+ org.sbml.jsbml.Model sbmlModel = sbmlDocument.getModel();
+ sbml2BioPAXUtilities.setXMLBase("https://sbml.org/model/" + sbmlModel.getId() + "#");
+
+ // TODO - check first if comp is enable and if there are any elements in the CompSBMLDocumentPlugin
CompSBMLDocumentPlugin compSBMLDocPlugin = (CompSBMLDocumentPlugin) sbmlDocument.getPlugin(CompConstants.shortLabel);
+ log.debug("First thing first: create a BioPAX model");
Model bpModel = sbml2BioPAXUtilities.createModel();
- CompModelPlugin compTopLevelModel = (CompModelPlugin) sbmlTopLevelModel.getExtension(CompConstants.shortLabel);
+ CompModelPlugin compModel = (CompModelPlugin) sbmlModel.getExtension(CompConstants.shortLabel);
- for(Species topLevelSpecies : sbmlTopLevelModel.getListOfSpecies())
+ for(Species species : sbmlModel.getListOfSpecies())
{
- parseSBMLCompElements(topLevelSpecies, compSBMLDocPlugin, compTopLevelModel);
+ parseSBMLCompElements(species, compSBMLDocPlugin, compModel);
}
- for(Reaction topLevelReaction : sbmlTopLevelModel.getListOfReactions())
+ for(Reaction reaction : sbmlModel.getListOfReactions())
{
- parseSBMLCompElements(topLevelReaction, compSBMLDocPlugin, compTopLevelModel);
+ parseSBMLCompElements(reaction, compSBMLDocPlugin, compModel);
}
- for(Compartment topLevelCompartment : sbmlTopLevelModel.getListOfCompartments())
+ for(Compartment compartment : sbmlModel.getListOfCompartments())
{
- parseSBMLCompElements(topLevelCompartment, compSBMLDocPlugin, compTopLevelModel);
+ parseSBMLCompElements(compartment, compSBMLDocPlugin, compModel);
}
System.out.println(mapReplacements.toString());
- log.debug("First thing first: create a BioPAX model");
- // Model bpModel = sbml2BioPAXUtilities.createModel();
log.debug("Now, let's create a Pathway that corresponds to this SBML model.");
- Pathway pathway = null;//sbml2BioPAXUtilities.convertPathway(bpModel, sbmlTopLevelModel);
+ Pathway pathway = sbml2BioPAXUtilities.convertPathway(bpModel, sbmlModel); // even with comp, we need a global pathway !
// Species -> PhysicalEntities [start]
- log.debug("There are " + sbmlTopLevelModel.getNumSpecies() + " reactions in the SBML model. ");
- parseSpecies(sbmlTopLevelModel, bpModel, null);
+ log.debug("There are " + sbmlModel.getNumSpecies() + " reactions in the SBML model. ");
+ parseSpecies(sbmlModel, bpModel, null);
// Reactions -> Conversions [start]
- log.debug("There are " + sbmlTopLevelModel.getNumReactions() + " reactions in the SBML model. ");
+ log.debug("There are " + sbmlModel.getNumReactions() + " reactions in the SBML model. ");
log.debug("Let's iterate over reactions and convert them one by one.");
- parseReactions(sbmlTopLevelModel, bpModel, pathway, null);
+ parseReactions(sbmlModel, bpModel, pathway, null);
- parseSubmodels(compTopLevelModel, compSBMLDocPlugin, bpModel);
+ parseSubmodels(compModel, compSBMLDocPlugin, bpModel);
// // The process above leaves some of the complexes empty. We need to fix this.
@@ -281,16 +288,15 @@
{
log.trace("Working on reaction conversion: " + reaction.getName());
Interaction interaction = sbml2BioPAXUtilities.convertReaction(bpModel, reaction, submodelId, mapReplacements);
- if(pathway != null)
+
+ if (pathway != null)
{
- pathway.addPathwayComponent(interaction);
+ pathway.addPathwayComponent(interaction);
}
// Modifiers -> Control reactions [start]
- log.trace(
- "- There are " + reaction.getNumModifiers() + " modifiers to this reaction. " +
- "Converting them to controls to this reaction."
- );
+ log.trace("- There are " + reaction.getNumModifiers() + " modifiers to this reaction. " +
+ "Converting them to controls to this reaction.");
parseModifier(sbmlModel, reaction, bpModel, interaction, pathway, submodelId);
// Reactants -> Left Participants [start]
@@ -324,32 +330,36 @@
{
ListOf<ModifierSpeciesReference> listOfModifiers = reaction.getListOfModifiers();
- for(ModifierSpeciesReference modifier : listOfModifiers)
+ for (ModifierSpeciesReference modifier : listOfModifiers)
{
Species species = sbmlModel.getSpecies(modifier.getSpecies());
- if(interaction instanceof GeneticInteraction)
+
+ if (interaction instanceof GeneticInteraction)
{
Gene gene = sbml2BioPAXUtilities.convertSpeciesToE(bpModel, Gene.class, species);
interaction.addParticipant(gene);
continue;
}
- else if(interaction instanceof TemplateReaction)
+ else if (interaction instanceof TemplateReaction)
{
TemplateReaction templateReaction = (TemplateReaction) interaction;
Entity entity = (Entity) sbml2BioPAXUtilities.convertSpecies(bpModel, species, species.getCompartmentInstance(), submodelId, mapReplacements);
- if(entity instanceof Dna || entity instanceof DnaRegion
+
+ if (entity instanceof Dna || entity instanceof DnaRegion
|| entity instanceof Rna || entity instanceof RnaRegion)
{
NucleicAcid templateEntity = (NucleicAcid) entity;
templateReaction.setTemplate(templateEntity);
}
- else if(sbml2BioPAXUtilities.isControlType(modifier.getSBOTerm()))
+ else if (sbml2BioPAXUtilities.isControlType(modifier.getSBOTerm()))
{
Control control = sbml2BioPAXUtilities.convertModifier(bpModel, modifier, reaction);
- if(pathway!= null)
+
+ if (pathway!= null)
{
- pathway.addPathwayComponent(control);
+ pathway.addPathwayComponent(control);
}
+
control.addControlled(interaction);
Controller controller = (Controller) sbml2BioPAXUtilities.convertSpecies(bpModel, species, species.getCompartmentInstance(), submodelId, mapReplacements);
control.addController(controller);
@@ -357,16 +367,19 @@
}
else
{
- if(SBO.isChildOf(modifier.getSBOTerm(), SBO.getCatalyst()))
+ if (SBO.isChildOf(modifier.getSBOTerm(), SBO.getCatalyst()))
{
Catalysis catalysis = (Catalysis) sbml2BioPAXUtilities.convertModifier(bpModel, modifier, reaction);
- if(pathway!= null)
+
+ if (pathway!= null)
{
- pathway.addPathwayComponent(catalysis);
+ pathway.addPathwayComponent(catalysis);
}
+
catalysis.addControlled(interaction);
Controller controller = (Controller) sbml2BioPAXUtilities.convertSpecies(bpModel, species, species.getCompartmentInstance(), submodelId, mapReplacements);
catalysis.addController(controller);
+
for (ModifierSpeciesReference modifier2 : listOfModifiers)
{
if (SBO.isChildOf(modifier2.getSBOTerm(), SBO.getCatalyst()))
@@ -376,18 +389,19 @@
Species species2 = sbmlModel.getSpecies(modifier2.getSpecies());
- if(modifier2.getSBOTerm() == SBO.getCatalyticActivator())
+ if (modifier2.getSBOTerm() == SBO.getCatalyticActivator())
{
PhysicalEntity cofactorEntity = (PhysicalEntity) sbml2BioPAXUtilities.convertSpecies(bpModel, species, species.getCompartmentInstance(), submodelId, mapReplacements);
catalysis.addCofactor(cofactorEntity);
}
- else if(sbml2BioPAXUtilities.isControlType(modifier2.getSBOTerm()))
+ else if (sbml2BioPAXUtilities.isControlType(modifier2.getSBOTerm()))
{
Modulation modulation = (Modulation) sbml2BioPAXUtilities.convertModifier(bpModel, modifier2, reaction);
- if(pathway!= null)
+
+ if (pathway!= null)
{
- pathway.addPathwayComponent(modulation);
+ pathway.addPathwayComponent(modulation);
}
modulation.addControlled(catalysis);
Controller controller2 = (Controller) sbml2BioPAXUtilities.convertSpecies(bpModel, species2, species2.getCompartmentInstance(), submodelId, mapReplacements);
@@ -395,6 +409,21 @@
}
}
}
+ else
+ {
+ // We create a control from the modifier
+ Control control = sbml2BioPAXUtilities.convertModifier(bpModel, modifier, reaction);
+
+ if (pathway!= null)
+ {
+ pathway.addPathwayComponent(control);
+ }
+
+ Controller controller = (Controller) sbml2BioPAXUtilities.convertSpecies(bpModel, species, species.getCompartmentInstance(), submodelId, mapReplacements);
+ control.addController(controller);
+ control.addControlled((org.biopax.paxtools.model.level3.Process) interaction);
+
+ }
}
// Modifiers -> Controls [end]
}
@@ -420,7 +449,8 @@
{
Species species = sbmlModel.getSpecies(speciesRef.getSpecies());
Entity entity = sbml2BioPAXUtilities.convertSpecies(bpModel, species, species.getCompartmentInstance(), submodelId, mapReplacements);
- if(interaction instanceof Conversion)
+
+ if (interaction instanceof Conversion)
{
Conversion conversion = (Conversion) interaction;
if(isLeft)
@@ -436,11 +466,11 @@
parseStoichiometry(reaction, speciesRef, conversion, sbmlModel, bpModel, submodelId);
}
}
- else if(interaction instanceof TemplateReaction)
+ else if (interaction instanceof TemplateReaction)
{
((TemplateReaction) interaction).addProduct((PhysicalEntity) entity);
}
- else if(interaction instanceof GeneticInteraction || interaction instanceof MolecularInteraction)
+ else if (interaction instanceof GeneticInteraction || interaction instanceof MolecularInteraction)
{
interaction.addParticipant(entity);
}
@@ -463,7 +493,8 @@
{
BioPAXFactory bioPAXFactory = BioPAXLevel.L3.getDefaultFactory();
String stoichId = null;
- if(speciesRef.isSetId())
+
+ if (speciesRef.isSetId())
{
stoichId = sbml2BioPAXUtilities.getXMLBase() + speciesRef.getId();
}
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2018-05-23 16:41:46 UTC (rev 726)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2018-05-23 16:46:10 UTC (rev 727)
@@ -120,14 +120,21 @@
* Convert an SBML model to a biopax pathway.
*
* @param bpModel - The biopax model to store the Pathway that was converted from the given SBML Model.
- * @param abstractNamedSBase - The AbstractNamedSBase to be converted to a pathway
+ * @param sbmlModel - The AbstractNamedSBase to be converted to a pathway
* @return The converted Pathway Entity from the given AbstractNamedSBase
*/
- public Pathway convertPathway(Model bpModel, AbstractNamedSBase abstractNamedSBase) {
- Pathway pathway = createBPEfromSBMLE(bpModel, Pathway.class, abstractNamedSBase);
- for (Xref xref : generateXrefsForSBase(bpModel, abstractNamedSBase)) {
+ public Pathway convertPathway(Model bpModel, AbstractNamedSBase sbmlModel) {
+ Pathway pathway = createBPEfromSBMLE(bpModel, Pathway.class, sbmlModel);
+ for (Xref xref : generateXrefsForSBase(bpModel, sbmlModel)) {
pathway.addXref(xref);
}
+
+ if (sbmlModel.isSetName()) {
+ pathway.addName(sbmlModel.getName());
+ }
+
+ // TODO - set organism
+
return pathway;
}
@@ -447,31 +454,29 @@
* @return The converted BioPAX Control Interaction
*/
public Control convertModifier(Model bpModel, ModifierSpeciesReference modifierSpeciesReference, Reaction reaction) {
- String modifierId = null;
- if(modifierSpeciesReference.isSetId())
+ String modifierId = null;
+
+ if (modifierSpeciesReference.isSetId())
{
- modifierId = getXMLBase() + modifierSpeciesReference.getId();
+ modifierId = completeId(modifierSpeciesReference.getId());
}
else
{
- /*
- * Note:
- * Special case when you have same modifierSpeciesReference multiple time
- *
- */
- modifierId = getXMLBase() + reaction.getId() + "__" + modifierSpeciesReference.getSpecies();
- modifierId = getUniqueEntityId(modifierId, bpModel);
+ modifierId = reaction.getId() + "_" + modifierSpeciesReference.getSpecies();
+
+ // Special case when you have same modifierSpeciesReference multiple time
+ modifierId = completeId(getUniqueEntityId(modifierId, bpModel));
}
Control control = null;
- //Check what type of control is this modifier
+ // Check what type of control is this modifier
int reactionSBOValue = reaction.getSBOTerm();
int modifierSBOValue = modifierSpeciesReference.getSBOTerm();
if(SBO.isChildOf(reactionSBOValue, SBO.getTemplateReaction()))
{
- //If reaction SBO value is a TemplateReaction (SBO:0000589), then create a TemplateReactionRegulation
+ // If reaction SBO value is a TemplateReaction (SBO:0000589), then create a TemplateReactionRegulation
control = createBPEfromSBMLE(bpModel, TemplateReactionRegulation.class, modifierSpeciesReference, modifierId);
}
else if(SBO.isChildOf(modifierSBOValue, SBO.getCatalyst()))
@@ -576,7 +581,7 @@
* @param entityClass - The type of SimplePhysicalEntity class to be created
* @param refClass - The SimplePhysicalEntity Reference class
* @param species - The species to be converted to a SimplePhysicalEntity
- * @return
+ * @return a SimplePhysicalEntity.
*/
public <T extends SimplePhysicalEntity, S extends EntityReference> T convertSpeciesToSPE(Model bpModel, Class<T> entityClass, Class<S> refClass, Species species) {
T entity = createBPEfromSBMLE(bpModel, entityClass, species);
@@ -686,16 +691,17 @@
*/
public <T extends Named> T createBPEfromSBMLE(Model bpModel, Class<T> aClass, AbstractNamedSBase abstractNamedSBase, String bpId) {
T entity = (T) bpModel.getByID(bpId);
- if(entity == null) {
+
+ if (entity == null) {
entity = bioPAXFactory.create(aClass, bpId);
setNames(abstractNamedSBase, entity);
- //TODO: future implementation for setting entity.comment(). Currently not supported in BioPAX2SBML
+ // TODO: future implementation for setting entity.comment(). Currently not supported in BioPAX2SBML
// setComments(abstractNamedSBase, entity);
bpModel.add(entity);
}
else
{
- // TODO: remove existing one
+ // TODO: remove existing one - NR: I would say nothing to do. We should create a different method to replace existing BioPAXElement
// replace with new one
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-05-23 16:41:47
|
Revision: 726
http://sourceforge.net/p/sbfc/code/726
Author: niko-rodrigue
Date: 2018-05-23 16:41:46 +0000 (Wed, 23 May 2018)
Log Message:
-----------
Using the converter names in the GUI now.
Modified Paths:
--------------
trunk/src/org/sbfc/converter/ConverterGUI.java
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2018-05-23 12:55:17 UTC (rev 725)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2018-05-23 16:41:46 UTC (rev 726)
@@ -229,7 +229,7 @@
GeneralConverter instance = (GeneralConverter) Class.forName(converterClass).newInstance();
converterInstances.add(instance);
converterClassNames.add(converterClassSimpleName);
- addDisplayName(converterDisplayNames, converterClassSimpleName);
+ addDisplayName(converterDisplayNames, instance.getName());
//System.out.println(instance.getName());
//System.out.println(instance.getDescription());
@@ -249,17 +249,23 @@
int sbml2sbmlIndex = converterClassNames.indexOf("SBML2SBML");
converterClassNames.remove(sbml2sbmlIndex);
GeneralConverter sbml2sbmlConverter = converterInstances.remove(sbml2sbmlIndex);
+ converterDisplayNames.remove(sbml2sbmlIndex);
converterClassNames.add("SBML2SBML_L3V1");
- converterInstances.add(sbml2sbmlConverter);
+ converterInstances.add(sbml2sbmlConverter);
+ converterDisplayNames.add("SBML to SBML L3 V1");
converterClassNames.add("SBML2SBML_L2V4");
converterInstances.add(sbml2sbmlConverter);
+ converterDisplayNames.add("SBML to SBML L2 V4");
converterClassNames.add("SBML2SBML_L2V3");
converterInstances.add(sbml2sbmlConverter);
+ converterDisplayNames.add("SBML to SBML L2 V3");
converterClassNames.add("SBML2SBML_L2V1");
converterInstances.add(sbml2sbmlConverter);
+ converterDisplayNames.add("SBML to SBML L2 V1");
converterClassNames.add("SBML2SBML_L1V2");
converterInstances.add(sbml2sbmlConverter);
+ converterDisplayNames.add("SBML to SBML L1 V2");
}
c.gridx = 1; // column 1
@@ -278,7 +284,7 @@
@Override
public String getElementAt(int index) {
- return converterClassNames.get(index);
+ return converterDisplayNames.get(index);
}
@Override
@@ -456,9 +462,9 @@
}
private void addDisplayName(ArrayList<String> converterDisplayNames,
- String converterClassSimpleName)
+ String converterDisplayName)
{
- // TODO
+ converterDisplayNames.add(converterDisplayName);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-05-23 12:55:19
|
Revision: 725
http://sourceforge.net/p/sbfc/code/725
Author: niko-rodrigue
Date: 2018-05-23 12:55:17 +0000 (Wed, 23 May 2018)
Log Message:
-----------
updated identifiers.org registry xml. Added javadoc to ConversionException.
Modified Paths:
--------------
trunk/miriam.xml
trunk/src/org/sbfc/converter/exceptions/ConversionException.java
Modified: trunk/miriam.xml
===================================================================
--- trunk/miriam.xml 2018-05-23 12:50:27 UTC (rev 724)
+++ trunk/miriam.xml 2018-05-23 12:55:17 UTC (rev 725)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Export of Identifiers.org's Registry (full) -->
-<!-- Generated: Wed, 26 Jul 2017 14:17:31 GMT -->
+<!-- Generated: Mon, 19 Mar 2018 14:06:44 GMT -->
<!-- http://identifiers.org/registry/ -->
-<miriam xmlns="http://www.biomodels.net/MIRIAM/" date="Wed, 26 Jul 2017 14:17:31 GMT" data-version="Fri, 21 Jul 2017 09:49:14 GMT">
+<miriam xmlns="http://www.biomodels.net/MIRIAM/" date="Mon, 19 Mar 2018 14:06:44 GMT" data-version="Tue, 13 Mar 2018 11:08:28 GMT">
<datatype id="MIR:00000001" pattern="^\d+$" restricted="true" obsolete="true" replacement="MIR:00000010">
<comment>BIND doesn't exist any more and its successor (BOND) is not open-access. Bulk downloads of BIND data (http://bond.unleashedinformatics.com/downloads/data/BIND/data/datasets/taxon/xml/) and a PSI-MI 2.5 translation (http://download.baderlab.org/BINDTranslation/) are available.</comment>
<name>BIND</name>
@@ -86,7 +86,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100565" state="up" reliability="93">
+ <resource id="MIR:00100565" state="down" reliability="94">
<dataResource>http://bioportal.bioontology.org/ontologies/CHEBI</dataResource>
<dataEntityExample>CHEBI:36927</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/CHEBI/$id</dataEntry>
@@ -110,7 +110,7 @@
</annotation>
</datatype>
- <datatype id="MIR:00000003" pattern="^((ENS[A-Z]*[FPTG]\d{11}(\.\d+)?)|(FB\w{2}\d{7})|(Y[A-Z]{2}\d{3}[a-zA-Z](\-[A-Z])?)|([A-Z_a-z0-9]+(\.)?(t)?(\d+)?([a-z])?))$" restricted="true">
+ <datatype id="MIR:00000003" pattern="^((ENS[FPTG]\\d{11}(\\.\\d+)?)|(FB\\w{2}\\d{7})|(Y[A-Z]{2}\\d{3}[a-zA-Z](\\-[A-Z])?)|([A-Z_a-z0-9]+(\\.)?(t)?(\\d+)?([a-z])?))$" restricted="true">
<name>Ensembl</name>
<definition>Ensembl is a joint project between EMBL - EBI and the Sanger Institute to develop a software system which produces and maintains automatic annotation on selected eukaryotic genomes. This collections also references outgroup organisms.</definition>
<uris>
@@ -169,6 +169,7 @@
<tag>eukaryotic</tag>
<tag>genome</tag>
<tag>nucleotide</tag>
+ <tag>schema.org</tag>
<tag>sequence</tag>
</tags>
<annotation>
@@ -218,7 +219,7 @@
<dataInstitution>Kyoto University Bioinformatics Center</dataInstitution>
<dataLocation>Japan</dataLocation>
</resource>
- <resource id="MIR:00100003" state="up" reliability="99">
+ <resource id="MIR:00100003" state="down" reliability="97">
<dataResource>http://enzyme.expasy.org/</dataResource>
<dataEntityExample>1.1.1.1</dataEntityExample>
<dataEntry>http://enzyme.expasy.org/EC/$id</dataEntry>
@@ -234,6 +235,14 @@
<dataInstitution>Trinity College, Dublin</dataInstitution>
<dataLocation>Ireland</dataLocation>
</resource>
+ <resource id="MIR:00100835" state="unknown" reliability="0">
+ <dataResource>https://www.ebi.ac.uk/enzymeportal</dataResource>
+ <dataEntityExample>1.1.1.1</dataEntityExample>
+ <dataEntry>https://www.ebi.ac.uk/enzymeportal/search/ec/$id</dataEntry>
+ <dataInfo>Enzyme Portal through EMBL-EBI</dataInfo>
+ <dataInstitution>Enzyme Portal at European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
+ <dataLocation>UK</dataLocation>
+ </resource>
</resources>
<tags>
<tag>classification</tag>
@@ -402,7 +411,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100507" state="up" reliability="83">
+ <resource id="MIR:00100507" state="down" reliability="85">
<dataResource>http://bioportal.bioontology.org/ontologies/NCBITAXON</dataResource>
<dataEntityExample>9606</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/NCBITAXON/$id</dataEntry>
@@ -410,7 +419,7 @@
<dataInstitution>National Center for Biomedical Ontology, Stanford</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100695" state="up" reliability="95">
+ <resource id="MIR:00100695" state="down" reliability="85">
<dataResource>http://taxonomy.bio2rdf.org/fct/</dataResource>
<dataEntityExample>9606</dataEntityExample>
<dataEntry>http://taxonomy.bio2rdf.org/describe/?url=http://bio2rdf.org/taxonomy:$id</dataEntry>
@@ -418,7 +427,7 @@
<dataInstitution>Bio2RDF.org</dataInstitution>
<dataLocation></dataLocation>
</resource>
- <resource id="MIR:00100770" state="up" reliability="98">
+ <resource id="MIR:00100770" state="up" reliability="99">
<dataResource>http://www.ebi.ac.uk/ols/ontologies/ncbitaxon/</dataResource>
<dataEntityExample>9606</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/ols/ontologies/ncbitaxon/terms?short_form=NCBITaxon_$id</dataEntry>
@@ -470,7 +479,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100107" state="up" reliability="81">
+ <resource id="MIR:00100107" state="up" reliability="82">
<dataResource>http://biomodels.caltech.edu/</dataResource>
<dataEntityExample>BIOMD0000000048</dataEntityExample>
<dataEntry>http://biomodels.caltech.edu/$id</dataEntry>
@@ -478,7 +487,7 @@
<dataInstitution>California Institute of Technology</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100674" state="down" reliability="41">
+ <resource id="MIR:00100674" state="down" reliability="34">
<dataResource>http://cu.biomodels.bio2rdf.org/fct/</dataResource>
<dataEntityExample>BIOMD0000000048</dataEntityExample>
<dataEntry>http://cu.biomodels.bio2rdf.org/describe/?url=http://bio2rdf.org/biomodels:$id</dataEntry>
@@ -486,6 +495,14 @@
<dataInstitution>Bio2RDF.org</dataInstitution>
<dataLocation></dataLocation>
</resource>
+ <resource id="MIR:00100855" state="unknown" reliability="0">
+ <dataResource>https://www.omicsdi.org/</dataResource>
+ <dataEntityExample>BIOMD0000000048</dataEntityExample>
+ <dataEntry>https://www.omicsdi.org/dataset/biomodels/$id</dataEntry>
+ <dataInfo>BioModels through OmicsDI</dataInfo>
+ <dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
+ <dataLocation>UK</dataLocation>
+ </resource>
</resources>
<tags>
<tag>model</tag>
@@ -531,6 +548,7 @@
</resources>
<tags>
<tag>registry</tag>
+ <tag>schema.org</tag>
</tags>
</datatype>
@@ -558,6 +576,7 @@
</resources>
<tags>
<tag>disease</tag>
+ <tag>schema.org</tag>
<tag>taxonomy</tag>
</tags>
<annotation>
@@ -630,7 +649,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100697" state="down" reliability="30">
+ <resource id="MIR:00100697" state="down" reliability="24">
<dataResource>http://interpro.bio2rdf.org/fct/</dataResource>
<dataEntityExample>IPR000100</dataEntityExample>
<dataEntry>http://interpro.bio2rdf.org/describe/?url=http://bio2rdf.org/interpro:$id</dataEntry>
@@ -812,7 +831,7 @@
<dataInstitution>Europe PubMed Central partners</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100702" state="down" reliability="17">
+ <resource id="MIR:00100702" state="down" reliability="13">
<dataResource>http://pubmed.bio2rdf.org/fct</dataResource>
<dataEntityExample>23735196</dataEntityExample>
<dataEntry>http://pubmed.bio2rdf.org/describe/?url=http://bio2rdf.org/pubmed:$id</dataEntry>
@@ -820,7 +839,7 @@
<dataInstitution>Bio2RDF.org</dataInstitution>
<dataLocation></dataLocation>
</resource>
- <resource id="MIR:00100745" state="down" reliability="90">
+ <resource id="MIR:00100745" state="up" reliability="87">
<dataResource>http://linkedlifedata.com/</dataResource>
<dataEntityExample>23735196</dataEntityExample>
<dataEntry>http://linkedlifedata.com/resource/pubmed/id/$id</dataEntry>
@@ -855,6 +874,7 @@
</resources>
<tags>
<tag>bibliography</tag>
+ <tag>schema.org</tag>
</tags>
<annotation>
<format name="SBML">
@@ -895,7 +915,7 @@
<dataInstitution>Johns Hopkins University, Baltimore, Maryland</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100694" state="up" reliability="95">
+ <resource id="MIR:00100694" state="down" reliability="86">
<dataResource>http://omim.bio2rdf.org/fct</dataResource>
<dataEntityExample>603903</dataEntityExample>
<dataEntry>http://omim.bio2rdf.org/describe/?url=http://bio2rdf.org/omim:$id</dataEntry>
@@ -1012,6 +1032,7 @@
<tag>human</tag>
<tag>pathway</tag>
<tag>reaction</tag>
+ <tag>schema.org</tag>
</tags>
<annotation>
<format name="SBML">
@@ -1039,7 +1060,7 @@
</uris>
<namespace>doi</namespace>
<resources>
- <resource id="MIR:00100010" state="up" reliability="99" primary="true">
+ <resource id="MIR:00100010" state="down" reliability="95" primary="true">
<dataResource>http://www.doi.org/</dataResource>
<dataEntityExample>10.1038/nbt1156</dataEntityExample>
<dataEntry>http://doi.org/$id</dataEntry>
@@ -1047,7 +1068,7 @@
<dataInstitution>International DOI Foundation</dataInstitution>
<dataLocation>United Kingdom</dataLocation>
</resource>
- <resource id="MIR:00100065" state="up" reliability="99">
+ <resource id="MIR:00100065" obsolete="true">
<dataResource>http://www.handle.net/index.html</dataResource>
<dataEntityExample>10.1038/nbt1156</dataEntityExample>
<dataEntry>http://hdl.handle.net/$id</dataEntry>
@@ -1055,7 +1076,7 @@
<dataInstitution>Corporation for National Research Initiatives</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100751" state="up" reliability="93">
+ <resource id="MIR:00100751" obsolete="true">
<dataResource>http://doai.io/</dataResource>
<dataEntityExample>10.1038/nbt1156</dataEntityExample>
<dataEntry>http://doai.io/$id</dataEntry>
@@ -1120,7 +1141,7 @@
<dataInstitution>Weizmann Institute of Science</dataInstitution>
<dataLocation>Israel</dataLocation>
</resource>
- <resource id="MIR:00100165" state="down" reliability="98">
+ <resource id="MIR:00100165" state="up" reliability="95">
<dataResource>http://www.pdbj.org/</dataResource>
<dataEntityExample>2gc4</dataEntityExample>
<dataEntry>http://pdbj.org/mine/summary/$id</dataEntry>
@@ -1208,7 +1229,7 @@
<documentation type="PMID">urn:miriam:pubmed:10802651</documentation>
</documentations>
<resources>
- <resource id="MIR:00100012" state="up" reliability="99">
+ <resource id="MIR:00100012" state="down" reliability="92">
<dataResource>http://www.ebi.ac.uk/QuickGO/</dataResource>
<dataEntityExample>GO:0006915</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/QuickGO/GTerm?id=$id</dataEntry>
@@ -1224,7 +1245,7 @@
<dataInstitution>The Gene Ontology Consortium</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100015" state="down" reliability="96">
+ <resource id="MIR:00100015" state="down" reliability="90">
<dataResource>http://www.informatics.jax.org/searches/GO_form.shtml</dataResource>
<dataEntityExample>GO:0006915</dataEntityExample>
<dataEntry>http://www.informatics.jax.org/searches/GO.cgi?id=$id</dataEntry>
@@ -1232,7 +1253,7 @@
<dataInstitution>The Jackson Laboratory</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100237" state="up" reliability="95">
+ <resource id="MIR:00100237" state="down" reliability="95">
<dataResource>http://bioportal.bioontology.org/ontologies/GO</dataResource>
<dataEntityExample>GO:0006915</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/GO/$id</dataEntry>
@@ -1308,17 +1329,17 @@
<documentation type="PMID">urn:miriam:pubmed:14681421</documentation>
</documentations>
<resources>
- <resource id="MIR:00100033" state="up" reliability="99" primary="true">
+ <resource id="MIR:00100033" state="down" reliability="94" primary="true">
<dataResource>http://www.yeastgenome.org/</dataResource>
- <dataEntityExample>S000028457</dataEntityExample>
+ <dataEntityExample>S000003909</dataEntityExample>
<dataEntry>http://www.yeastgenome.org/cgi-bin/locus.fpl?dbid=$id</dataEntry>
<dataInfo>SGD</dataInfo>
<dataInstitution>Stanford University</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100703" state="up" reliability="95">
+ <resource id="MIR:00100703" state="down" reliability="85">
<dataResource>http://sgd.bio2rdf.org/fct</dataResource>
- <dataEntityExample>S000006169</dataEntityExample>
+ <dataEntityExample>S000003909</dataEntityExample>
<dataEntry>http://sgd.bio2rdf.org/describe/?url=http://bio2rdf.org/sgd:$id</dataEntry>
<dataInfo>Bio2RDF</dataInfo>
<dataInstitution>Bio2RDF.org</dataInstitution>
@@ -1355,8 +1376,6 @@
<uris>
<uri type="URN">urn:miriam:sbo</uri>
<uri type="URL">http://identifiers.org/sbo/</uri>
- <uri type="URL" deprecated="true">http://identifiers.org/biomodels.sbo/</uri>
- <uri type="URL" deprecated="true">http://identifiers.org/obo.sbo/</uri>
<uri type="URN" deprecated="true">urn:miriam:biomodels.sbo</uri>
<uri type="URN" deprecated="true">urn:miriam:obo.sbo</uri>
<uri type="URL" deprecated="true">http://www.biomodels.net/SBO/</uri>
@@ -1383,7 +1402,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100242" state="down" reliability="90">
+ <resource id="MIR:00100242" state="down" reliability="88">
<dataResource>http://bioportal.bioontology.org/ontologies/SBO</dataResource>
<dataEntityExample>SBO:0000262</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/SBO/$id</dataEntry>
@@ -1518,7 +1537,7 @@
<dataInstitution>Cold Spring Harbor Laboratory</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100704" state="up" reliability="96">
+ <resource id="MIR:00100704" state="down" reliability="85">
<dataResource>http://wormbase.bio2rdf.org/fct</dataResource>
<dataEntityExample>WBGene00000001</dataEntityExample>
<dataEntry>http://wormbase.bio2rdf.org/describe/?url=http://bio2rdf.org/wormbase:$id</dataEntry>
@@ -1696,7 +1715,7 @@
<dataInstitution>National Center for Biotechnology Information (NCBI)</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100066" state="down" reliability="97">
+ <resource id="MIR:00100066" state="up" reliability="97">
<dataResource>http://www.ddbj.nig.ac.jp/</dataResource>
<dataEntityExample>X58356</dataEntityExample>
<dataEntry>http://getentry.ddbj.nig.ac.jp/getentry?database=ddbj&accession_number=$id</dataEntry>
@@ -1858,7 +1877,7 @@
<documentation type="PMID">urn:miriam:pubmed:16381852</documentation>
</documentations>
<resources>
- <resource id="MIR:00100056" state="up" reliability="99">
+ <resource id="MIR:00100056" state="down" reliability="97">
<dataResource>http://www.expasy.org/prosite/</dataResource>
<dataEntityExample>PS00001</dataEntityExample>
<dataEntry>http://prosite.expasy.org/$id</dataEntry>
@@ -1944,7 +1963,7 @@
<documentation type="PMID">urn:miriam:pubmed:17170002</documentation>
</documentations>
<resources>
- <resource id="MIR:00100059" state="up" reliability="98">
+ <resource id="MIR:00100059" state="up" reliability="99">
<dataResource>http://pubchem.ncbi.nlm.nih.gov/</dataResource>
<dataEntityExample>100101</dataEntityExample>
<dataEntry>http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=$id</dataEntry>
@@ -2013,7 +2032,7 @@
<documentation type="PMID">urn:miriam:pubmed:12519949</documentation>
</documentations>
<resources>
- <resource id="MIR:00100061" state="probably up" reliability="100">
+ <resource id="MIR:00100061" state="probably up" reliability="100" primary="true">
<dataResource>http://www.ebi.ac.uk/arrayexpress/</dataResource>
<dataEntityExample>E-MEXP-1712</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/arrayexpress/experiments/$id</dataEntry>
@@ -2021,6 +2040,14 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
+ <resource id="MIR:00100854" state="unknown" reliability="0">
+ <dataResource>https://www.omicsdi.org/</dataResource>
+ <dataEntityExample>E-MEXP-1712</dataEntityExample>
+ <dataEntry>https://www.omicsdi.org/dataset/arrayexpress-repository/$id</dataEntry>
+ <dataInfo>ArrayExpress through OmicsDI</dataInfo>
+ <dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
+ <dataLocation>UK</dataLocation>
+ </resource>
</resources>
<tags>
<tag>expression</tag>
@@ -2133,7 +2160,7 @@
<documentation type="PMID">urn:miriam:pubmed:17130148</documentation>
</documentations>
<resources>
- <resource id="MIR:00100067" state="down" reliability="95">
+ <resource id="MIR:00100067" state="down" reliability="89">
<dataResource>http://www.ncbi.nlm.nih.gov/projects/RefSeq/</dataResource>
<dataEntityExample>NP_012345</dataEntityExample>
<dataEntry>http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?val=$id</dataEntry>
@@ -2157,7 +2184,7 @@
</annotation>
</datatype>
- <datatype id="MIR:00000040" pattern="^\d+\.[A-Z]\.\d+\.\d+(\.\d+)?$">
+ <datatype id="MIR:00000040" pattern="^\d+(\.[A-Z])?(\.\d+)?(\.\d+)?(\.\d+)?$">
<name>Transport Classification Database</name>
<synonyms>
<synonym>TCDB</synonym>
@@ -2207,7 +2234,7 @@
<documentation type="PMID">urn:miriam:pubmed:14681372</documentation>
</documentations>
<resources>
- <resource id="MIR:00100069" state="down" reliability="80">
+ <resource id="MIR:00100069" state="up" reliability="79">
<dataResource>http://www.ebi.ac.uk/uniparc/</dataResource>
<dataEntityExample>UPI000000000A</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/cgi-bin/dbfetch?db=uniparc&id=$id</dataEntry>
@@ -2248,7 +2275,7 @@
<documentation type="PMID">urn:miriam:pubmed:17135203</documentation>
</documentations>
<resources>
- <resource id="MIR:00100070" state="down" reliability="83">
+ <resource id="MIR:00100070" state="down" reliability="77">
<dataResource>http://mint.bio.uniroma2.it/mint/</dataResource>
<dataEntityExample>MINT-10000</dataEntityExample>
<dataEntry>http://mint.bio.uniroma2.it/mint/search/inFrameInteraction.do?interactionAc=$id</dataEntry>
@@ -2256,7 +2283,7 @@
<dataInstitution>University of Rome Tor Vergata, Rome</dataInstitution>
<dataLocation>Italy</dataLocation>
</resource>
- <resource id="MIR:00100654" state="up" reliability="91">
+ <resource id="MIR:00100654" state="up" reliability="92">
<dataResource>http://www.ebi.ac.uk/intact/</dataResource>
<dataEntityExample>MINT-7905142</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/intact/query/interaction_id:$id</dataEntry>
@@ -2555,7 +2582,7 @@
<documentation type="PMID">urn:miriam:pubmed:12444417</documentation>
</documentations>
<resources>
- <resource id="MIR:00100078" state="up" reliability="84">
+ <resource id="MIR:00100078" state="up" reliability="85">
<dataResource>http://arabidopsis.org/index.jsp</dataResource>
<dataEntityExample>AT1G01030</dataEntityExample>
<dataEntry>http://arabidopsis.org/servlets/TairObject?type=locus&name=$id</dataEntry>
@@ -2578,7 +2605,7 @@
</annotation>
</datatype>
- <datatype id="MIR:00000051" pattern="^HMDB\d{5}$">
+ <datatype id="MIR:00000051" pattern="^HMDB\d+$">
<name>HMDB</name>
<synonyms>
<synonym>Human Metabolome Database</synonym>
@@ -2669,7 +2696,7 @@
<documentation type="PMID">urn:miriam:pubmed:18451766</documentation>
</documentations>
<resources>
- <resource id="MIR:00100081" state="up" reliability="98">
+ <resource id="MIR:00100081" state="up" reliability="98" primary="true">
<dataResource>http://www.peptideatlas.org/</dataResource>
<dataEntityExample>PAp00000009</dataEntityExample>
<dataEntry>https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/Summarize_Peptide?query=QUERY&searchForThis=$id</dataEntry>
@@ -2691,7 +2718,7 @@
</annotation>
</datatype>
- <datatype id="MIR:00000054" pattern="^GDS\d+$">
+ <datatype id="MIR:00000054" pattern="^G(PL|SM|SE|DS)\d+$">
<name>GEO</name>
<synonyms>
<synonym>Gene Expression Omnibus</synonym>
@@ -2706,10 +2733,10 @@
<documentation type="PMID">urn:miriam:pubmed:11752295</documentation>
</documentations>
<resources>
- <resource id="MIR:00100082" state="up" reliability="99">
+ <resource id="MIR:00100082" state="down" reliability="93">
<dataResource>http://www.ncbi.nlm.nih.gov/geo/</dataResource>
<dataEntityExample>GDS1234</dataEntityExample>
- <dataEntry>http://www.ncbi.nlm.nih.gov/sites/GDSbrowser?acc=$id</dataEntry>
+ <dataEntry>https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=$id</dataEntry>
<dataInfo>Gene Expression Omnibus at NCBI</dataInfo>
<dataInstitution>National Center for Biotechnology Information (NCBI)</dataInstitution>
<dataLocation>USA</dataLocation>
@@ -2739,7 +2766,7 @@
<documentation type="URL">http://www.geneontology.org/GO.evidence.shtml</documentation>
</documentations>
<resources>
- <resource id="MIR:00100083" state="down" reliability="89">
+ <resource id="MIR:00100083" state="down" reliability="82">
<dataResource>http://www.ebi.ac.uk/ols/ontologies/eco</dataResource>
<dataEntityExample>ECO:0000006</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/ols/ontologies/eco/terms?obo_id=$id</dataEntry>
@@ -2747,7 +2774,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100235" state="down" reliability="82">
+ <resource id="MIR:00100235" state="down" reliability="74">
<dataResource>http://bioportal.bioontology.org/ontologies/ECO</dataResource>
<dataEntityExample>ECO:0000006</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/ECO/$id</dataEntry>
@@ -2771,7 +2798,6 @@
<uris>
<uri type="URN">urn:miriam:mod</uri>
<uri type="URL">http://identifiers.org/mod/</uri>
- <uri type="URL" deprecated="true">http://identifiers.org/psimod/</uri>
<uri type="URL" deprecated="true">http://identifiers.org/obo.psi-mod/</uri>
<uri type="URN" deprecated="true">urn:miriam:obo.psi-mod</uri>
<uri type="URN" deprecated="true">urn:miriam:psimod</uri>
@@ -2860,7 +2886,7 @@
<documentation type="PMID">urn:miriam:pubmed:16381927</documentation>
</documentations>
<resources>
- <resource id="MIR:00100086" state="down" reliability="90">
+ <resource id="MIR:00100086" state="down" reliability="84">
<dataResource>http://thebiogrid.org/</dataResource>
<dataEntityExample>31623</dataEntityExample>
<dataEntry>http://thebiogrid.org/$id</dataEntry>
@@ -2895,7 +2921,7 @@
<documentation type="PMID">urn:miriam:pubmed:17991683</documentation>
</documentations>
<resources>
- <resource id="MIR:00100087" state="down" reliability="97">
+ <resource id="MIR:00100087" state="down" reliability="90">
<dataResource>http://merops.sanger.ac.uk/index.htm</dataResource>
<dataEntityExample>S01.001</dataEntityExample>
<dataEntry>http://merops.sanger.ac.uk/cgi-bin/pepsum?mid=$id</dataEntry>
@@ -2930,7 +2956,7 @@
<documentation type="PMID">urn:miriam:pubmed:12952881</documentation>
</documentations>
<resources>
- <resource id="MIR:00100088" state="probably up" reliability="96">
+ <resource id="MIR:00100088" state="probably up" reliability="97">
<dataResource>http://www.pantherdb.org/</dataResource>
<dataEntityExample>PTHR12345</dataEntityExample>
<dataEntry>http://www.pantherdb.org/panther/family.do?clsAccession=$id</dataEntry>
@@ -2967,7 +2993,7 @@
<documentation type="PMID">urn:miriam:pubmed:10592232</documentation>
</documentations>
<resources>
- <resource id="MIR:00100089" state="up" reliability="98">
+ <resource id="MIR:00100089" state="up" reliability="97">
<dataResource>http://www.bioinf.manchester.ac.uk/dbbrowser/sprint/</dataResource>
<dataEntityExample>PR00001</dataEntityExample>
<dataEntry>http://www.bioinf.manchester.ac.uk/cgi-bin/dbbrowser/sprint/searchprintss.cgi?prints_accn=$id&display_opts=Prints&category=None&queryform=false&regexpr=off</dataEntry>
@@ -3012,7 +3038,7 @@
<dataInstitution>Rutgers, The State University of New Jersey</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100615" state="up" reliability="98">
+ <resource id="MIR:00100615" state="up" reliability="97">
<dataResource>http://ligand-expo.rcsb.org/</dataResource>
<dataEntityExample>ABC</dataEntityExample>
<dataEntry>http://ligand-expo.rcsb.org/pyapps/ldHandler.py?formid=cc-index-search&target=$id&operation=ccid</dataEntry>
@@ -3079,7 +3105,7 @@
<documentation type="URL">http://www.worldcat.org/whatis/default.jsp</documentation>
</documentations>
<resources>
- <resource id="MIR:00100092" state="up" reliability="95">
+ <resource id="MIR:00100092" state="down" reliability="93">
<dataResource>http://isbndb.com/</dataResource>
<dataEntityExample>9781584885658</dataEntityExample>
<dataEntry>http://isbndb.com/search-all.html?kw=$id</dataEntry>
@@ -3087,7 +3113,7 @@
<dataInstitution>ISNBdb project, San Gabriel, California</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100093" state="down" reliability="94">
+ <resource id="MIR:00100093" state="down" reliability="88">
<dataResource>http://www.worldcat.org/</dataResource>
<dataEntityExample>9781584885658</dataEntityExample>
<dataEntry>http://www.worldcat.org/isbn/$id</dataEntry>
@@ -3126,7 +3152,7 @@
<documentation type="PMID">urn:miriam:pubmed:18428683</documentation>
</documentations>
<resources>
- <resource id="MIR:00100094" state="up" reliability="96" primary="true">
+ <resource id="MIR:00100094" state="up" reliability="97" primary="true">
<dataResource>http://www.ebi.ac.uk/pride/</dataResource>
<dataEntityExample>1</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/pride/archive/assays/$id</dataEntry>
@@ -3160,7 +3186,7 @@
<documentation type="URL">http://pubs.acs.org/doi/ipdf/10.1021/ci300309k</documentation>
</documentations>
<resources>
- <resource id="MIR:00100095" state="up" reliability="95">
+ <resource id="MIR:00100095" state="up" reliability="96">
<dataResource>http://www.3dmet.dna.affrc.go.jp/</dataResource>
<dataEntityExample>B00162</dataEntityExample>
<dataEntry>http://www.3dmet.dna.affrc.go.jp/cgi/show_data.php?acc=$id</dataEntry>
@@ -3209,7 +3235,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100236" state="up" reliability="95">
+ <resource id="MIR:00100236" state="down" reliability="95">
<dataResource>http://bioportal.bioontology.org/ontologies/FMA</dataResource>
<dataEntityExample>FMA:67112</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/FMA_subset/$id</dataEntry>
@@ -3244,7 +3270,7 @@
<documentation type="PMID">urn:miriam:pubmed:19147664</documentation>
</documentations>
<resources>
- <resource id="MIR:00100098" state="up" reliability="93" primary="true">
+ <resource id="MIR:00100098" state="down" reliability="88" primary="true">
<dataResource>http://matrixdb.univ-lyon1.fr/</dataResource>
<dataEntityExample>P00747__P07355</dataEntityExample>
<dataEntry>http://matrixdb.univ-lyon1.fr//cgi-bin/current/newPort?type=association&value=$id&class=Association</dataEntry>
@@ -3294,7 +3320,7 @@
<dataInstitution>National Center for Biotechnology Information (NCBI)</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100693" state="up" reliability="95">
+ <resource id="MIR:00100693" state="down" reliability="85">
<dataResource>http://ncbigene.bio2rdf.org/fct</dataResource>
<dataEntityExample>100010</dataEntityExample>
<dataEntry>http://ncbigene.bio2rdf.org/describe/?url=http://bio2rdf.org/ncbigene:$id</dataEntry>
@@ -3509,7 +3535,7 @@
<documentation type="URL">http://www.mmmp.org/MMMP/import.mmmp?page=aims_org.mmmp</documentation>
</documentations>
<resources>
- <resource id="MIR:00100105" state="up" reliability="94">
+ <resource id="MIR:00100105" state="up" reliability="95">
<dataResource>http://www.mmmp.org/MMMP/public/biomap/listBiomap.mmmp</dataResource>
<dataEntityExample>37</dataEntityExample>
<dataEntry>http://www.mmmp.org/MMMP/public/biomap/viewBiomap.mmmp?id=$id</dataEntry>
@@ -3544,7 +3570,7 @@
<documentation type="PMID">urn:miriam:pubmed:18651794</documentation>
</documentations>
<resources>
- <resource id="MIR:00100106" state="up" reliability="99">
+ <resource id="MIR:00100106" state="down" reliability="94">
<dataResource>http://www.wikipathways.org/</dataResource>
<dataEntityExample>WP100</dataEntityExample>
<dataEntry>http://www.wikipathways.org/instance/$id</dataEntry>
@@ -3703,7 +3729,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100698" state="up" reliability="95">
+ <resource id="MIR:00100698" state="down" reliability="85">
<dataResource>http://hgnc.bio2rdf.org/fct</dataResource>
<dataEntityExample>hgnc:2674</dataEntityExample>
<dataEntry>http://hgnc.bio2rdf.org/describe/?url=http://bio2rdf.org/$id</dataEntry>
@@ -3715,6 +3741,7 @@
<tags>
<tag>gene</tag>
<tag>human</tag>
+ <tag>schema.org</tag>
</tags>
<annotation>
<format name="SBML">
@@ -3743,7 +3770,7 @@
<documentation type="PMID">urn:miriam:pubmed:15892872</documentation>
</documentations>
<resources>
- <resource id="MIR:00100112" state="up" reliability="99">
+ <resource id="MIR:00100112" state="up" reliability="96">
<dataResource>http://www.sequenceontology.org/</dataResource>
<dataEntityExample>SO:0000704</dataEntityExample>
<dataEntry>http://www.sequenceontology.org/miso/current_release/term/$id</dataEntry>
@@ -3751,7 +3778,7 @@
<dataInstitution>Department of Molecular and Cellular Biology, University of California, Berkeley</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100241" state="up" reliability="93">
+ <resource id="MIR:00100241" state="down" reliability="93">
<dataResource>http://bioportal.bioontology.org/ontologies/SO</dataResource>
<dataEntityExample>SO:0000704</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/SO/$id</dataEntry>
@@ -3827,7 +3854,7 @@
<documentation type="URL">http://precedings.nature.com/documents/3214/version/1</documentation>
</documentations>
<resources>
- <resource id="MIR:00100114" state="down" reliability="81">
+ <resource id="MIR:00100114" state="down" reliability="74">
<dataResource>http://www.grenoble.prabi.fr/obiwarehouse/unipathway</dataResource>
<dataEntityExample>UPA00206</dataEntityExample>
<dataEntry>http://www.grenoble.prabi.fr/obiwarehouse/unipathway/upa?upid=$id</dataEntry>
@@ -3879,7 +3906,7 @@
<dataInstitution>Maastricht University</dataInstitution>
<dataLocation>The Netherlands</dataLocation>
</resource>
- <resource id="MIR:00100744" state="probably up" reliability="97">
+ <resource id="MIR:00100744" state="probably up" reliability="98">
<dataResource>https://www.ebi.ac.uk/rdf/services/chembl/</dataResource>
<dataEntityExample>CHEMBL308052</dataEntityExample>
<dataEntry>http://rdf.ebi.ac.uk/resource/chembl/molecule/$id</dataEntry>
@@ -3931,7 +3958,7 @@
<dataInstitution>Maastricht University</dataInstitution>
<dataLocation>The Netherlands</dataLocation>
</resource>
- <resource id="MIR:00100743" state="probably up" reliability="97">
+ <resource id="MIR:00100743" state="probably up" reliability="98">
<dataResource>http://rdf.ebi.ac.uk/resource/chembl/</dataResource>
<dataEntityExample>CHEMBL3467</dataEntityExample>
<dataEntry>http://rdf.ebi.ac.uk/resource/chembl/target/$id</dataEntry>
@@ -4046,7 +4073,7 @@
<documentation type="URL">http://www.whocc.no/atc_ddd_publications/guidelines/</documentation>
</documentations>
<resources>
- <resource id="MIR:00100119" state="down" reliability="91">
+ <resource id="MIR:00100119" state="down" reliability="84">
<dataResource>http://www.whocc.no/atc_ddd_index/</dataResource>
<dataEntityExample>A10BA02</dataEntityExample>
<dataEntry>http://www.whocc.no/atc_ddd_index/?code=$id</dataEntry>
@@ -4082,7 +4109,7 @@
<documentation type="PMID">urn:miriam:pubmed:22103613</documentation>
</documentations>
<resources>
- <resource id="MIR:00100120" state="up" reliability="86">
+ <resource id="MIR:00100120" state="down" reliability="80">
<dataResource>http://www.pharmgkb.org/</dataResource>
<dataEntityExample>PA146123006</dataEntityExample>
<dataEntry>http://www.pharmgkb.org/pathway/$id</dataEntry>
@@ -4116,7 +4143,7 @@
<documentation type="PMID">urn:miriam:pubmed:22103613</documentation>
</documentations>
<resources>
- <resource id="MIR:00100121" state="up" reliability="86">
+ <resource id="MIR:00100121" state="down" reliability="80">
<dataResource>http://www.pharmgkb.org/</dataResource>
<dataEntityExample>PA447218</dataEntityExample>
<dataEntry>http://www.pharmgkb.org/disease/$id</dataEntry>
@@ -4156,7 +4183,7 @@
<documentation type="PMID">urn:miriam:pubmed:22103613</documentation>
</documentations>
<resources>
- <resource id="MIR:00100122" state="up" reliability="85">
+ <resource id="MIR:00100122" state="down" reliability="80">
<dataResource>http://www.pharmgkb.org/</dataResource>
<dataEntityExample>PA448710</dataEntityExample>
<dataEntry>http://www.pharmgkb.org/drug/$id</dataEntry>
@@ -4193,7 +4220,7 @@
<documentation type="PMID">urn:miriam:pubmed:24265219</documentation>
</documentations>
<resources>
- <resource id="MIR:00100123" state="up" reliability="88">
+ <resource id="MIR:00100123" state="up" reliability="89">
<dataResource>http://bidd.nus.edu.sg/group/ttd/ttd.asp</dataResource>
<dataEntityExample>DAP000773</dataEntityExample>
<dataEntry>http://bidd.nus.edu.sg/group/TTD/ZFTTDDRUG.asp?ID=$id</dataEntry>
@@ -4228,7 +4255,7 @@
<documentation type="PMID">urn:miriam:pubmed:24265219</documentation>
</documentations>
<resources>
- <resource id="MIR:00100124" state="up" reliability="89">
+ <resource id="MIR:00100124" state="up" reliability="90">
<dataResource>http://bidd.nus.edu.sg/group/ttd/ttd.asp</dataResource>
<dataEntityExample>TTDS00056</dataEntityExample>
<dataEntry>http://bidd.nus.edu.sg/group/TTD/ZFTTDDetail.asp?ID=$id</dataEntry>
@@ -4262,7 +4289,7 @@
<documentation type="URL">http://senselab.med.yale.edu/NeuronDB/default.asp</documentation>
</documentations>
<resources>
- <resource id="MIR:00100125" state="down" reliability="92">
+ <resource id="MIR:00100125" state="down" reliability="84">
<dataResource>http://senselab.med.yale.edu/NeuronDB/</dataResource>
<dataEntityExample>265</dataEntityExample>
<dataEntry>http://senselab.med.yale.edu/NeuronDB/NeuronProp.aspx?id=$id</dataEntry>
@@ -4541,7 +4568,7 @@
<dataInstitution>Departments of Computing Science & Biological Sciences, University of Alberta</dataInstitution>
<dataLocation>Canada</dataLocation>
</resource>
- <resource id="MIR:00100691" state="up" reliability="96">
+ <resource id="MIR:00100691" state="down" reliability="86">
<dataResource>http://drugbank.bio2rdf.org/fct/</dataResource>
<dataEntityExample>DB00001</dataEntityExample>
<dataEntry>http://drugbank.bio2rdf.org/describe/?url=http://bio2rdf.org/drugbank:$id</dataEntry>
@@ -4617,7 +4644,7 @@
<documentation type="URL">http://www.smpdb.ca/</documentation>
</documentations>
<resources>
- <resource id="MIR:00100137" state="up" reliability="91">
+ <resource id="MIR:00100137" state="up" reliability="90">
<dataResource>http://www.smpdb.ca/pathways</dataResource>
<dataEntityExample>SMP00001</dataEntityExample>
<dataEntry>http://smpdb.ca/view/$id</dataEntry>
@@ -4658,7 +4685,7 @@
<documentation type="PMID">urn:miriam:pubmed:12478304</documentation>
</documentations>
<resources>
- <resource id="MIR:00100138" state="up" reliability="99">
+ <resource id="MIR:00100138" state="down" reliability="97">
<dataResource>http://www.phosphosite.org/homeAction.do</dataResource>
<dataEntityExample>12300</dataEntityExample>
<dataEntry>http://www.phosphosite.org/proteinAction.do?id=$id</dataEntry>
@@ -4727,7 +4754,7 @@
<documentation type="URL">http://teddyontology.sourceforge.net/</documentation>
</documentations>
<resources>
- <resource id="MIR:00100140" state="up" reliability="94">
+ <resource id="MIR:00100140" state="down" reliability="95">
<dataResource>http://teddyontology.sourceforge.net/</dataResource>
<dataEntityExample>TEDDY_0000066</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/TEDDY/$id</dataEntry>
@@ -4735,7 +4762,7 @@
<dataInstitution>National Center for Biomedical Ontology, Stanford</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100761" state="up" reliability="98">
+ <resource id="MIR:00100761" state="up" reliability="99">
<dataResource>http://www.ebi.ac.uk/ols/ontologies/teddy</dataResource>
<dataEntityExample>TEDDY_0000066</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/ols/ontologies/teddy/terms?short_form=$id</dataEntry>
@@ -4764,7 +4791,7 @@
<documentation type="URL">http://www.ebi.ac.uk/compneur-srv/kisao/</documentation>
</documentations>
<resources>
- <resource id="MIR:00100141" state="up" reliability="97">
+ <resource id="MIR:00100141" state="down" reliability="96">
<dataResource>http://bioportal.bioontology.org/ontologies/KISAO</dataResource>
<dataEntityExample>KISAO_0000057</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/KISAO/kisao:$id</dataEntry>
@@ -4772,7 +4799,7 @@
<dataInstitution>National Center for Biomedical Ontology, Stanford</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100757" state="up" reliability="98">
+ <resource id="MIR:00100757" state="up" reliability="99">
<dataResource>http://www.ebi.ac.uk/ols/ontologies/kisao</dataResource>
<dataEntityExample>KISAO_0000057</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/ols/ontologies/kisao/terms?short_form=$id</dataEntry>
@@ -4864,7 +4891,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100234" state="up" reliability="95">
+ <resource id="MIR:00100234" state="down" reliability="95">
<dataResource>http://bioportal.bioontology.org/ontologies/CL</dataResource>
<dataEntityExample>CL:0000232</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/CL/$id</dataEntry>
@@ -4912,7 +4939,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100233" state="up" reliability="95">
+ <resource id="MIR:00100233" state="down" reliability="95">
<dataResource>http://bioportal.bioontology.org/ontologies/BTO</dataResource>
<dataEntityExample>BTO:0000146</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/BTO/$id</dataEntry>
@@ -4959,7 +4986,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100238" state="up" reliability="95">
+ <resource id="MIR:00100238" state="down" reliability="95">
<dataResource>http://bioportal.bioontology.org/ontologies/PATO</dataResource>
<dataEntityExample>PATO:0001998</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/PATO/$id</dataEntry>
@@ -5033,7 +5060,7 @@
<documentation type="PMID">urn:miriam:pubmed:19759275</documentation>
</documentations>
<resources>
- <resource id="MIR:00100147" state="down" reliability="94">
+ <resource id="MIR:00100147" state="down" reliability="86">
<dataResource>http://www.glycome-db.org/showMenu.action?major=database</dataResource>
<dataEntityExample>1</dataEntityExample>
<dataEntry>http://www.glycome-db.org/database/showStructure.action?glycomeId=$id</dataEntry>
@@ -5137,7 +5164,7 @@
<documentation type="PMID">urn:miriam:pubmed:15608179</documentation>
</documentations>
<resources>
- <resource id="MIR:00100150" state="up" reliability="94">
+ <resource id="MIR:00100150" state="up" reliability="93">
<dataResource>http://prodom.prabi.fr/prodom/current/html/home.php</dataResource>
<dataEntityExample>PD10000</dataEntityExample>
<dataEntry>http://prodom.prabi.fr/prodom/current/cgi-bin/request.pl?question=DBEN&query=$id</dataEntry>
@@ -5245,7 +5272,7 @@
<documentation type="PMID">urn:miriam:pubmed:15892874</documentation>
</documentations>
<resources>
- <resource id="MIR:00100764" state="up" reliability="98">
+ <resource id="MIR:00100764" state="up" reliability="97">
<dataResource>http://obofoundry.org/ontology/ro.html</dataResource>
<dataEntityExample>RO_0002533</dataEntityExample>
<dataEntry>http://purl.obolibrary.org/obo/$id</dataEntry>
@@ -5253,7 +5280,7 @@
<dataInstitution>University of Michigan Medical School (MI), Lawrence Berkeley National Laboratory (CA) and Science Commons (MA)</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100767" state="up" reliability="98">
+ <resource id="MIR:00100767" state="up" reliability="99">
<dataResource>http://www.ebi.ac.uk/ols/ontologies/ro</dataResource>
<dataEntityExample>RO_0002533</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/ols/ontologies/ro/terms?short_form=$id</dataEntry>
@@ -5326,7 +5353,7 @@
<documentation type="PMID">urn:miriam:pubmed:17893861</documentation>
</documentations>
<resources>
- <resource id="MIR:00100155" state="up" reliability="95">
+ <resource id="MIR:00100155" state="up" reliability="96">
<dataResource>http://www.imexconsortium.org/</dataResource>
<dataEntityExample>IM-19210-3</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/intact/imex/main.xhtml?query=$id</dataEntry>
@@ -5334,7 +5361,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100663" state="up" reliability="96">
+ <resource id="MIR:00100663" state="up" reliability="97">
<dataResource>http://www.ebi.ac.uk/intact/</dataResource>
<dataEntityExample>IM-19210-3</dataEntityExample>
<dataEntry>https://imexcentral.org/icentral/imex/rec/$id</dataEntry>
@@ -5369,7 +5396,7 @@
<documentation type="URL">http://irefindex.uio.no/wiki/iRefIndex</documentation>
</documentations>
<resources>
- <resource id="MIR:00100156" state="up" reliability="97">
+ <resource id="MIR:00100156" state="up" reliability="98">
<dataResource>http://wodaklab.org/iRefWeb/</dataResource>
<dataEntityExample>617102</dataEntityExample>
<dataEntry>http://wodaklab.org/iRefWeb/interaction/show/$id</dataEntry>
@@ -5406,7 +5433,7 @@
<documentation type="PMID">urn:miriam:pubmed:18556668</documentation>
</documentations>
<resources>
- <resource id="MIR:00100157" state="down" reliability="94">
+ <resource id="MIR:00100157" state="down" reliability="86">
<dataResource>http://www.jcvi.org/mpidb/about.php</dataResource>
<dataEntityExample>172</dataEntityExample>
<dataEntry>http://www.jcvi.org/mpidb/experiment.php?interaction_id=$id</dataEntry>
@@ -5476,7 +5503,7 @@
<documentation type="PMID">urn:miriam:pubmed:18975148</documentation>
</documentations>
<resources>
- <resource id="MIR:00100160" state="up" reliability="95" primary="true">
+ <resource id="MIR:00100160" state="down" reliability="92" primary="true">
<dataResource>http://www.neurolex.org/wiki/Main_Page</dataResource>
<dataEntityExample>Birnlex_721</dataEntityExample>
<dataEntry>http://www.neurolex.org/wiki/$id</dataEntry>
@@ -5484,7 +5511,7 @@
<dataInstitution>Department of Neuroscience, University of California, San Diego</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100183" state="up" reliability="97">
+ <resource id="MIR:00100183" state="down" reliability="97">
<dataResource>http://bioportal.bioontology.org/ontologies/BIRNLEX</dataResource>
<dataEntityExample>birnlex_1672</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/BIRNLEX/$id</dataEntry>
@@ -5533,7 +5560,7 @@
<dataInstitution>University of Michigan Medical School (MI), awrence Berkeley National Laboratory (CA) and Science Commons (MA)</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100177" state="probably up" reliability="65">
+ <resource id="MIR:00100177" state="down" reliability="68">
<dataResource>http://bioportal.bioontology.org/ontologies/OBI</dataResource>
<dataEntityExample>OBI:0000070</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/OBI/$id</dataEntry>
@@ -5541,7 +5568,7 @@
<dataInstitution>National Center for Biomedical Ontology, Stanford</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100760" state="up" reliability="98">
+ <resource id="MIR:00100760" state="up" reliability="99">
<dataResource>http://www.ebi.ac.uk/ols/ontologies/obi</dataResource>
<dataEntityExample>OBI:0000070</dataEntityExample>
<dataEntry>http://www.ebi.ac.uk/ols/ontologies/obi/terms?obo_id=$id</dataEntry>
@@ -5626,7 +5653,7 @@
<documentation type="URL">http://sig.biostr.washington.edu/projects/biosim/opb-intro.html</documentation>
</documentations>
<resources>
- <resource id="MIR:00100167" state="down" reliability="68">
+ <resource id="MIR:00100167" state="down" reliability="62">
<dataResource>http://bioportal.bioontology.org/ontologies/OPB</dataResource>
<dataEntityExample>OPB_00573</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/OPB?conceptid=http%3A%2F%2Fbhi.washington.edu%2FOPB%23$id</dataEntry>
@@ -5663,7 +5690,7 @@
<documentation type="PMID">urn:miriam:pubmed:15072998</documentation>
</documentations>
<resources>
- <resource id="MIR:00100168" state="up" reliability="94">
+ <resource id="MIR:00100168" state="up" reliability="95">
<dataResource>http://jjj.biochem.sun.ac.za/models/</dataResource>
<dataEntityExample>curien</dataEntityExample>
<dataEntry>http://jjj.biochem.sun.ac.za/models/$id/</dataEntry>
@@ -5671,7 +5698,7 @@
<dataInstitution>Department of Biochemistry, Stellenbosch University</dataInstitution>
<dataLocation>South Africa</dataLocation>
</resource>
- <resource id="MIR:00100169" state="down" reliability="79">
+ <resource id="MIR:00100169" state="down" reliability="72">
<dataResource>http://jjj.bio.vu.nl/models/</dataResource>
<dataEntityExample>curien</dataEntityExample>
<dataEntry>http://jjj.bio.vu.nl/models/$id/</dataEntry>
@@ -5679,7 +5706,7 @@
<dataInstitution>University of Amsterdam</dataInstitution>
<dataLocation>Netherlands</dataLocation>
</resource>
- <resource id="MIR:00100170" state="up" reliability="73">
+ <resource id="MIR:00100170" state="up" reliability="75">
<dataResource>http://jjj.mib.ac.uk/index.html</dataResource>
<dataEntityExample>curien</dataEntityExample>
<dataEntry>http://jjj.mib.ac.uk/models/$id</dataEntry>
@@ -5792,7 +5819,7 @@
<documentation type="PMID">urn:miriam:pubmed:18832364</documentation>
</documentations>
<resources>
- <resource id="MIR:00100173" state="down" reliability="77">
+ <resource id="MIR:00100173" state="down" reliability="70">
<dataResource>http://pid.nci.nih.gov/</dataResource>
<dataEntityExample>pi3kcipathway</dataEntityExample>
<dataEntry>http://pid.nci.nih.gov/search/pathway_landing.shtml?what=graphic&jpg=on&pathway_id=$id</dataEntry>
@@ -5823,7 +5850,7 @@
<documentation type="PMID">urn:miriam:pubmed:12584128</documentation>
</documentations>
<resources>
- <resource id="MIR:00100174" state="up" reliability="97">
+ <resource id="MIR:00100174" state="up" reliability="96">
<dataResource>http://doqcs.ncbs.res.in/</dataResource>
<dataEntityExample>57</dataEntityExample>
<dataEntry>http://doqcs.ncbs.res.in/template.php?&y=accessiondetails&an=$id</dataEntry>
@@ -5859,7 +5886,7 @@
<documentation type="PMID">urn:miriam:pubmed:12584128</documentation>
</documentations>
<resources>
- <resource id="MIR:00100175" state="up" reliability="97">
+ <resource id="MIR:00100175" state="up" reliability="96">
<dataResource>http://doqcs.ncbs.res.in/</dataResource>
<dataEntityExample>131</dataEntityExample>
<dataEntry>http://doqcs.ncbs.res.in/template.php?&y=pathwaydetails&pn=$id</dataEntry>
@@ -5905,7 +5932,7 @@
<dataInstitution>European Bioinformatics Institute, Hinxton, Cambridge</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100243" state="up" reliability="96">
+ <resource id="MIR:00100243" state="down" reliability="96">
<dataResource>http://bioportal.bioontology.org/ontologies/UO</dataResource>
<dataEntityExample>UO:0000080</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/UO/$id</dataEntry>
@@ -5943,7 +5970,7 @@
<dataInstitution>National Library of Medicine and ClinicalTrials.gov, Maryland</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100692" state="up" reliability="95">
+ <resource id="MIR:00100692" state="down" reliability="85">
<dataResource>http://clinicaltrials.bio2rdf.org/fct</dataResource>
<dataEntityExample>NCT00222573</dataEntityExample>
<dataEntry>http://clinicaltrials.bio2rdf.org/describe/?url=http://bio2rdf.org/clinicaltrials:$id</dataEntry>
@@ -6011,7 +6038,7 @@
<documentation type="URL">http://ncit.nci.nih.gov/ncitbrowser/pages/help.jsf</documentation>
</documentations>
<resources>
- <resource id="MIR:00100181" state="down" reliability="64">
+ <resource id="MIR:00100181" state="down" reliability="58">
<dataResource>http://ncit.nci.nih.gov/</dataResource>
<dataEntityExample>C80519</dataEntityExample>
<dataEntry>http://ncit.nci.nih.gov/ncitbrowser/ConceptReport.jsp?dictionary=NCI%20Thesaurus&code=$id</dataEntry>
@@ -6048,7 +6075,7 @@
<documentation type="URL">http://www.biocatalogue.org/wiki/</documentation>
</documentations>
<resources>
- <resource id="MIR:00100182" state="up" reliability="93">
+ <resource id="MIR:00100182" state="up" reliability="94">
<dataResource>http://www.biocatalogue.org/</dataResource>
<dataEntityExample>614</dataEntityExample>
<dataEntry>https://www.biocatalogue.org/services/$id</dataEntry>
@@ -6062,14 +6089,14 @@
</tags>
</datatype>
- <datatype id="MIR:00000141" pattern="^PR\:\d+$">
+ <datatype id="MIR:00000141" pattern="^PR\:P?\d+$">
<name>Protein Ontology</name>
<definition>The PRotein Ontology (PRO) has been designed to describe the relationships of proteins and protein evolutionary classes, to delineate the multiple protein forms of a gene locus (ontology for protein forms), and to interconnect existing ontologies.</definition>
<uris>
<uri type="URN">urn:miriam:pr</uri>
<uri type="URL">http://identifiers.org/pr/</uri>
+ <uri type="URL" deprecated="true">http://identifiers.org/obo.pr/</uri>
<uri type="URN" deprecated="true">urn:miriam:obo.pr</uri>
- <uri type="URL" deprecated="true">http://identifiers.org/obo.pr/</uri>
</uris>
<namespace>pr</namespace>
<documentations>
@@ -6077,7 +6104,7 @@
<documentation type="URL">https://pir5.georgetown.edu/wiki/PRO</documentation>
</documentations>
<resources>
- <resource id="MIR:00100184" state="up" reliability="99">
+ <resource id="MIR:00100184" state="down" reliability="95">
<dataResource>http://pir.georgetown.edu/pro/pro.shtml</dataResource>
<dataEntityExample>PR:000000024</dataEntityExample>
<dataEntry>http://pir.georgetown.edu/cgi-bin/pro/entry_pro?id=$id</dataEntry>
@@ -6085,7 +6112,7 @@
<dataInstitution>Georgetown University Medical Center, Washington</dataInstitution>
<dataLocation>USA</dataLocation>
</resource>
- <resource id="MIR:00100240" state="up" reliability="86">
+ <resource id="MIR:00100240" state="down" reliability="87">
<dataResource>http://bioportal.bioontology.org/ontologies/PR</dataResource>
<dataEntityExample>PR:000000024</dataEntityExample>
<dataEntry>http://purl.bioontology.org/ontology/PR/$id</dataEntry>
@@ -6338,7 +6365,7 @@
<dataInstitution>Europe PubMed Central partners</dataInstitution>
<dataLocation>UK</dataLocation>
</resource>
- <resource id="MIR:00100747" state="up" reliability="97">
+ <resource id="MIR:00100747" state="down" reliability="94">
<dataResource>http://pubmedcentralcanada.ca/pmcc</dataResource>
<dataEntityExample>PMC3084216</dataEntityExample>
<dataEntry>http://pubmedcentralcanada.ca/pmcc/articles/$id</dataEntry>
@@ -6357,6 +6384,7 @@
</resources>
<tags>
<tag>bibliography</tag>
+ <tag>schema.org</tag>
</tags>
<annotation>
<format name="SBML">
@@ -6382,7 +6410,7 @@
<documentation type="PMID">urn:miriam:pubmed:19914931</documentation>
</documentations>
<resources>
- <resource id="MIR:00100193" state="down" reliability="87">
+ <resource id="MIR:00100193" state="down" reliability="78">
<dataResource>http://amoebadb.org/amoeba/</dataResource>
<dataEntityExample>EDI_244000</dataEntityExample>
<dataEntry>http://amoebadb.org/amoeba/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id</dataEntry>
@@ -6408,7 +6436,7 @@
<documentation type="PMID">urn:miriam:pubmed:16381902</documentation>
</documentations>
<resources>
- <resource id="MIR:00100194" state="down" reliability="86">
+ <resource id="MIR:00100194" state="down" reliability="78">
<dataResource>http://cryptodb.org/cryptodb/</dataResource>
<dataEntityExample>cgd7_230</dataEntityExample>
<dataEntry>http://cryptodb.org/cryptodb/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id</dataEntry>
@@ -6442,7 +6470,7 @@
<documentation type="PMID">urn:miriam:pubmed:18957442</documentation>
</documentations>
<resources>
- <resource id="MIR:00100195" state="down" reliability="86">
+ <resource id="MIR:00100195" state="down" reliability="78">
<dataResource>http://plasmodb.org/plasmo/</dataResource>
<dataEntityExample>PF11_0344</dataEntityExample>
<dataEntry>http://plasmodb.org/plasmo/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id</dataEntry>
@@ -6476,7 +6504,7 @@
<documentation type="PMID">urn:miriam:pubmed:18824479</documentation>
</documentations>
<resources>
- <resource id="MIR:00100196" state="down" reliability="87">
+ <resource id="MIR:00100196" state="down" reliability="78">
<dataResource>http://giardiadb.org/giardiadb/</dataResource>
<dataEntityExample>GL50803_102438</dataEntityExample>
<dataEntry>http://giardiadb.org/giardiadb/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id</dataEntry>
@@ -6510,7 +6538,7 @@
<documentation type="PMID">urn:miriam:pubmed:19914931</documentation>
</documentations>
<resources>
- <resource id="MIR:00100197" state="down" reliability="86">
+ <resource id="MIR:00100197" state="down" reliability="78">
<dataResource>http://microsporidiadb.org/micro/</dataResource>
<dataEntityExample>ECU03_0820i</dataEntityExample>
<dataEntry>http://microsporidiadb.org/micro/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id</dataEntry>
@@ -6544,7 +6572,7 @@
<documentation type="PMID">urn:miriam:pubmed:18003657</documentation>
</documentations>
<resources>
- <resource id="MIR:00100198" state="down" reliability="86">
+ <resource id="MIR:00100198" state="down" reliability="78">
<dataResource>http://toxodb.org/toxo/</dataResource>
<dataEntityExample>TGME49_053730</dataEntityExample>
<dataEntry>http://toxodb.org/toxo/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id</dataEntry>
@@ -6578,7 +6606,7 @@
<documentation type="PMID">urn:miriam:pubmed:18824479</documentation>
</documentations>
<resources>
- <resource id="MIR:00100199" state="down" reliability="86">
+ <resource id="MIR:00100199" state="down" reliability="78">
<dataResource>http://trichdb.org/trichdb/</dataResource>
<dataEntityExample>TVAG_386080</dataEntityExample>
<dataEntry>http://trichdb.org/trichdb/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id</dataEntry>
@@ -6615,7 +6643,7 @@
<documentation type="PMID">urn:miriam:pubmed:19843604</documentation>
</documentations>
<resources>
- <resource id="MIR:00100200" state="down" reliability="78">
+ <resource id="MIR:00100200" state="down" reliability="70">
<dataResource>http://tritrypdb.org/tritrypdb/</dataResource>
<dataEntityExample>Tb927.8.620</dataEntityExample>
<dataEntry>http://tritrypdb.org/tritrypdb/showRecord.do?name=GeneRecordClasses.GeneRecordClass&source_id=$id</dataEntry>
@@ -6652,7 +6680,7 @@
<documentation type="PMID">urn:miriam:pubmed:15238527</documentation>
</documentations>
<resources>
- <resource id="MIR:00100201" state="up" reliability="93">
+ <resource id="MIR:00100201" state="up" reliability="94">
<dataResource>http://flypush.imgen.bcm.tmc.edu/pscreen/</dataResource>
<dataEntityExample>KG09531</dataEntityExample>
<dataEntry>http://flypush.imgen.bcm.tmc.edu/pscreen/details.php?line=$id</dataEntry>
@@ -6686,7 +6714,7 @@
<documentation type="PMID">urn:miriam:pubmed:19820115</documentation>
</documentations>
<resources>
- <resource id="MIR:00100202" state="down" reliability="90">
+ <resource id="MIR:00100202" state="up" reliability="86">
<dataResource>http://beetlebase.org/</dataResource>
<dataEntityExample>TC010103</dataEntityExample>
<dataEntry>http://beetlebase.org/cgi-bin/gbrowse/BeetleBase3.gff3/?name=$id</dataEntry>
@@ -6772,7 +6800,...
[truncated message content] |
|
From: <nik...@us...> - 2018-05-23 12:50:31
|
Revision: 724
http://sourceforge.net/p/sbfc/code/724
Author: niko-rodrigue
Date: 2018-05-23 12:50:27 +0000 (Wed, 23 May 2018)
Log Message:
-----------
updated jsbml jar.
Modified Paths:
--------------
trunk/lib/sbfc-1.3.8-SNAPSHOT.jar
Added Paths:
-----------
trunk/lib/jsbml-1.3.1-with-dependencies.jar
Removed Paths:
-------------
trunk/lib/jsbml-1.2-with-dependencies.jar
Deleted: trunk/lib/jsbml-1.2-with-dependencies.jar
===================================================================
(Binary files differ)
Added: trunk/lib/jsbml-1.3.1-with-dependencies.jar
===================================================================
(Binary files differ)
Index: trunk/lib/jsbml-1.3.1-with-dependencies.jar
===================================================================
--- trunk/lib/jsbml-1.3.1-with-dependencies.jar 2018-04-20 14:15:21 UTC (rev 723)
+++ trunk/lib/jsbml-1.3.1-with-dependencies.jar 2018-05-23 12:50:27 UTC (rev 724)
Property changes on: trunk/lib/jsbml-1.3.1-with-dependencies.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/zip
\ No newline at end of property
Modified: trunk/lib/sbfc-1.3.8-SNAPSHOT.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-04-20 14:15:22
|
Revision: 723
http://sourceforge.net/p/sbfc/code/723
Author: niko-rodrigue
Date: 2018-04-20 14:15:21 +0000 (Fri, 20 Apr 2018)
Log Message:
-----------
removed the call to bsub in the shell script as it was not necessary
Modified Paths:
--------------
webServiceClient/sbfcWebService.sh
Modified: webServiceClient/sbfcWebService.sh
===================================================================
--- webServiceClient/sbfcWebService.sh 2018-04-20 12:55:22 UTC (rev 722)
+++ webServiceClient/sbfcWebService.sh 2018-04-20 14:15:21 UTC (rev 723)
@@ -8,15 +8,8 @@
export JAVA_HOME=/nfs/public/rw/webadmin/java/jdks/latest_1.8
export PATH=${JAVA_HOME}/bin:${PATH}
-COMMAND="bsub ${BSUB_OPTIONS} -o $LOG_FILE java $PROPERTIES"
+COMMAND="java $PROPERTIES"
-if [ "`which bsub 2> /dev/null`" == "" ] ; then
- COMMAND="java $PROPERTIES"
-fi
-
-
-
-
RESOLVE_LINK=`readlink -f $0`
SBF_CONVERTER_HOME=`dirname ${RESOLVE_LINK}`
LIB_PATH=${SBF_CONVERTER_HOME}/lib
@@ -72,7 +65,8 @@
echo "`basename $0`: Convertion, using $CONVERTER_NAME, for '$file'..." >> $LOG_FILE_MULTI 2>&1
echo "------------------------------------------------------------" >> $LOG_FILE_MULTI 2>&1
- nice $COMMAND org.sbfc.ws.LaunchSBMLConversionFromFile $file $CONVERTER_NAME >> $LOG_FILE_MULTI 2>&1 &
+ # nice $COMMAND org.sbfc.ws.LaunchSBMLConversionFromFile $file $CONVERTER_NAME >> $LOG_FILE_MULTI 2>&1 &
+ echo "Job not launched. You need to be extra careful when launching several conversions as launching too many of them can block the machine! Try with 10 first"
echo "$file - $CONVERTER_NAME"
sleep 1.2
done
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-04-20 12:55:24
|
Revision: 722
http://sourceforge.net/p/sbfc/code/722
Author: niko-rodrigue
Date: 2018-04-20 12:55:22 +0000 (Fri, 20 Apr 2018)
Log Message:
-----------
changed the method used to check the size of a file
Modified Paths:
--------------
sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java
Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java
===================================================================
--- sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java 2018-04-20 12:54:38 UTC (rev 721)
+++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java 2018-04-20 12:55:22 UTC (rev 722)
@@ -365,7 +365,7 @@
public static String readFileAsString(String filePath) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "UTF8"));
File file = new File(filePath);
- StringBuilder resultSB = new StringBuilder((int) file.getTotalSpace());
+ StringBuilder resultSB = new StringBuilder((int) file.length());
String line;
// Could use a java 8 construct but not really necessary now
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-04-20 12:54:40
|
Revision: 721
http://sourceforge.net/p/sbfc/code/721
Author: niko-rodrigue
Date: 2018-04-20 12:54:38 +0000 (Fri, 20 Apr 2018)
Log Message:
-----------
changed the method used to check the size of a file
Modified Paths:
--------------
webServiceClient/lib/sbfc-ws-client-1.1.jar
webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java
Modified: webServiceClient/lib/sbfc-ws-client-1.1.jar
===================================================================
(Binary files differ)
Modified: webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java
===================================================================
--- webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java 2018-04-20 11:04:33 UTC (rev 720)
+++ webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java 2018-04-20 12:54:38 UTC (rev 721)
@@ -441,7 +441,7 @@
public static String readFileAsString(String filePath) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "UTF8"));
File file = new File(filePath);
- StringBuilder resultSB = new StringBuilder((int) file.getTotalSpace());
+ StringBuilder resultSB = new StringBuilder((int) file.length());
String line;
// We could use a java 8 construct but not really necessary now
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-04-20 11:04:35
|
Revision: 720
http://sourceforge.net/p/sbfc/code/720
Author: niko-rodrigue
Date: 2018-04-20 11:04:33 +0000 (Fri, 20 Apr 2018)
Log Message:
-----------
improvements on the way we load files and how we extract the model from the request.
Modified Paths:
--------------
sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java
Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java
===================================================================
--- sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java 2018-04-20 11:02:08 UTC (rev 719)
+++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java 2018-04-20 11:04:33 UTC (rev 720)
@@ -9,6 +9,7 @@
import java.io.StringReader;
import java.net.URL;
import java.text.MessageFormat;
+import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -62,6 +63,9 @@
String method = null;
method = request.getParameter("method");
+// logger.info("Parameter map size = " + request.getParameterMap().size());
+// logger.info("parameters map keys @" + request.getParameterMap().keySet() + "@");
+
//SubmitJob method
if(method.compareTo("submit") == 0) {
@@ -71,7 +75,7 @@
converterType = request.getParameter("converterType");
String fileName = null;
- String inputModel="";
+ String inputModel = "";
//Checking that Parameters are set
if(inputModelType != null && !inputModelType.isEmpty() && converterType != null && !converterType.isEmpty()) {
@@ -113,25 +117,44 @@
}
}
//Converting model from the text_upload
- else if (request.getParameter("text_upload") != null && !request.getParameter("text_upload").isEmpty())
+ else // if (request.getParameter("text_upload") != null && !request.getParameter("text_upload").isEmpty())
{
- // inputModel = URLDecoder.decode(request.getParameter("text_upload"), "UTF-8");
- inputModel = request.getParameter("text_upload");
-
- // use request.getQueryString() to get the parameter with the errors ?
-
- fileName = request.getParameter("fileName");
-
- if (logger.isTraceEnabled()) {
- logger.debug("WebServiceServlet : input model =\n @" + inputModel + "@");
- }
+ if (request.getParameter("text_upload") != null && !request.getParameter("text_upload").isEmpty())
+ {
+ inputModel = request.getParameter("text_upload");
+ }
+ else
+ {
+ // Trying to extract the text_upload directly from the query - queryString does not work for post. Is it possible to read it from the request.reader ?
+ BufferedReader reader = request.getReader();
+ String allRequestBody = "";
+
+ while (reader.ready()) {
+ allRequestBody = reader.readLine() + "\n";
+ }
+
+ logger.info("allRequestBody = @" + allRequestBody + "@");
+
+ if (allRequestBody != null) {
+ int textUploadIndex = allRequestBody.indexOf("text_upload");
+ int endFileIndex = allRequestBody.indexOf("end_upload");
+
+ if (textUploadIndex != -1) {
+ inputModel = allRequestBody.substring(textUploadIndex + 11, endFileIndex);
+ // inputModel = URLDecoder.decode(inputModel, "UTF-8");
+ }
+ }
+ }
+
+ logger.info("parameters values length for text_upload = " + inputModel.length());
+
+ fileName = request.getParameter("fileName");
+
+ if (logger.isTraceEnabled()) {
+ logger.debug("WebServiceServlet : input model =\n @" + inputModel + "@");
+ }
}
- logger.info("Parameter map size = " + request.getParameterMap().size());
- logger.info("Model @" + inputModel + "@");
- logger.info("parameters map keys @" + request.getParameterMap().keySet() + "@");
- logger.info("parameters values length for text_upload = " + request.getParameterValues("text_upload").length);
-
if (fileName == null || fileName.trim().length() == 0) {
fileName = "Conversion_job";
}
@@ -167,7 +190,7 @@
// retrieving jobId
String jobId = ret;
- logger.info("WebServiceServlet - submit - 2 - job output = " + ret);
+ // logger.info("WebServiceServlet - submit - 2 - job output = " + ret);
int lowerThanIndex = jobId.indexOf("<");
if (lowerThanIndex != -1) {
@@ -220,18 +243,24 @@
String fileName = jobIdentification;
- logger.info("WebServiceServlet - getResult - filename = " + fileName + ", delete files = " + delete);
+ logger.info("WebServiceServlet - getResult - filename = " + fileName + ", delete files = " + delete + " - " + new Date());
//checking that the job is finished
if(jobStatus(idJob).compareTo("done") == 0) {
- BufferedReader in = new BufferedReader(new StringReader(returnResult(fileName, delete)));
+ String result = returnResult(fileName, delete);
+
+ logger.info("WebServiceServlet - getResult - result read in memory" + " - " + new Date());
- String line;
- while ((line = in.readLine()) != null) {
- response.getOutputStream().println(line);
- }
-
+ BufferedReader in = new BufferedReader(new StringReader(result));
+
+ String line;
+ while ((line = in.readLine()) != null) {
+ response.getOutputStream().println(line);
+ }
+
+ logger.info("WebServiceServlet - getResult - response written " + " - " + new Date());
+
}
else {
response.getOutputStream().println("Error while retrieving result, check jobStatus");
@@ -291,7 +320,8 @@
private String returnResult(String fileName, boolean delete) throws IOException {
File out = new File(filesPath + fileName + ".done");
String returnString = "";
- if(out.exists()) {
+
+ if (out.exists()) {
// Fetching the result file
// Listing all the files in the save directory
File folder = new File(filesPath);
@@ -309,7 +339,7 @@
}
else if(listOfFiles[i].getName().endsWith(".bsubout") || listOfFiles[i].getName().endsWith(".done")) {
if (delete) {
- listOfFiles[i].delete();
+ listOfFiles[i].delete(); // TODO - we can have errorLog as well !!
}
}
//this is the result file we had to work by elimination as we don't know the extension
@@ -325,22 +355,31 @@
return returnString;
}
- /**
- * Returns the content of a {@link File} as a String.
- *
- * @param filePath the path of the File to read
- * @return the content of a {@link File} as a String.
- * @throws IOException - If an I/O error occurs
- */
- private static String readFileAsString(String filePath) throws IOException{
- BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "UTF8"));
- String result="";
- String line;
- while ((line = in.readLine()) != null) {
- result+= line + System.getProperty("line.separator");
- }
- in.close();
- return result;
- }
+ /**
+ * Returns the content of a file as a String.
+ *
+ * @param filePath the path of the File to read
+ * @return the content of a file as a String.
+ * @throws IOException - If an I/O error occurs
+ */
+ public static String readFileAsString(String filePath) throws IOException{
+ BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "UTF8"));
+ File file = new File(filePath);
+ StringBuilder resultSB = new StringBuilder((int) file.getTotalSpace());
+ String line;
+
+ // Could use a java 8 construct but not really necessary now
+ // List<String> fileAsByteArray = Files.readAllLines(FileSystems.getDefault().getPath(filePath), Charset.forName("UTF-8"));
+
+ while ((line = in.readLine()) != null) {
+ resultSB.append(line).append(System.getProperty("line.separator"));
+ }
+ in.close();
+ String result = resultSB.toString();
+ // System.out.println("What is read by the java client:\n@" + result + "@"); // TODO - encode the String ? Error happening because of '%'
+
+ return result;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-04-20 11:02:11
|
Revision: 719
http://sourceforge.net/p/sbfc/code/719
Author: niko-rodrigue
Date: 2018-04-20 11:02:08 +0000 (Fri, 20 Apr 2018)
Log Message:
-----------
Updated the SBFC web service client so that it does encode properly the model before sending it to the server. Also tried to do a better job at reading the file into memory and waiting for the job to be finished.
Modified Paths:
--------------
webServiceClient/lib/sbfc-ws-client-1.1.jar
webServiceClient/sbfcWebService.sh
webServiceClient/src/org/sbfc/ws/LaunchSBMLConversionFromFile.java
webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java
webServiceClient/src/org/sbfc/ws/UsageExample.java
Added Paths:
-----------
webServiceClient/src/org/sbfc/exceptions/
webServiceClient/src/org/sbfc/exceptions/ConversionException.java
Modified: webServiceClient/lib/sbfc-ws-client-1.1.jar
===================================================================
(Binary files differ)
Modified: webServiceClient/sbfcWebService.sh
===================================================================
--- webServiceClient/sbfcWebService.sh 2018-04-13 16:09:09 UTC (rev 718)
+++ webServiceClient/sbfcWebService.sh 2018-04-20 11:02:08 UTC (rev 719)
@@ -74,7 +74,7 @@
nice $COMMAND org.sbfc.ws.LaunchSBMLConversionFromFile $file $CONVERTER_NAME >> $LOG_FILE_MULTI 2>&1 &
echo "$file - $CONVERTER_NAME"
- sleep 0.2
+ sleep 1.2
done
else
Added: webServiceClient/src/org/sbfc/exceptions/ConversionException.java
===================================================================
--- webServiceClient/src/org/sbfc/exceptions/ConversionException.java (rev 0)
+++ webServiceClient/src/org/sbfc/exceptions/ConversionException.java 2018-04-20 11:02:08 UTC (rev 719)
@@ -0,0 +1,70 @@
+/*
+ * $Id$
+ * $URL$
+ *
+ * ==========================================================================
+ * This file is part of The System Biology Format Converter (SBFC).
+ * Please visit <http://sbfc.sf.net> to have more information about
+ * SBFC.
+ *
+ * Copyright (c) 2010-2018 jointly by the following organizations:
+ * 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
+ * 2. The Babraham Institute, Cambridge, UK
+ * 3. Department of Bioinformatics, BiGCaT, Maastricht University
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation. A copy of the license agreement is provided
+ * in the file named "LICENSE.txt" included with this software distribution
+ * and also available online as
+ * <http://sbfc.sf.net/mediawiki/index.php/License>.
+ *
+ * ==========================================================================
+ *
+ */
+
+package org.sbfc.exceptions;
+
+/**
+ * The class {@link ConversionException} is a form of Throwable that indicates conditions when a conversion failed
+ * that a reasonable application might want to catch.
+ *
+ * @author rodrigue
+ *
+ */
+public class ConversionException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Creates a new {@link ConversionException} instance.
+ *
+ */
+ public ConversionException () { super (); }
+
+ /**
+ * Creates a new {@link ConversionException} instance.
+ *
+ * @param cause the original exception
+ */
+ public ConversionException (Throwable cause) { super (cause); }
+
+ /**
+ * Creates a new {@link ConversionException} instance.
+ *
+ * @param msg an information message describing the problem that just happened
+ */
+ public ConversionException (String msg) { super (msg); }
+
+ /**
+ * Creates a new {@link ConversionException} instance.
+ *
+ * @param msg an information message describing the problem that just happened
+ * @param cause the original exception
+ */
+ public ConversionException (String msg, Throwable cause) { super (msg, cause); }
+}
+
Modified: webServiceClient/src/org/sbfc/ws/LaunchSBMLConversionFromFile.java
===================================================================
--- webServiceClient/src/org/sbfc/ws/LaunchSBMLConversionFromFile.java 2018-04-13 16:09:09 UTC (rev 718)
+++ webServiceClient/src/org/sbfc/ws/LaunchSBMLConversionFromFile.java 2018-04-20 11:02:08 UTC (rev 719)
@@ -26,7 +26,10 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Calendar;
+import java.util.Date;
+import org.sbfc.exceptions.ConversionException;
+
/**
* Launching a conversion from a file for using the SBFC web Service.
*
@@ -39,8 +42,9 @@
* @param args the arguments of the program
* @throws IOException if there is a problem reading one of the input files
* @throws InterruptedException if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public static void main(String[] args) throws IOException, InterruptedException {
+ public static void main(String[] args) throws IOException, InterruptedException, ConversionException {
if (args.length == 0) {
System.out.println("To run this example, an SBML model must be passed as input parameter.");
@@ -48,17 +52,17 @@
}
// Creating the link to the web service
- SBFCWebServiceClient link = new SBFCWebServiceClient();
+ // SBFCWebServiceClient link = new SBFCWebServiceClient();
+ // You can also initialize the WS link using your own url to connect to a private server
+ SBFCWebServiceClient link = new SBFCWebServiceClient("http://localhost:8080/biomodels/tools/converters/webService");
long before = Calendar.getInstance().getTimeInMillis();
- // You can also initialize the WS link using your own url to connect to a private server
- // SBFCWebServiceClient link = new SBFCWebServiceClient("http://localhost:8080/biomodels/tools/converters/webService");
String sbmlModelPath = args[0];
String converter = args[1];
String inputType = ConverterParam.SBMLModel;
- System.out.print("Sending the conversion job...");
+ System.out.print("Sending the conversion job...\n");
// Launching the second conversion: SBML file to SBML level 3 version 1
String convertionResult = link.submitAndGetResultFromFile(sbmlModelPath, inputType, converter);
@@ -89,7 +93,7 @@
converterSuffix = "-sbml" + converterSuffix.substring(4) + ".xml";
}
- System.out.print("writing to '" + convertedModelPrefix + converterSuffix);
+ System.out.print("writing to '" + convertedModelPrefix + converterSuffix + " - " + new Date());
PrintWriter out = new PrintWriter(new FileWriter(convertedModelPrefix + converterSuffix));
out.print(convertionResult);
Modified: webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java
===================================================================
--- webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java 2018-04-13 16:09:09 UTC (rev 718)
+++ webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java 2018-04-20 11:02:08 UTC (rev 719)
@@ -25,6 +25,7 @@
package org.sbfc.ws;
import java.io.BufferedReader;
+import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
@@ -32,8 +33,19 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+// import java.net.URLEncoder;
import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+import org.sbfc.exceptions.ConversionException;
+
/**
* This class allows to request conversion jobs to the SBFC web-service
*
@@ -50,21 +62,15 @@
private String SBFC_WEB_SERVICE_URL = "https://www.ebi.ac.uk/biomodels/tools/converters/webService";
/**
- * Interval of time in millisecond between two check for a job status
+ * Interval of time in second between two checks for a job status
*/
- public int JOB_STATUS_INTERVAL = 3000;
+ public int JOB_STATUS_INTERVAL = 10; // TODO - add methods to change those values
/**
- * Interval of time in millisecond to increase the job status check if it is getting long.
+ * Interval of time in minutes after which we stop checking the job status.
*/
- public int JOB_STATUS_INTERVAL_INCREASE = 3000;
-
- /**
- * Interval of time in millisecond after which we stop checking the job status.
- */
- public int JOB_MAXIMUM_TIME = 60000 * 10; // 60s x 10 = 10min
-
-
+ public int JOB_MAXIMUM_TIME = 6;
+
/**
* Creates a new instance of {@link SBFCWebServiceClient}
*/
@@ -88,24 +94,38 @@
* @param inputModelType the class name of the input format
* @param converterType the class name of the converter
* @return some metadata about the conversion job.
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public ConversionInfo submitJobFromFile(String filePath, String inputModelType, String converterType) {
- ConversionInfo convertionId = new ConversionInfo(); // TODO - add time where the object was created
+ public ConversionInfo submitJobFromFile(String filePath, String inputModelType, String converterType) throws ConversionException {
+ ConversionInfo convertionId = new ConversionInfo();
+ System.out.println("\nGoing to read the model into memory - " + new Date());
+
String model = "";
try {
model = readFileAsString(filePath);
+ model = URLEncoder.encode(model, "UTF-8");
} catch (IOException e) {
- throw new RuntimeException(e);
+ throw new ConversionException(e);
}
-
+ File file = new File(filePath);
+ String fileName = file.getName();
+
+ System.out.println("\nModel read and url encoded - " + new Date());
+
//Build parameter string
- String data = "method=submit&inputModelType="+inputModelType+"&converterType="+converterType+"&text_upload="+model;
-
+ StringBuilder dataSB = new StringBuilder(model.length() + 200);
+ dataSB.append("method=submit&inputModelType=").append(inputModelType).append("&converterType=").append(converterType);
+ dataSB.append("&fileName=").append(fileName).append("&text_upload=").append(model);
+
+ String data = dataSB.toString();
+
//Sending POST request to the server
sendPostRequest(data, convertionId);
-
+
+ System.out.println("\nRequest sent - " + new Date());
+
return convertionId;
}
@@ -117,13 +137,13 @@
* @param inputModelType the class name of the input format
* @param converterType the class name of the converter
* @return some metadata about the conversion job.
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public ConversionInfo submitJobFromString(String model,String inputModelType, String converterType) {
+ public ConversionInfo submitJobFromString(String model, String inputModelType, String converterType) throws ConversionException {
ConversionInfo convertionId = new ConversionInfo();
//Build parameter string
- String data = "method=submit&inputModelType="+inputModelType+"&converterType="+converterType+"&text_upload="+model;
-
+ String data = "method=submit&inputModelType="+inputModelType+"&converterType="+converterType+"&text_upload="+model + "end_upload";
//Sending POST request to the server
sendPostRequest(data, convertionId);
@@ -139,13 +159,13 @@
* @param inputModelType the class name of the input format
* @param converterType the class name of the converter
* @return some metadata about the conversion job.
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public ConversionInfo submitJobFromURL(String url,String inputModelType, String converterType) {
+ public ConversionInfo submitJobFromURL(String url, String inputModelType, String converterType) throws ConversionException {
ConversionInfo convertionId = new ConversionInfo();
//Build parameter string
String data = "method=submit&inputModelType="+inputModelType+"&converterType="+converterType+"&url_upload="+url;
-
//Sending POST request to the server
sendPostRequest(data, convertionId);
@@ -159,10 +179,13 @@
*
* @param convertionId some metadata about the conversion job.
* @return "pending" | "done" | "unknown" | "not found"
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public String getJobStatus(ConversionInfo convertionId) {
- String status=null;
+ public String getJobStatus(ConversionInfo convertionId) throws ConversionException {
+ String status = null;
+ System.out.println("calling job status - " + Calendar.getInstance().getTime());
+
//Build parameter string
String data = "method=getStatus&jobIdent="+convertionId.getIdentificationId()
+ "&sessionId=" + convertionId.getSessionId() + "&jobId=" + convertionId.getJobId();
@@ -171,11 +194,88 @@
status = sendPostRequest(data, new ConversionInfo());
return status;
-
-
}
/**
+ * Waits for the job to finish and then gets and returns the result of the conversion.
+ *
+ * @param conversionDetails details about the conversion job we need to check
+ * @return the converted format as a String or the error log if a problem occurred during the conversion
+ * @throws InterruptedException if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
+ * @throws ConversionException if an error occurs during the conversion process
+ */
+ private String waitAndGetResult(final ConversionInfo conversionDetails)
+ throws InterruptedException, ConversionException
+ {
+ final List<Integer> countCheck = new ArrayList<Integer>();
+ countCheck.add(0);
+ final List<RuntimeException> exceptions = new ArrayList<RuntimeException>();
+ final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
+
+ final Runnable jobChecker = new Runnable() {
+ public void run() {
+
+ String status = null;
+
+ try {
+ status = getJobStatus(conversionDetails);
+ } catch (ConversionException e) {
+ exceptions.add(new RuntimeException("An error occured while fetching the job status.", e));
+ throw exceptions.get(0);
+ }
+
+ if (status.equals(ConverterParam.Finished_Job)) {
+ // the job is finished so we stop this thread
+ synchronized (exceptions) {
+ exceptions.notify();
+ }
+ scheduler.shutdownNow();
+ }
+
+ // checking for the unknown and not_found status as well after some time
+ if (countCheck.get(0) > 5 && (status.equals(ConverterParam.Not_Found_Job) || status.equals(ConverterParam.Unknown_Job_Status))) {
+ exceptions.add(new RuntimeException("An error occured while fetching the job status, the server did not find the job."));
+ throw exceptions.get(0);
+ }
+ countCheck.set(0, countCheck.get(0) + 1);
+ }
+ };
+
+ final ScheduledFuture<?> jobStatusHandle = scheduler.scheduleAtFixedRate(jobChecker, JOB_STATUS_INTERVAL, JOB_STATUS_INTERVAL, TimeUnit.SECONDS);
+
+ scheduler.schedule(new Runnable() {
+ public void run() {
+ System.out.println("Conversion too long, timeout reached.");
+ jobStatusHandle.cancel(true);
+ synchronized (exceptions) {
+ exceptions.notify();
+ }
+ scheduler.shutdownNow();
+ // TODO - throw an exception or set an object so that we know that we reached the timeout ?
+
+ }
+ }, JOB_MAXIMUM_TIME, TimeUnit.MINUTES);
+
+
+ // using wait/notify so that the current thread wait for the jobCheck thread to finish
+ synchronized (exceptions) {
+ exceptions.wait();
+ }
+
+ if (exceptions.size() > 0) {
+ RuntimeException e = exceptions.get(0);
+
+ if (e.getCause() != null) {
+ throw (ConversionException) e.getCause();
+ } else {
+ throw new ConversionException(e);
+ }
+ }
+
+ return getConvertionResult(conversionDetails, false);
+ }
+
+ /**
* Submits the conversion job from the given file path then waits for the end of the conversion and returns the result
*
* @param filePath the path of the input file
@@ -183,38 +283,22 @@
* @param converterType the class name of the converter
* @return the converted format as a String or the error log if a problem occurred during the conversion
* @throws InterruptedException if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public String submitAndGetResultFromFile(String filePath,String inputModelType, String converterType) throws InterruptedException {
- ConversionInfo convert = submitJobFromFile(filePath, inputModelType, converterType);
-
+ public String submitAndGetResultFromFile(String filePath,String inputModelType, String converterType) throws InterruptedException, ConversionException {
+ final ConversionInfo convert = submitJobFromFile(filePath, inputModelType, converterType);
+
if (convert.getJobId() == null) {
// there was a problem launching the job
System.out.println("Error launching the conversion");
- return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
+ throw new ConversionException("Error launching the conversion, no job id returned by the server.");
}
- // TODO - make this as a method
- long before = Calendar.getInstance().getTimeInMillis();
- int count = 1;
-
- String status = getJobStatus(convert);
- while(! status.equals(ConverterParam.Finished_Job)) {
- Thread.sleep(JOB_STATUS_INTERVAL + (count * JOB_STATUS_INTERVAL_INCREASE));
- status = getJobStatus(convert);
-
- long after = Calendar.getInstance().getTimeInMillis();
-
- if ((after - before) > JOB_MAXIMUM_TIME) {
- // TODO - send an exception because of timeout
- System.out.println("Conversion too long, timeout reached.");
- return "Error during the conversion or conversion too long."; // TODO - add a ConversionException that would propagate the exception/problem
- }
- count++;
- }
-
- return getConvertionResult(convert, false);
+ // Waiting for the job to finish and then get and return the result of the conversion
+ return waitAndGetResult(convert);
}
-
+
+
/**
* Submits the conversion job from the model String then waits for the end of the conversion and returns the result
*
@@ -223,35 +307,19 @@
* @param converterType inputModel to use, We strongly recommend you use one of ConverterParam attributes (ex: ConvertParam.SBML_2_BioPAX_l2v3)
* @return the converted format as a String or the error log if a problem occurred during the conversion
* @throws InterruptedException if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public String submitAndGetResultFromString(String model,String inputModelType, String converterType) throws InterruptedException {
+ public String submitAndGetResultFromString(String model,String inputModelType, String converterType) throws InterruptedException, ConversionException {
ConversionInfo convert = submitJobFromString(model, inputModelType, converterType);
if (convert.getJobId() == null) {
// there was a problem launching the job
System.out.println("Error launching the conversion");
- return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
+ throw new ConversionException("Error launching the conversion, no job id returned by the server.");
}
- long before = Calendar.getInstance().getTimeInMillis();
- int count = 1;
-
- String status = getJobStatus(convert);
- while(! status.equals(ConverterParam.Finished_Job)) {
- Thread.sleep(JOB_STATUS_INTERVAL + (count * JOB_STATUS_INTERVAL_INCREASE));
- status = getJobStatus(convert);
-
- long after = Calendar.getInstance().getTimeInMillis();
-
- if ((after - before) > JOB_MAXIMUM_TIME) {
- // TODO - send an exception because of timeout
- System.out.println("Conversion too long, timeout reached.");
- return "Error during the conversion or conversion too long."; // TODO - add a ConversionException that would propagate the exception/problem
- }
- count++;
- }
-
- return getConvertionResult(convert, false);
+ // Waiting for the job to finish and then get and return the result of the conversion
+ return waitAndGetResult(convert);
}
@@ -263,35 +331,19 @@
* @param converterType the class name of the converter
* @return the converted format as a String or the error log if a problem occurred during the conversion
* @throws InterruptedException if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public String submitAndGetResultFromURL(String url,String inputModelType, String converterType) throws InterruptedException {
+ public String submitAndGetResultFromURL(String url,String inputModelType, String converterType) throws InterruptedException, ConversionException {
ConversionInfo convert = submitJobFromURL(url, inputModelType, converterType);
if (convert.getJobId() == null) {
// there was a problem launching the job
System.out.println("Error launching the conversion");
- return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
+ throw new ConversionException("Error launching the conversion, no job id returned by the server.");
}
- long before = Calendar.getInstance().getTimeInMillis();
- int count = 1;
-
- String status = getJobStatus(convert);
- while(! status.equals(ConverterParam.Finished_Job)) {
- Thread.sleep(JOB_STATUS_INTERVAL + (count * JOB_STATUS_INTERVAL_INCREASE));
- status = getJobStatus(convert);
-
- long after = Calendar.getInstance().getTimeInMillis();
-
- if ((after - before) > JOB_MAXIMUM_TIME) {
- // TODO - send an exception because of timeout
- System.out.println("Conversion too long, timeout reached.");
- return "Error during the conversion or conversion too long."; // TODO - add a ConversionException that would propagate the exception/problem
- }
- count++;
- }
-
- return getConvertionResult(convert, false);
+ // Waiting for the job to finish and then get and return the result of the conversion
+ return waitAndGetResult(convert);
}
/**
@@ -303,10 +355,13 @@
* @param convertionId some metadata about the conversion job.
* @param delete a boolean to tell the method to delete or not all the files related to fileName.
* @return the converted format as a String or the error log if a problem occurred during the conversion
+ * @throws ConversionException if an error occurs during the conversion process
*/
- public String getConvertionResult(ConversionInfo convertionId, boolean delete) {
+ public String getConvertionResult(ConversionInfo convertionId, boolean delete) throws ConversionException {
String model = null;
+ System.out.println("job finished, retrieving result file - " + Calendar.getInstance().getTime());
+
//Build parameter string
String data = "method=getResult&jobIdent=" + convertionId.getIdentificationId()
+ "&sessionId=" + convertionId.getSessionId() + "&jobId=" + convertionId.getJobId()
@@ -314,7 +369,9 @@
//sending POST request to the server
model = sendPostRequest(data, new ConversionInfo());
-
+
+ System.out.println("retrieving result request finished - " + Calendar.getInstance().getTime());
+
return model;
}
@@ -324,8 +381,9 @@
*
* @param data the query string
* @return the result of the POST request to the SBFC webservice
+ * @throws ConversionException if an error occurs during the conversion process
*/
- private String sendPostRequest(String data, ConversionInfo convertionIds) {
+ private String sendPostRequest(String data, ConversionInfo convertionIds) throws ConversionException {
String answer = "";
try {
@@ -334,6 +392,7 @@
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
+
OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream(), "UTF-8");
//write parameters
@@ -341,7 +400,6 @@
writer.flush();
// Get the response
-
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
String line;
while ((line = reader.readLine()) != null) {
@@ -382,13 +440,20 @@
*/
public static String readFileAsString(String filePath) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "UTF8"));
- String result="";
+ File file = new File(filePath);
+ StringBuilder resultSB = new StringBuilder((int) file.getTotalSpace());
String line;
+ // We could use a java 8 construct but not really necessary now
+ // List<String> fileAsByteArray = Files.readAllLines(FileSystems.getDefault().getPath(filePath), Charset.forName("UTF-8"));
+
while ((line = in.readLine()) != null) {
- result+= line + System.getProperty("line.separator");
+ resultSB.append(line).append(System.getProperty("line.separator"));
}
in.close();
+
+ String result = resultSB.toString();
+
return result;
}
Modified: webServiceClient/src/org/sbfc/ws/UsageExample.java
===================================================================
--- webServiceClient/src/org/sbfc/ws/UsageExample.java 2018-04-13 16:09:09 UTC (rev 718)
+++ webServiceClient/src/org/sbfc/ws/UsageExample.java 2018-04-20 11:02:08 UTC (rev 719)
@@ -26,6 +26,8 @@
import java.io.IOException;
import java.io.PrintWriter;
+import org.sbfc.exceptions.ConversionException;
+
/**
* Example class for using the SBFC web Service
*
@@ -38,8 +40,9 @@
* @param args the arguments of the program
* @throws IOException if there is a problem reading one of the input files
* @throws InterruptedException if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
+ * @throws ConversionException
*/
- public static void main(String[] args) throws IOException, InterruptedException {
+ public static void main(String[] args) throws IOException, InterruptedException, ConversionException {
if(args.length == 0 && args[0].endsWith(".xml")) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-04-13 16:09:11
|
Revision: 718
http://sourceforge.net/p/sbfc/code/718
Author: niko-rodrigue
Date: 2018-04-13 16:09:09 +0000 (Fri, 13 Apr 2018)
Log Message:
-----------
Updated build.xml to be able to deploy apps to tomcat 8 + updated copyright to include Babraham.
Modified Paths:
--------------
sbfcOnline/build.xml
Modified: sbfcOnline/build.xml
===================================================================
--- sbfcOnline/build.xml 2018-04-13 16:07:20 UTC (rev 717)
+++ sbfcOnline/build.xml 2018-04-13 16:09:09 UTC (rev 718)
@@ -33,8 +33,8 @@
<property name="deploy.war" value="${dist}/${war-file}" />
<property name="deploy.user" value="tomcat" />
<property name="deploy.pass" value="tomcat" />
- <property name="deploy.context.path" value="/biomodels/services/converters" />
- <property name="deploy.url" value="http://localhost:8080/manager" />
+ <property name="deploy.context.path" value="/biomodels/tools/converters" />
+ <property name="deploy.url" value="http://localhost:8080/manager/text" />
<property name="include.context" value="yes"/>
@@ -182,7 +182,7 @@
<attribute name="Author" value="Jean-Baptiste Pettit, Nicolas Rodriguez, Piero Dalle Pezze" />
<attribute name="Affiliation" value="The Babraham Institute" />
<attribute name="Date" value="${DSTAMP}T${TSTAMP}" />
- <attribute name="Copyright" value="(C) 2010-2015} EMBL-EBI European Bioinformatics Institute, Babraham Institute. See details in LICENSE file." />
+ <attribute name="Copyright" value="(C) 2010-2018} EMBL-EBI European Bioinformatics Institute, Babraham Institute. See details in LICENSE file." />
</manifest>
</jar>
</target>
@@ -192,7 +192,7 @@
</target>
<target name="tomcat.deploy" depends="tomcat.undeploy, package">
- <deploy url="${deploy.url}" username="${deploy.user}" password="${deploy.pass}" path="${deploy.context.path}" war="file:${deploy.war}"/>
+ <deploy url="${deploy.url}" username="${deploy.user}" password="${deploy.pass}" path="${deploy.context.path}" war="${deploy.war}"/>
</target>
<!-- Performs the tests -->
@@ -220,7 +220,7 @@
<packageset dir="src" defaultexcludes="yes" />
<doctitle><![CDATA[<h1>BioModels</h1>]]>
</doctitle>
- <bottom><![CDATA[Copyright © 2010-${YSTAMP} European Bioinformatics Institute <br /><i>Last modified: ${DSTAMP}T${TSTAMP}</i>]]>
+ <bottom><![CDATA[Copyright © 2010-${YSTAMP} EMBL-EBI European Bioinformatics Institute, Babraham Institute <br /><i>Last modified: ${DSTAMP}T${TSTAMP}</i>]]>
</bottom>
</javadoc>
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-04-13 16:07:23
|
Revision: 717
http://sourceforge.net/p/sbfc/code/717
Author: niko-rodrigue
Date: 2018-04-13 16:07:20 +0000 (Fri, 13 Apr 2018)
Log Message:
-----------
Attempt to set properly the encoding to UTF-8 everywhere. Adapted sligthly the code so that it can be run on a single desktop/laptop.
Modified Paths:
--------------
sbfcOnline/WebContent/WEB-INF/web.xml
sbfcOnline/WebContent/jsp/start_head.jsp
sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java
Added Paths:
-----------
sbfcOnline/src/uk/ac/ebi/compneur/config/CharacterEncodingFilter.java
Modified: sbfcOnline/WebContent/WEB-INF/web.xml
===================================================================
(Binary files differ)
Modified: sbfcOnline/WebContent/jsp/start_head.jsp
===================================================================
--- sbfcOnline/WebContent/jsp/start_head.jsp 2018-03-28 15:04:36 UTC (rev 716)
+++ sbfcOnline/WebContent/jsp/start_head.jsp 2018-04-13 16:07:20 UTC (rev 717)
@@ -2,6 +2,7 @@
<html>
<head>
<meta charset="utf-8">
+ <%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<!-- jQuery -->
<script src="<%=request.getContextPath()%>/js/jquery-1.11.1.js"></script>
Added: sbfcOnline/src/uk/ac/ebi/compneur/config/CharacterEncodingFilter.java
===================================================================
--- sbfcOnline/src/uk/ac/ebi/compneur/config/CharacterEncodingFilter.java (rev 0)
+++ sbfcOnline/src/uk/ac/ebi/compneur/config/CharacterEncodingFilter.java 2018-04-13 16:07:20 UTC (rev 717)
@@ -0,0 +1,42 @@
+package uk.ac.ebi.compneur.config;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+/**
+ * Filter used to make sure all html requests and responses are encoded with 'UTF-8'.
+ *
+ * @author rodrigue
+ *
+ */
+public class CharacterEncodingFilter implements Filter {
+
+
+ public void doFilter(
+ ServletRequest request,
+ ServletResponse response,
+ FilterChain next) throws IOException, ServletException
+ {
+ request.setCharacterEncoding("UTF-8");
+ response.setContentType("text/html; charset=UTF-8");
+ response.setCharacterEncoding("UTF-8");
+ next.doFilter(request, response);
+ }
+
+ @Override
+ public void destroy() {
+
+ }
+
+ @Override
+ public void init(FilterConfig arg0) throws ServletException {
+
+ }
+
+}
\ No newline at end of file
Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java
===================================================================
--- sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java 2018-03-28 15:04:36 UTC (rev 716)
+++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java 2018-04-13 16:07:20 UTC (rev 717)
@@ -2,8 +2,7 @@
import java.io.BufferedReader;
import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
+import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
@@ -17,6 +16,8 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import org.apache.log4j.Logger;
+
import uk.ac.ebi.compneur.config.ConfigParam;
import uk.ac.ebi.compneur.dbAccess.JobAccess;
import uk.ac.ebi.compneur.dbAccess.SessionAccess;
@@ -39,6 +40,11 @@
private static String filesPath = ConfigParam.getFromEnvironment(ConfigParam.SBFC_WEBAPP_FILES_NAME);
/**
+ * log4j logger
+ */
+ private static transient Logger logger = Logger.getLogger(WebServiceServlet.class);
+
+ /**
* @see HttpServlet#HttpServlet()
*/
public WebServiceServlet() {
@@ -81,7 +87,7 @@
if(request.getParameter("url_upload") != null && !request.getParameter("url_upload").isEmpty())
{
URL url = new URL(request.getParameter("url_upload"));
- BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
+ BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
String buffer;
@@ -109,20 +115,38 @@
//Converting model from the text_upload
else if (request.getParameter("text_upload") != null && !request.getParameter("text_upload").isEmpty())
{
- inputModel = request.getParameter("text_upload");
- fileName = "Conversion_job";
+ // inputModel = URLDecoder.decode(request.getParameter("text_upload"), "UTF-8");
+ inputModel = request.getParameter("text_upload");
+
+ // use request.getQueryString() to get the parameter with the errors ?
+
+ fileName = request.getParameter("fileName");
+
+ if (logger.isTraceEnabled()) {
+ logger.debug("WebServiceServlet : input model =\n @" + inputModel + "@");
+ }
}
+
+ logger.info("Parameter map size = " + request.getParameterMap().size());
+ logger.info("Model @" + inputModel + "@");
+ logger.info("parameters map keys @" + request.getParameterMap().keySet() + "@");
+ logger.info("parameters values length for text_upload = " + request.getParameterValues("text_upload").length);
+
+ if (fileName == null || fileName.trim().length() == 0) {
+ fileName = "Conversion_job";
+ }
- // Saving the inputModel in a file
- System.out.println("WebServiceServlet : Saving the model to '" + filesPath + fileName + "_" + sessionId + ".input");
- // System.out.println("WebServiceServlet : input model =\n " + inputModel);
+ if (logger.isDebugEnabled()) {
+ logger.debug("WebServiceServlet : Saving the model to '" + filesPath + fileName + "_" + sessionId + ".input");
+ }
- FileOutputStream fconv = new FileOutputStream (filesPath + fileName + "_" + sessionId + ".input");
- PrintStream convprint = new PrintStream(fconv);
+ // TODO - check that the inputModel is not null or empty.
+
+ // Saving the inputModel in a file
+ PrintStream convprint = new PrintStream(filesPath + fileName + "_" + sessionId + ".input", "UTF-8");
convprint.println (inputModel);
convprint.flush();
convprint.close();
- fconv.close();
Thread.sleep(50);
// Getting a JobAccess object
@@ -143,7 +167,7 @@
// retrieving jobId
String jobId = ret;
- System.out.println("WebServiceServlet - submit - job output = " + ret);
+ logger.info("WebServiceServlet - submit - 2 - job output = " + ret);
int lowerThanIndex = jobId.indexOf("<");
if (lowerThanIndex != -1) {
@@ -154,6 +178,10 @@
while(jobStatus(jobId).compareTo("not found") == 0){
Thread.sleep(300);
}
+
+ if (jobId.trim().length() == 0) {
+ jobId = "local_job";
+ }
httpSession.setAttribute("sessionId", sessionId);
httpSession.setAttribute("jobId", jobId);
@@ -192,7 +220,7 @@
String fileName = jobIdentification;
- System.out.println("WebServiceServlet - getResult - filename = " + fileName + ", delete files = " + delete);
+ logger.info("WebServiceServlet - getResult - filename = " + fileName + ", delete files = " + delete);
//checking that the job is finished
if(jobStatus(idJob).compareTo("done") == 0) {
@@ -219,37 +247,37 @@
* @throws IOException - If an I/O error occurs
*/
private String jobStatus(String idJob) throws IOException {
- //Launching the conversion job
- String command = MessageFormat.format(ConfigParam.getFromEnvironment(ConfigParam.SBFC_JOB_STATUS), idJob);
+ // Checking the conversion job status
+ String command = MessageFormat.format(ConfigParam.getFromEnvironment(ConfigParam.SBFC_JOB_STATUS), idJob);
- Process child = Runtime.getRuntime().exec(command);
- BufferedReader in = new BufferedReader(new InputStreamReader(child.getInputStream()));
- String line = null;
- String rep = "";
- String returnState = null;
- while ((line = in.readLine()) != null) {
- rep += (line);
- }
+ Process child = Runtime.getRuntime().exec(command);
+ BufferedReader in = new BufferedReader(new InputStreamReader(child.getInputStream()));
+ String line = null;
+ String rep = "";
+ String returnState = null;
+ while ((line = in.readLine()) != null) {
+ rep += (line);
+ }
- BufferedReader inError = new BufferedReader(new InputStreamReader(child.getErrorStream()));
- while ((line = inError.readLine()) != null) {
- rep += (line);
- }
+ BufferedReader inError = new BufferedReader(new InputStreamReader(child.getErrorStream()));
+ while ((line = inError.readLine()) != null) {
+ rep += (line);
+ }
- if(rep.contains("PEND") || rep.contains("RUN")) {
- returnState = "pending";
- }
- else if(rep.contains("is not found")) {
- returnState = "not found";
- }
- else if(rep.contains("DONE")) {
- returnState = "done";
- }
- else {
- returnState = "unknown";
- }
+ if(rep.contains("PEND") || rep.contains("RUN")) {
+ returnState = "pending";
+ }
+ else if(rep.contains("is not found")) {
+ returnState = "not found";
+ }
+ else if(rep.contains("DONE")) {
+ returnState = "done";
+ }
+ else {
+ returnState = "unknown";
+ }
- return returnState;
+ return returnState;
}
/**
@@ -305,7 +333,7 @@
* @throws IOException - If an I/O error occurs
*/
private static String readFileAsString(String filePath) throws IOException{
- BufferedReader in = new BufferedReader(new FileReader(filePath));
+ BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "UTF8"));
String result="";
String line;
while ((line = in.readLine()) != null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-03-28 15:04:38
|
Revision: 716
http://sourceforge.net/p/sbfc/code/716
Author: niko-rodrigue
Date: 2018-03-28 15:04:36 +0000 (Wed, 28 Mar 2018)
Log Message:
-----------
Added a timeout for the job status check and a check increase as well to not check too often when the job start to be long. Trying as well to make sure to properly read and send UTF-8 String.
Modified Paths:
--------------
webServiceClient/lib/sbfc-ws-client-1.1.jar
webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java
Modified: webServiceClient/lib/sbfc-ws-client-1.1.jar
===================================================================
(Binary files differ)
Modified: webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java
===================================================================
--- webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java 2018-03-26 15:31:59 UTC (rev 715)
+++ webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java 2018-03-28 15:04:36 UTC (rev 716)
@@ -25,7 +25,7 @@
package org.sbfc.ws;
import java.io.BufferedReader;
-import java.io.FileReader;
+import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
@@ -32,6 +32,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
+import java.util.Calendar;
/**
* This class allows to request conversion jobs to the SBFC web-service
@@ -61,7 +62,7 @@
/**
* Interval of time in millisecond after which we stop checking the job status.
*/
- public int JOB_MAXIMUM_TIME = 30000 * 30; // 30s x 30 = 15min
+ public int JOB_MAXIMUM_TIME = 60000 * 10; // 60s x 10 = 10min
/**
@@ -192,10 +193,23 @@
return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
}
+ // TODO - make this as a method
+ long before = Calendar.getInstance().getTimeInMillis();
+ int count = 1;
+
String status = getJobStatus(convert);
while(! status.equals(ConverterParam.Finished_Job)) {
- Thread.sleep(JOB_STATUS_INTERVAL); // TODO - integrate the interval increase and max time
+ Thread.sleep(JOB_STATUS_INTERVAL + (count * JOB_STATUS_INTERVAL_INCREASE));
status = getJobStatus(convert);
+
+ long after = Calendar.getInstance().getTimeInMillis();
+
+ if ((after - before) > JOB_MAXIMUM_TIME) {
+ // TODO - send an exception because of timeout
+ System.out.println("Conversion too long, timeout reached.");
+ return "Error during the conversion or conversion too long."; // TODO - add a ConversionException that would propagate the exception/problem
+ }
+ count++;
}
return getConvertionResult(convert, false);
@@ -219,10 +233,22 @@
return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
}
+ long before = Calendar.getInstance().getTimeInMillis();
+ int count = 1;
+
String status = getJobStatus(convert);
while(! status.equals(ConverterParam.Finished_Job)) {
- Thread.sleep(JOB_STATUS_INTERVAL);
+ Thread.sleep(JOB_STATUS_INTERVAL + (count * JOB_STATUS_INTERVAL_INCREASE));
status = getJobStatus(convert);
+
+ long after = Calendar.getInstance().getTimeInMillis();
+
+ if ((after - before) > JOB_MAXIMUM_TIME) {
+ // TODO - send an exception because of timeout
+ System.out.println("Conversion too long, timeout reached.");
+ return "Error during the conversion or conversion too long."; // TODO - add a ConversionException that would propagate the exception/problem
+ }
+ count++;
}
return getConvertionResult(convert, false);
@@ -247,11 +273,23 @@
return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
}
- String status = getJobStatus(convert);
- while(! status.equals(ConverterParam.Finished_Job)) {
- Thread.sleep(JOB_STATUS_INTERVAL);
- status = getJobStatus(convert);
- }
+ long before = Calendar.getInstance().getTimeInMillis();
+ int count = 1;
+
+ String status = getJobStatus(convert);
+ while(! status.equals(ConverterParam.Finished_Job)) {
+ Thread.sleep(JOB_STATUS_INTERVAL + (count * JOB_STATUS_INTERVAL_INCREASE));
+ status = getJobStatus(convert);
+
+ long after = Calendar.getInstance().getTimeInMillis();
+
+ if ((after - before) > JOB_MAXIMUM_TIME) {
+ // TODO - send an exception because of timeout
+ System.out.println("Conversion too long, timeout reached.");
+ return "Error during the conversion or conversion too long."; // TODO - add a ConversionException that would propagate the exception/problem
+ }
+ count++;
+ }
return getConvertionResult(convert, false);
}
@@ -296,7 +334,7 @@
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
- OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());
+ OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream(), "UTF-8");
//write parameters
writer.write(data);
@@ -304,7 +342,7 @@
// Get the response
- BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+ BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
String line;
while ((line = reader.readLine()) != null) {
answer += line;
@@ -343,7 +381,7 @@
* @throws IOException - If an I/O error occurs
*/
public static String readFileAsString(String filePath) throws IOException{
- BufferedReader in = new BufferedReader(new FileReader(filePath));
+ BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(filePath), "UTF8"));
String result="";
String line;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-03-26 15:32:01
|
Revision: 715
http://sourceforge.net/p/sbfc/code/715
Author: niko-rodrigue
Date: 2018-03-26 15:31:59 +0000 (Mon, 26 Mar 2018)
Log Message:
-----------
Started to improve the SBFC web service client.
Modified Paths:
--------------
webServiceClient/build.xml
webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java
webServiceClient/src/org/sbfc/ws/UsageExample.java
Added Paths:
-----------
webServiceClient/lib/sbfc-ws-client-1.1.jar
webServiceClient/log/
webServiceClient/sbfcWebService.sh
webServiceClient/src/org/sbfc/ws/LaunchSBMLConversionFromFile.java
Removed Paths:
-------------
webServiceClient/lib/sbfc-ws-client-1.0.jar
Modified: webServiceClient/build.xml
===================================================================
--- webServiceClient/build.xml 2018-03-23 11:34:55 UTC (rev 714)
+++ webServiceClient/build.xml 2018-03-26 15:31:59 UTC (rev 715)
@@ -12,7 +12,7 @@
</tstamp>
<property name="Name" value="SBFC webservices client"/>
<property name="name" value="sbfc-ws-client"/>
- <property name="version" value="1.0"/>
+ <property name="version" value="1.1"/>
<property name="year" value="${YEAR}"/>
Deleted: webServiceClient/lib/sbfc-ws-client-1.0.jar
===================================================================
(Binary files differ)
Added: webServiceClient/lib/sbfc-ws-client-1.1.jar
===================================================================
(Binary files differ)
Index: webServiceClient/lib/sbfc-ws-client-1.1.jar
===================================================================
--- webServiceClient/lib/sbfc-ws-client-1.1.jar 2018-03-23 11:34:55 UTC (rev 714)
+++ webServiceClient/lib/sbfc-ws-client-1.1.jar 2018-03-26 15:31:59 UTC (rev 715)
Property changes on: webServiceClient/lib/sbfc-ws-client-1.1.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/zip
\ No newline at end of property
Index: webServiceClient/log
===================================================================
--- webServiceClient/log 2018-03-23 11:34:55 UTC (rev 714)
+++ webServiceClient/log 2018-03-26 15:31:59 UTC (rev 715)
Property changes on: webServiceClient/log
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+*
Added: webServiceClient/sbfcWebService.sh
===================================================================
--- webServiceClient/sbfcWebService.sh (rev 0)
+++ webServiceClient/sbfcWebService.sh 2018-03-26 15:31:59 UTC (rev 715)
@@ -0,0 +1,97 @@
+#!/bin/bash
+
+# Setting up for Java properties
+PROPERTIES=""
+
+
+# Setting up java
+export JAVA_HOME=/nfs/public/rw/webadmin/java/jdks/latest_1.8
+export PATH=${JAVA_HOME}/bin:${PATH}
+
+COMMAND="bsub ${BSUB_OPTIONS} -o $LOG_FILE java $PROPERTIES"
+
+if [ "`which bsub 2> /dev/null`" == "" ] ; then
+ COMMAND="java $PROPERTIES"
+fi
+
+
+
+
+RESOLVE_LINK=`readlink -f $0`
+SBF_CONVERTER_HOME=`dirname ${RESOLVE_LINK}`
+LIB_PATH=${SBF_CONVERTER_HOME}/lib
+
+if [ $# -lt 2 ]
+ then
+ echo ""
+ echo "Usage: "
+ echo " To convert a given file(s) of a specific model type using a provided converter"
+ echo " $0 [file | folder] ConverterName "
+ echo ""
+ echo " For instance, to convert an SBML file to XPP : "
+ echo " $0 [file.xml | folder] SBML2XPP "
+ echo ""
+ echo ""
+ exit 1
+fi
+
+SBML_DIR=$1
+CONVERTER_NAME=$2
+
+LOG_FILE_FOLDER=${SBF_CONVERTER_HOME}/log/`basename $SBML_DIR .xml`
+LOG_FILE=${LOG_FILE_FOLDER}/`basename $SBML_DIR .xml`-$CONVERTER_NAME-export-`date +%F`.log
+
+
+export CLASSPATH=
+
+for jarFile in $LIB_PATH/*.jar
+do
+ export CLASSPATH=$CLASSPATH:$jarFile
+done
+
+
+if [ -d $SBML_DIR ]
+then
+ for file in $SBML_DIR/*[0-9].xml
+ do
+ # Creating a log file specific to each file.
+ LOG_FILE_FOLDER=${SBF_CONVERTER_HOME}/log/`basename $file .xml`
+ LOG_FILE_MULTI=${LOG_FILE_FOLDER}/`basename $file .xml`-$CONVERTER_NAME-export-`date +%F`.log
+
+ # checks that the model specific folder does exist and create it if not.
+ if [ ! -d "$LOG_FILE_FOLDER" ]; then
+ mkdir -p $LOG_FILE_FOLDER
+ fi
+ if [ ! "1${COMMAND}" == "1java " ] ; then
+ # we are on a cluster node
+ COMMAND="bsub ${BSUB_OPTIONS} -o $LOG_FILE_MULTI java "
+ fi
+
+ echo "------------------------------------------------------------" >> $LOG_FILE_MULTI 2>&1
+ echo "`date +"%F %R"`" >> $LOG_FILE_MULTI 2>&1
+ echo "`basename $0`: Convertion, using $CONVERTER_NAME, for '$file'..." >> $LOG_FILE_MULTI 2>&1
+ echo "------------------------------------------------------------" >> $LOG_FILE_MULTI 2>&1
+
+ nice $COMMAND org.sbfc.ws.LaunchSBMLConversionFromFile $file $CONVERTER_NAME >> $LOG_FILE_MULTI 2>&1 &
+ echo "$file - $CONVERTER_NAME"
+ sleep 0.2
+ done
+else
+
+ file=$SBML_DIR
+
+ # checks that the model specific folder does exist and create it if not.
+ if [ ! -d "$LOG_FILE_FOLDER" ]; then
+ mkdir -p $LOG_FILE_FOLDER
+ fi
+
+ echo "------------------------------------------------------------" >> $LOG_FILE 2>&1
+ echo "`date +"%F %R"`" >> $LOG_FILE 2>&1
+ echo "`basename $0`: Convertion, using $CONVERTER_NAME, for '$SBML_DIR'..." >> $LOG_FILE 2>&1
+ echo "------------------------------------------------------------" >> $LOG_FILE 2>&1
+
+ $COMMAND org.sbfc.ws.LaunchSBMLConversionFromFile $file $CONVERTER_NAME >> $LOG_FILE 2>&1 &
+
+fi
+
+
Property changes on: webServiceClient/sbfcWebService.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: webServiceClient/src/org/sbfc/ws/LaunchSBMLConversionFromFile.java
===================================================================
--- webServiceClient/src/org/sbfc/ws/LaunchSBMLConversionFromFile.java (rev 0)
+++ webServiceClient/src/org/sbfc/ws/LaunchSBMLConversionFromFile.java 2018-03-26 15:31:59 UTC (rev 715)
@@ -0,0 +1,100 @@
+/*
+ *
+ * ==========================================================================
+ * This file is part of The System Biology Format Converter (SBFC).
+ * Please visit <http://sbfc.sf.net> to have more information about
+ * SBFC.
+ *
+ * Copyright (c) 2010-2016 jointly by the following organizations:
+ * 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
+ * 2. The Babraham Institute, Cambridge, UK
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation. A copy of the license agreement is provided
+ * in the file named "LICENSE.txt" included with this software distribution
+ * and also available online as
+ * <http://sbfc.sf.net/mediawiki/index.php/License>.
+ *
+ * ==========================================================================
+ *
+ */
+
+package org.sbfc.ws;
+
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Calendar;
+
+/**
+ * Launching a conversion from a file for using the SBFC web Service.
+ *
+ * @author rodrigue
+ *
+ */
+public class LaunchSBMLConversionFromFile {
+
+ /**
+ * @param args the arguments of the program
+ * @throws IOException if there is a problem reading one of the input files
+ * @throws InterruptedException if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
+ */
+ public static void main(String[] args) throws IOException, InterruptedException {
+
+ if (args.length == 0) {
+ System.out.println("To run this example, an SBML model must be passed as input parameter.");
+ return;
+ }
+
+ // Creating the link to the web service
+ SBFCWebServiceClient link = new SBFCWebServiceClient();
+ long before = Calendar.getInstance().getTimeInMillis();
+
+ // You can also initialize the WS link using your own url to connect to a private server
+ // SBFCWebServiceClient link = new SBFCWebServiceClient("http://localhost:8080/biomodels/tools/converters/webService");
+
+ String sbmlModelPath = args[0];
+ String converter = args[1];
+ String inputType = ConverterParam.SBMLModel;
+
+ System.out.print("Sending the conversion job...");
+
+ // Launching the second conversion: SBML file to SBML level 3 version 1
+ String convertionResult = link.submitAndGetResultFromFile(sbmlModelPath, inputType, converter);
+
+ long after = Calendar.getInstance().getTimeInMillis();
+
+ System.out.print(" DONE (it took " + (after - before) + " ms)\n\n");
+
+
+ int index = -1;
+ index = sbmlModelPath.lastIndexOf('.');
+ String convertedModelPrefix = sbmlModelPath;
+ String converterSuffix = converter.substring(5);
+
+ if (index != -1) {
+ convertedModelPrefix = sbmlModelPath.substring(0, index);
+ }
+
+ if (converterSuffix.equalsIgnoreCase("XPP")) {
+ converterSuffix = ".xpp";
+ } else if (converterSuffix.startsWith("BioPAX")) {
+ converterSuffix = "-biopax" + converterSuffix.substring(6) + ".owl";
+ } else if (converterSuffix.startsWith("Octave")) {
+ converterSuffix = "-octave.m";
+ } else if (converterSuffix.startsWith("Matlab")) {
+ converterSuffix = "-matlab.m";
+ } else if (converterSuffix.startsWith("SBML")) {
+ converterSuffix = "-sbml" + converterSuffix.substring(4) + ".xml";
+ }
+
+ System.out.print("writing to '" + convertedModelPrefix + converterSuffix);
+
+ PrintWriter out = new PrintWriter(new FileWriter(convertedModelPrefix + converterSuffix));
+ out.print(convertionResult);
+ out.close();
+
+
+ }
+}
Modified: webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java
===================================================================
--- webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java 2018-03-23 11:34:55 UTC (rev 714)
+++ webServiceClient/src/org/sbfc/ws/SBFCWebServiceClient.java 2018-03-26 15:31:59 UTC (rev 715)
@@ -46,7 +46,7 @@
/**
* Location of the webService
*/
- private String SBFC_WEB_SERVICE_URL = "http://www.ebi.ac.uk/biomodels/tools/converters/webService";
+ private String SBFC_WEB_SERVICE_URL = "https://www.ebi.ac.uk/biomodels/tools/converters/webService";
/**
* Interval of time in millisecond between two check for a job status
@@ -53,6 +53,17 @@
*/
public int JOB_STATUS_INTERVAL = 3000;
+ /**
+ * Interval of time in millisecond to increase the job status check if it is getting long.
+ */
+ public int JOB_STATUS_INTERVAL_INCREASE = 3000;
+
+ /**
+ * Interval of time in millisecond after which we stop checking the job status.
+ */
+ public int JOB_MAXIMUM_TIME = 30000 * 30; // 30s x 30 = 15min
+
+
/**
* Creates a new instance of {@link SBFCWebServiceClient}
*/
@@ -78,7 +89,7 @@
* @return some metadata about the conversion job.
*/
public ConversionInfo submitJobFromFile(String filePath, String inputModelType, String converterType) {
- ConversionInfo convertionId = new ConversionInfo();
+ ConversionInfo convertionId = new ConversionInfo(); // TODO - add time where the object was created
String model = "";
try {
@@ -174,10 +185,16 @@
*/
public String submitAndGetResultFromFile(String filePath,String inputModelType, String converterType) throws InterruptedException {
ConversionInfo convert = submitJobFromFile(filePath, inputModelType, converterType);
-
+
+ if (convert.getJobId() == null) {
+ // there was a problem launching the job
+ System.out.println("Error launching the conversion");
+ return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
+ }
+
String status = getJobStatus(convert);
while(! status.equals(ConverterParam.Finished_Job)) {
- Thread.sleep(JOB_STATUS_INTERVAL);
+ Thread.sleep(JOB_STATUS_INTERVAL); // TODO - integrate the interval increase and max time
status = getJobStatus(convert);
}
@@ -195,7 +212,13 @@
*/
public String submitAndGetResultFromString(String model,String inputModelType, String converterType) throws InterruptedException {
ConversionInfo convert = submitJobFromString(model, inputModelType, converterType);
-
+
+ if (convert.getJobId() == null) {
+ // there was a problem launching the job
+ System.out.println("Error launching the conversion");
+ return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
+ }
+
String status = getJobStatus(convert);
while(! status.equals(ConverterParam.Finished_Job)) {
Thread.sleep(JOB_STATUS_INTERVAL);
@@ -218,6 +241,12 @@
public String submitAndGetResultFromURL(String url,String inputModelType, String converterType) throws InterruptedException {
ConversionInfo convert = submitJobFromURL(url, inputModelType, converterType);
+ if (convert.getJobId() == null) {
+ // there was a problem launching the job
+ System.out.println("Error launching the conversion");
+ return "Error launching the conversion"; // TODO - add a ConversionException that would propagate the exception/problem
+ }
+
String status = getJobStatus(convert);
while(! status.equals(ConverterParam.Finished_Job)) {
Thread.sleep(JOB_STATUS_INTERVAL);
Modified: webServiceClient/src/org/sbfc/ws/UsageExample.java
===================================================================
--- webServiceClient/src/org/sbfc/ws/UsageExample.java 2018-03-23 11:34:55 UTC (rev 714)
+++ webServiceClient/src/org/sbfc/ws/UsageExample.java 2018-03-26 15:31:59 UTC (rev 715)
@@ -1,6 +1,4 @@
/*
- * $Id$
- * $URL$
*
* ==========================================================================
* This file is part of The System Biology Format Converter (SBFC).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mg...@us...> - 2018-03-23 11:34:58
|
Revision: 714
http://sourceforge.net/p/sbfc/code/714
Author: mglont
Date: 2018-03-23 11:34:55 +0000 (Fri, 23 Mar 2018)
Log Message:
-----------
Fix stale groupId for registry-lib in pom.xml
Modified Paths:
--------------
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2018-03-20 11:35:43 UTC (rev 713)
+++ trunk/pom.xml 2018-03-23 11:34:55 UTC (rev 714)
@@ -85,7 +85,7 @@
<!-- The Registry API in the lib folder is different
from miriam-common 0.1-SNAPSHOT and miriam-lib 1.13 -->
<dependency>
- <groupId>org.identifiers.dummy</groupId>
+ <groupId>org.identifiers.registry</groupId>
<artifactId>registry-lib</artifactId>
<version>1.1.1</version>
</dependency>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mg...@us...> - 2018-03-20 11:35:44
|
Revision: 713
http://sourceforge.net/p/sbfc/code/713
Author: mglont
Date: 2018-03-20 11:35:43 +0000 (Tue, 20 Mar 2018)
Log Message:
-----------
Add Maven integration.
Introduce a pom file that can be used to build and test the project using Maven. I already pushed this to the EBI Snapshots repo
Added Paths:
-----------
trunk/pom.xml
Added: trunk/pom.xml
===================================================================
--- trunk/pom.xml (rev 0)
+++ trunk/pom.xml 2018-03-20 11:35:43 UTC (rev 713)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.sbfc</groupId>
+ <artifactId>converter</artifactId>
+ <version>1.3.8-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>Systems Biology Format Converter</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <java.version>1.7</java.version>
+ <maven.compiler.source>1.7</maven.compiler.source>
+ <maven.compiler.target>1.7</maven.compiler.target>
+
+ <src.dir>src</src.dir>
+ <test.dir>test</test.dir>
+
+ <slf4j.version>1.7.13</slf4j.version>
+ <paxtools.version>4.2.0</paxtools.version>
+ <commons-io.version>2.5</commons-io.version>
+ <miriam-common.version>0.1-SNAPSHOT</miriam-common.version>
+ <jsbml.version>1.3.1</jsbml.version>
+ <libsbgn.version>2</libsbgn.version>
+ <bridgedb.version>2.2.1</bridgedb.version>
+ <junit.version>4.8</junit.version>
+ </properties>
+ <build>
+ <sourceDirectory>${src.dir}</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>${src.dir}</directory>
+ <includes>
+ <include>**/SBML2BioPAXconfigFile_withConstraints.xml</include>
+ </includes>
+ </resource>
+ </resources>
+
+ <testSourceDirectory>${test.dir}</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <directory>${test.dir}</directory>
+ <includes>
+ <include>**/*.owl</include>
+ <include>**/outputFiles/*.owl></include>
+ </includes>
+ </testResource>
+ <!-- testResource>
+ <directory>${project.basedir}</directory>
+ <includes>
+ <include>**/outputFiles/*.xml></include>
+ <include>**/outputFiles/*.owl></include>
+ </includes>
+ </testResource -->
+ </testResources>
+ </build>
+
+ <dependencies>
+ <!-- The following jars need to be installed with mvn install:install-file. e.g.
+ mvn install:install-file \
+ -Dfile=lib/libsbml-5.15.0.jar \
+ -DgroupId=org.sbml \
+ -DartifactId=libsbml \
+ -Dversion=5.15.0 \
+ -Dpackaging=jar \
+ -DgeneratePom=true \
+ -DlocalRepositoryPath=...
+ or mvn deploy:deploy-file, in which case -DlocalRepositoryPath=... becomes -Durl=file://...
+ -->
+ <dependency>
+ <groupId>org.sbml</groupId>
+ <artifactId>libSBML</artifactId>
+ <version>5.15.0</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.pathvisio</groupId>
+ <artifactId>pathvisio-core</artifactId>
+ <version>2.0.11</version>
+ </dependency>
+ <!-- The Registry API in the lib folder is different
+ from miriam-common 0.1-SNAPSHOT and miriam-lib 1.13 -->
+ <dependency>
+ <groupId>org.identifiers.dummy</groupId>
+ <artifactId>registry-lib</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <!-- End of jars that need to be manually installed because they are not available elsewhere -->
+
+ <dependency>
+ <groupId>org.sbml.jsbml</groupId>
+ <artifactId>jsbml</artifactId>
+ <version>${jsbml.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.biopax.paxtools</groupId>
+ <artifactId>paxtools</artifactId>
+ <version>${paxtools.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.sbgn</groupId>
+ <artifactId>sbgn-SEMS</artifactId>
+ <version>${libsbgn.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.biopax.paxtools</groupId>
+ <artifactId>paxtools-core</artifactId>
+ <version>${paxtools.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>ebi-repo</id>
+ <name>EBI Maven Repository</name>
+ <url>http://www.ebi.ac.uk/~maven/m2repo/</url>
+ </repository>
+ <repository>
+ <id>ebi-repo-snapshots</id>
+ <name>EBI Maven Snapshot Repository</name>
+ <url>http://www.ebi.ac.uk/~maven/m2repo_snapshots/</url>
+ </repository>
+ <repository>
+ <id>biopax-release</id>
+ <url>http://www.biopax.org/m2repo/releases/</url>
+ </repository>
+ <!-- for libsbgn -->
+ <repository>
+ <id>SEMS</id>
+ <url>http://mvn.sems.uni-rostock.de/releases/</url>
+ </repository>
+ </repositories>
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mg...@us...> - 2018-03-20 11:22:25
|
Revision: 712
http://sourceforge.net/p/sbfc/code/712
Author: mglont
Date: 2018-03-20 11:22:23 +0000 (Tue, 20 Mar 2018)
Log Message:
-----------
Ignore Maven and IntelliJ artefacts.
Property Changed:
----------------
trunk/
Index: trunk
===================================================================
--- trunk 2018-03-19 17:34:59 UTC (rev 711)
+++ trunk 2018-03-20 11:22:23 UTC (rev 712)
Property changes on: trunk
___________________________________________________________________
Added: svn:global-ignores
## -0,0 +1,2 ##
+target
+.idea
Modified: svn:ignore
## -8,4 +8,4 ##
TAGS
*.log
miriam-*
-
+*.iml
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mg...@us...> - 2018-03-19 17:35:02
|
Revision: 711
http://sourceforge.net/p/sbfc/code/711
Author: mglont
Date: 2018-03-19 17:34:59 +0000 (Mon, 19 Mar 2018)
Log Message:
-----------
fixed type casting error when converting comp submodels to biopax
Modified Paths:
--------------
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2018-01-30 14:49:49 UTC (rev 710)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2018-03-19 17:34:59 UTC (rev 711)
@@ -178,7 +178,7 @@
//If submodels contains submodel, recursively create pathways from them
CompModelPlugin compModel = (CompModelPlugin) submodelDef.getExtension(CompConstants.shortLabel);
- parseSubmodels(compModel, compSBMLDocPlugin, (Model)submodelDef);
+ parseSubmodels(compModel, compSBMLDocPlugin, bpModel);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2018-01-30 14:49:51
|
Revision: 710
http://sourceforge.net/p/sbfc/code/710
Author: niko-rodrigue
Date: 2018-01-30 14:49:49 +0000 (Tue, 30 Jan 2018)
Log Message:
-----------
adding the two files needed to use SBML2BioPAX_Arman.
Added Paths:
-----------
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverterArman2014.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java
Added: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverterArman2014.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverterArman2014.java (rev 0)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverterArman2014.java 2018-01-30 14:49:49 UTC (rev 710)
@@ -0,0 +1,98 @@
+package org.sbfc.converter.sbml2biopax.arman;
+
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.biopax.paxtools.model.Model;
+import org.biopax.paxtools.model.level3.Control;
+import org.biopax.paxtools.model.level3.Controller;
+import org.biopax.paxtools.model.level3.Conversion;
+import org.biopax.paxtools.model.level3.Pathway;
+import org.biopax.paxtools.model.level3.PhysicalEntity;
+import org.sbml.jsbml.ListOf;
+import org.sbml.jsbml.ModifierSpeciesReference;
+import org.sbml.jsbml.Reaction;
+import org.sbml.jsbml.SBMLDocument;
+import org.sbml.jsbml.Species;
+import org.sbml.jsbml.SpeciesReference;
+
+public class SBML2BioPAXConverterArman2014 {
+ private static Log log = LogFactory.getLog(SBML2BioPAXConverterArman2014.class);
+ private SBML2BioPAXUtilitiesArman2014 sbml2BioPAXUtilities = new SBML2BioPAXUtilitiesArman2014();
+
+ public Model convert(SBMLDocument sbmlDocument) {
+ return convert(sbmlDocument.getModel());
+ }
+
+ private Model convert(org.sbml.jsbml.Model sbmlModel) {
+ log.debug("First thing first: create a BioPAX model");
+ Model bpModel = sbml2BioPAXUtilities.createModel();
+
+ log.debug("Now, let's create a Pathway that corresponds to this SBML model.");
+ Pathway pathway = sbml2BioPAXUtilities.convertPathway(bpModel, sbmlModel);
+
+ // Reactions -> Conversions [start]
+ ListOf<Reaction> sbmlReactions = sbmlModel.getListOfReactions();
+ log.debug("There are " + sbmlReactions.size() + " reactions in the SBML model. ");
+ log.debug("Let's iterate over reactions and convert them one by one.");
+ for (Reaction reaction : sbmlReactions) {
+ log.trace("Working on reaction conversion: " + reaction.getName());
+ Conversion conversion = sbml2BioPAXUtilities.convertReaction(bpModel, reaction);
+ pathway.addPathwayComponent(conversion);
+
+ // Modifiers -> Control reactions [start]
+ ListOf<ModifierSpeciesReference> listOfModifiers = reaction.getListOfModifiers();
+ log.trace(
+ "- There are " + listOfModifiers.size() + " modifiers to this reaction. " +
+ "Converting them to controls to this reaction."
+ );
+
+ for (ModifierSpeciesReference modifierSpeciesReference : listOfModifiers) {
+ Control control = sbml2BioPAXUtilities.convertModifier(bpModel, modifierSpeciesReference);
+ pathway.addPathwayComponent(control);
+ control.addControlled(conversion);
+ Species species = sbmlModel.getSpecies(modifierSpeciesReference.getSpecies());
+ Controller controller = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
+ control.addController(controller);
+ }
+ // Modifiers -> Controls [end]
+
+ // Reactants -> Left Participants [start]
+ ListOf<SpeciesReference> listOfReactants = reaction.getListOfReactants();
+ log.trace("- There are " + listOfReactants.size() + " reactants to this reaction. " +
+ "Adding them to the reaction as left participants.");
+ for (SpeciesReference reactantRef : listOfReactants) {
+ Species species = sbmlModel.getSpecies(reactantRef.getSpecies());
+ PhysicalEntity physicalEntity = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
+ conversion.addLeft(physicalEntity);
+ }
+ // Reactants -> Left Participants [end]
+
+ // Products -> Right Participants [start]
+ ListOf<SpeciesReference> listOfProducts = reaction.getListOfProducts();
+ log.trace("- There are " + listOfProducts.size() + " products to this reaction. " +
+ "Adding them to the reaction as right participants.");
+ for (SpeciesReference productRef : listOfProducts) {
+ Species species = sbmlModel.getSpecies(productRef.getSpecies());
+ PhysicalEntity physicalEntity = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
+ conversion.addRight(physicalEntity);
+ }
+ // Products -> Right Participants [end]
+ }
+ // Reactions -> Conversions [end]
+
+ // The process above leaves some of the complexes empty. We need to fix this.
+ sbml2BioPAXUtilities.fillComplexes(bpModel, sbmlModel);
+
+ // Let's assign organism to every possible entity
+ sbml2BioPAXUtilities.assignOrganism(bpModel);
+
+ // Some references do not have relationship entities in them
+ // Let's assign biomodels model id for them
+ sbml2BioPAXUtilities.assignRelationXrefs(bpModel);
+
+
+ return bpModel;
+ }
+
+}
\ No newline at end of file
Added: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java (rev 0)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java 2018-01-30 14:49:49 UTC (rev 710)
@@ -0,0 +1,420 @@
+package org.sbfc.converter.sbml2biopax.arman;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.biopax.paxtools.model.BioPAXElement;
+import org.biopax.paxtools.model.BioPAXFactory;
+import org.biopax.paxtools.model.BioPAXLevel;
+import org.biopax.paxtools.model.Model;
+import org.biopax.paxtools.model.level3.BioSource;
+import org.biopax.paxtools.model.level3.BiochemicalReaction;
+import org.biopax.paxtools.model.level3.CellularLocationVocabulary;
+import org.biopax.paxtools.model.level3.Complex;
+import org.biopax.paxtools.model.level3.Control;
+import org.biopax.paxtools.model.level3.ControlType;
+import org.biopax.paxtools.model.level3.Conversion;
+import org.biopax.paxtools.model.level3.ConversionDirectionType;
+import org.biopax.paxtools.model.level3.EntityReference;
+import org.biopax.paxtools.model.level3.Named;
+import org.biopax.paxtools.model.level3.Pathway;
+import org.biopax.paxtools.model.level3.PhysicalEntity;
+import org.biopax.paxtools.model.level3.Protein;
+import org.biopax.paxtools.model.level3.ProteinReference;
+import org.biopax.paxtools.model.level3.PublicationXref;
+import org.biopax.paxtools.model.level3.RelationshipXref;
+import org.biopax.paxtools.model.level3.SimplePhysicalEntity;
+import org.biopax.paxtools.model.level3.SmallMolecule;
+import org.biopax.paxtools.model.level3.SmallMoleculeReference;
+import org.biopax.paxtools.model.level3.Transport;
+import org.biopax.paxtools.model.level3.UnificationXref;
+import org.biopax.paxtools.model.level3.XReferrable;
+import org.biopax.paxtools.model.level3.Xref;
+import org.sbml.jsbml.AbstractNamedSBase;
+import org.sbml.jsbml.AbstractSBase;
+import org.sbml.jsbml.Annotation;
+import org.sbml.jsbml.CVTerm;
+import org.sbml.jsbml.Compartment;
+import org.sbml.jsbml.ModifierSpeciesReference;
+import org.sbml.jsbml.Reaction;
+import org.sbml.jsbml.Species;
+
+public class SBML2BioPAXUtilitiesArman2014 {
+ private static Log log = LogFactory.getLog(SBML2BioPAXUtilitiesArman2014.class);
+
+ private BioPAXFactory bioPAXFactory = BioPAXLevel.L3.getDefaultFactory();
+
+ public BioPAXFactory getBioPAXFactory() {
+ return bioPAXFactory;
+ }
+
+ public void setBioPAXFactory(BioPAXFactory bioPAXFactory) {
+ this.bioPAXFactory = bioPAXFactory;
+ }
+
+ private String XMLBase = "http://www.humanmetabolism.org/#";
+
+ public String getXMLBase() {
+ return XMLBase;
+ }
+
+ public void setXMLBase(String XMLBase) {
+ this.XMLBase = XMLBase;
+ }
+
+ public String completeId(String partialId) {
+ return getXMLBase() + partialId;
+ }
+
+ public Pathway convertPathway(Model bpModel, org.sbml.jsbml.Model sbmlModel) {
+ Pathway pathway = createBPEfromSBMLE(bpModel, Pathway.class, sbmlModel);
+ for (Xref xref : generateXrefsForSBase(bpModel, RelationshipXref.class, sbmlModel)) {
+ pathway.addXref(xref);
+ }
+ return pathway;
+ }
+
+ public Model createModel() {
+ Model model = bioPAXFactory.createModel();
+ // This could change, would be great to make this configurable
+ model.setXmlBase(getXMLBase());
+ return model;
+ }
+
+ public Conversion convertReaction(Model bpModel, Reaction reaction) {
+ Class<? extends Conversion> rxnClass;
+ // Extend this switch with further SBO terms as needed
+ switch (reaction.getSBOTerm()) {
+ case 185: // Transport reaction
+ rxnClass = Transport.class;
+ break;
+ case 176: // Biochemical reaction
+ default:
+ rxnClass = BiochemicalReaction.class;
+ break;
+ }
+
+ Conversion conversion = createBPEfromSBMLE(bpModel, rxnClass, reaction);
+ conversion.setConversionDirection(
+ reaction.getReversible()
+ ? ConversionDirectionType.REVERSIBLE
+ : ConversionDirectionType.LEFT_TO_RIGHT
+ );
+
+ for (Xref xref : generateXrefsForSBase(bpModel, RelationshipXref.class, reaction)) {
+ conversion.addXref(xref);
+ }
+
+ return conversion;
+ }
+
+ public void setNames(AbstractNamedSBase namedSBase, Named named) {
+ String name = namedSBase.getName();
+ if(name == null || name.toLowerCase().equals("null")) {
+ name = "N/A";
+ }
+ named.setStandardName(name);
+ named.setDisplayName(name);
+ named.getName().add(name);
+ }
+
+ public Control convertModifier(Model bpModel, ModifierSpeciesReference modifierSpeciesReference) {
+ // Interesting enough, these reference objects don't have an ID associated with them
+ // That is why we are using hashcodes to generate unique BioPAX ID.
+ String id = completeId("control_" + modifierSpeciesReference.hashCode());
+ Control control = createBPEfromSBMLE(bpModel, Control.class, modifierSpeciesReference, id);
+ control.setControlType(ControlType.ACTIVATION);
+ return control;
+ }
+
+ public <T extends SimplePhysicalEntity, S extends EntityReference> T convertSpeciesToSPE(Model bpModel, Class<T> entityClass, Class<S> refClass, Species species) {
+ Set<Xref> xrefs = generateXrefsForSBase(bpModel, UnificationXref.class, species);
+ HashSet<XReferrable> ers = new HashSet<XReferrable>();
+ for (Xref xref : xrefs) {
+ for (XReferrable xReferrable : xref.getXrefOf()) {
+ // Only add the entity references
+ if(xReferrable instanceof EntityReference) {
+ ers.add(xReferrable);
+ }
+ }
+ }
+
+ S reference;
+ if(ers.isEmpty()) {
+ reference = createBPEfromSBMLE(bpModel, refClass, species, completeId("ref_" + species.getId()));
+ for (Xref xref : xrefs) {
+ reference.addXref(xref);
+ }
+ } else if(ers.size() == 1) { // There shouldn't be more than one
+ reference = (S) ers.iterator().next();
+ } else {
+ log.warn(
+ "There are more than one EntityReferences that match with the same unification xref for species: "
+ + species.getName()
+ + ". Picking the first one: "
+ + ers.iterator().next().getRDFId()
+ );
+
+ reference = (S) ers.iterator().next();
+ }
+
+ T entity = createBPEfromSBMLE(bpModel, entityClass, species);
+ entity.setEntityReference(reference);
+
+ // Clean-up non-used xrefs
+ for (Xref xref : xrefs) {
+ if(xref.getXrefOf().isEmpty()) {
+ bpModel.remove(xref);
+ }
+ }
+
+ return entity;
+ }
+
+ private <T extends Xref> T resourceToXref(Class<T> xrefClass, String xrefId, String resource) {
+ // Sample miriam resource: urn:miriam:chebi:CHEBI%3A15589
+
+ // TODO - the miriam common library could be used to get the id and database String regardless of the form of the URI.
+
+ String[] tokens = resource.split(":");
+ T xref = bioPAXFactory.create(xrefClass, xrefId);
+ // biomodels.db -> biomodels; ec-code -> ec code
+ String dataBase = tokens[2]
+ .replace(".", " ")
+ .replace("-", " ")
+ .replace(" db", " database")
+ .replace("obo ", "")
+ ;
+ xref.setDb(dataBase);
+ String idToken = tokens[3];
+ try {
+ URI uri = new URI(idToken);
+ xref.setId(uri.getPath());
+ } catch (URISyntaxException e) {
+ log.warn("Problem parsing the URI, " + idToken + ":" + e.getLocalizedMessage());
+ xref.setId(idToken);
+ }
+
+ return xref;
+ }
+
+ public <T extends Named> T createBPEfromSBMLE(Model bpModel, Class<T> aClass, AbstractNamedSBase abstractNamedSBase) {
+ return createBPEfromSBMLE(bpModel, aClass, abstractNamedSBase, completeId(abstractNamedSBase.getId()));
+ }
+
+
+ public <T extends Named> T createBPEfromSBMLE(Model bpModel, Class<T> aClass, AbstractNamedSBase abstractNamedSBase, String bpId) {
+ T entity = (T) bpModel.getByID(bpId);
+ if(entity == null) {
+ entity = bioPAXFactory.create(aClass, bpId);
+ setNames(abstractNamedSBase, entity);
+ setComments(abstractNamedSBase, entity);
+ bpModel.add(entity);
+ }
+
+ return entity;
+ }
+
+ private <T extends Named> void setComments(AbstractNamedSBase abstractNamedSBase, T entity) {
+ try {
+ // Strip out html tags
+ entity.addComment(abstractNamedSBase.getNotesString().replaceAll("\\<[^>]*>",""));
+ } catch (XMLStreamException e) {
+ log.warn("Problem parsing the notes XML: " + e.getLocalizedMessage());
+ }
+ }
+
+ public PhysicalEntity convertSpecies(Model bpModel, Species species) {
+ PhysicalEntity physicalEntity;
+
+ switch (species.getSBOTerm()) {
+ case 297: // Complex
+ physicalEntity = createComplexFromSpecies(bpModel, species);
+ break;
+ case 247: // Simple chemical
+ physicalEntity = convertSpeciesToSPE(bpModel, SmallMolecule.class, SmallMoleculeReference.class, species);
+ break;
+ case 252: // Polypeptide chain ~ Protein
+ default:
+ physicalEntity = convertSpeciesToSPE(bpModel, Protein.class, ProteinReference.class, species);
+ break;
+ }
+
+ CellularLocationVocabulary cellularLocationVocabulary = createCompartment(bpModel, species.getCompartmentInstance());
+ physicalEntity.setCellularLocation(cellularLocationVocabulary);
+
+ return physicalEntity;
+ }
+
+ public CellularLocationVocabulary createCompartment(Model bpModel, Compartment compartment) {
+ String id = completeId(compartment.getId());
+ CellularLocationVocabulary cellularLocationVocabulary = (CellularLocationVocabulary) bpModel.getByID(id);
+ if(cellularLocationVocabulary == null) {
+ cellularLocationVocabulary = bioPAXFactory.create(CellularLocationVocabulary.class, id);
+ cellularLocationVocabulary.addTerm(compartment.getName());
+ for (Xref xref : generateXrefsForSBase(bpModel, UnificationXref.class, compartment)) {
+ cellularLocationVocabulary.addXref(xref);
+ }
+ bpModel.add(cellularLocationVocabulary);
+ }
+
+ return cellularLocationVocabulary;
+ }
+
+ private Complex createComplexFromSpecies(Model bpModel, Species species) {
+ Complex complex = createBPEfromSBMLE(bpModel, Complex.class, species);
+ for (Xref xref : generateXrefsForSBase(bpModel, RelationshipXref.class, species)) {
+ complex.addXref(xref);
+ }
+
+ return complex;
+ }
+
+ private <T extends Xref> Set<Xref> generateXrefsForSBase(Model bpModel, Class<T> xrefClass, AbstractSBase sBase) {
+ Annotation annotation = sBase.getAnnotation();
+ HashSet<Xref> xrefs = new HashSet<Xref>();
+
+ for (CVTerm cvTerm : annotation.getListOfCVTerms()) {
+ for (String resource : cvTerm.getResources()) {
+ String xrefId = completeId(xrefClass.getSimpleName().toLowerCase() + "_" + cvTerm.hashCode());
+ // Let's not replicate xrefs if possible
+ Xref xref = (Xref) bpModel.getByID(xrefId);
+ if(xref == null) {
+ if(resource.toLowerCase().contains("pubmed")) {
+ xref = resourceToXref(PublicationXref.class, xrefId, resource);
+ } else {
+ xref = resourceToXref(xrefClass, xrefId, resource);
+ }
+ bpModel.add(xref);
+ }
+ xrefs.add(xref);
+ }
+ }
+
+ return xrefs;
+ }
+
+ public void fillComplexes(Model bpModel, org.sbml.jsbml.Model sbmlModel) {
+ HashMap<String, ProteinReference> xrefToProtein = new HashMap<String, ProteinReference>();
+ // Now let's use xrefs to find the complex components
+ // First, find the proteinrefs and map them with their xrefs
+ for (ProteinReference proteinRef : bpModel.getObjects(ProteinReference.class)) {
+ for (Xref xref : proteinRef.getXref()) {
+ xrefToProtein.put(xref.toString(), proteinRef);
+ }
+ }
+
+ // We have to work with a map not to create concurrency problems
+ // This will hold all new entities
+ HashMap<String, BioPAXElement> newBPEs = new HashMap<String, BioPAXElement>();
+
+ // Now let's go to the complexes and see what xrefs they have
+ Set<Complex> complexes = new HashSet<Complex>(bpModel.getObjects(Complex.class));
+ for (Complex complex : complexes) {
+ HashSet<String> names = new HashSet<String>(Arrays.asList(complex.getDisplayName().split(":")));
+
+ // Let's try to capture proteins from the model first
+ HashSet<Protein> components = new HashSet<Protein>();
+ for (Xref xref : complex.getXref()) {
+ ProteinReference proteinRef = xrefToProtein.get(xref.toString());
+ if(proteinRef != null) {
+ String cProteinId = completeId(complex.getRDFId() + "_" + proteinRef.getRDFId());
+ Protein protein = bioPAXFactory.create(Protein.class, cProteinId);
+ protein.setDisplayName(proteinRef.getDisplayName());
+ protein.setStandardName(proteinRef.getStandardName());
+ protein.setEntityReference(proteinRef);
+ if(!bpModel.containsID(protein.getRDFId())) {
+ components.add(protein);
+ bpModel.add(protein);
+ }
+ names.remove(protein.getDisplayName());
+ }
+ }
+
+ // These are the ones we were not able to capture from the model
+ // Let's create proteins for them
+ for (String name : names) {
+ String nameBasedURI = completeId("protein_" + name);
+ Protein protein = bioPAXFactory.create(Protein.class, nameBasedURI);
+ protein.setDisplayName(name);
+ protein.setStandardName(name);
+ newBPEs.put(nameBasedURI, protein);
+
+ String refId = completeId("ref_" + nameBasedURI);
+ ProteinReference proteinReference = (ProteinReference) newBPEs.get(refId);
+ if(proteinReference == null) {
+ proteinReference = bioPAXFactory.create(ProteinReference.class, refId);
+ proteinReference.setDisplayName(name);
+ proteinReference.setStandardName(name);
+ newBPEs.put(refId, proteinReference);
+ }
+
+ String xrefId = completeId("symbol_" + name);
+ UnificationXref unificationXref = (UnificationXref) newBPEs.get(xrefId);
+ if(unificationXref == null) {
+ unificationXref = bioPAXFactory.create(UnificationXref.class, xrefId);
+ unificationXref.setDb("HGNC Symbol");
+ unificationXref.setId(name);
+ newBPEs.put(xrefId, unificationXref);
+ }
+
+ proteinReference.addXref(unificationXref);
+ protein.setEntityReference(proteinReference);
+ components.add(protein);
+ }
+
+ // Now, add all these proteins as components
+ for (Protein component : components) {
+ complex.addComponent(component);
+ component.setCellularLocation(complex.getCellularLocation());
+ }
+ }
+
+ // Finally add all these new BPEs to the model
+ for (BioPAXElement bioPAXElement : newBPEs.values()) {
+ bpModel.add(bioPAXElement);
+ }
+
+ log.trace("Fixed " + complexes.size() + " complexes in the model.");
+
+ }
+
+ public void assignOrganism(Model bpModel) {
+ // Since this is RECON2, everything is human
+ BioSource bioSource = bioPAXFactory.create(BioSource.class, completeId("source_human"));
+ bioSource.setDisplayName("Homo sapiens");
+ bioSource.setStandardName("Homo sapiens");
+ UnificationXref unificationXref = bioPAXFactory.create(UnificationXref.class, completeId("xref_human_tax"));
+ unificationXref.setDb("taxonomy");
+ unificationXref.setId("9606");
+ bpModel.add(unificationXref);
+ bioSource.addXref(unificationXref);
+ bpModel.add(bioSource);
+
+ for (ProteinReference proteinReference : bpModel.getObjects(ProteinReference.class)) {
+ proteinReference.setOrganism(bioSource);
+ }
+ }
+
+ public void assignRelationXrefs(Model bpModel) {
+ RelationshipXref xref = bioPAXFactory.create(RelationshipXref.class, completeId("relxref_biomodels"));
+ xref.setDb("BioModels");
+ xref.setId("MODEL1109130000");
+ bpModel.add(xref);
+
+ for (EntityReference entityReference : bpModel.getObjects(EntityReference.class)) {
+ if(entityReference.getXref().isEmpty()) {
+ entityReference.addXref(xref);
+ }
+ }
+ }
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2017-11-30 11:52:25
|
Revision: 709
http://sourceforge.net/p/sbfc/code/709
Author: niko-rodrigue
Date: 2017-11-30 11:52:22 +0000 (Thu, 30 Nov 2017)
Log Message:
-----------
added a new SBML2Biopax converter so that we can use both Arman2014 and Tramy2016 converters.
Modified Paths:
--------------
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Arman.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
Added Paths:
-----------
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Arman.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Arman.java 2017-09-27 09:51:02 UTC (rev 708)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Arman.java 2017-11-30 11:52:22 UTC (rev 709)
@@ -18,7 +18,7 @@
import org.sbfc.converter.models.BioPAXModel;
import org.sbfc.converter.models.GeneralModel;
import org.sbfc.converter.models.SBMLModel;
-import org.sbfc.converter.sbml2biopax.arman.SBML2BioPAXConverter;
+import org.sbfc.converter.sbml2biopax.arman.SBML2BioPAXConverterArman2014;
import org.sbml.jsbml.SBMLDocument;
import org.sbml.jsbml.SBMLReader;
@@ -62,7 +62,7 @@
log.info("SBML model loaded: " + sbmlDocument.getModel().getNumReactions() + " reactions in it.");
log.info("Converting SBML model to BioPAX...");
- SBML2BioPAXConverter sbml2BioPAXConverter = new SBML2BioPAXConverter();
+ SBML2BioPAXConverterArman2014 sbml2BioPAXConverter = new SBML2BioPAXConverterArman2014();
Model bpModel = sbml2BioPAXConverter.convert(sbmlDocument);
log.info("Saving BioPAX model to " + bpFile);
@@ -87,7 +87,7 @@
log.info("SBML model loaded: " + sbmlDocument.getModel().getNumReactions() + " reactions in it.");
log.info("Converting SBML model to BioPAX...");
- SBML2BioPAXConverter sbml2BioPAXConverter = new SBML2BioPAXConverter();
+ SBML2BioPAXConverterArman2014 sbml2BioPAXConverter = new SBML2BioPAXConverterArman2014();
Model bpModel = sbml2BioPAXConverter.convert(sbmlDocument);
BioPAXModel biopaxModel = new BioPAXModel(bpModel);
Added: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java (rev 0)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_Tramy.java 2017-11-30 11:52:22 UTC (rev 709)
@@ -0,0 +1,115 @@
+package org.sbfc.converter.sbml2biopax;
+
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.biopax.paxtools.io.SimpleIOHandler;
+import org.biopax.paxtools.model.BioPAXLevel;
+import org.biopax.paxtools.model.Model;
+import org.sbfc.converter.GeneralConverter;
+import org.sbfc.converter.exceptions.ConversionException;
+import org.sbfc.converter.exceptions.ReadModelException;
+import org.sbfc.converter.models.BioPAXModel;
+import org.sbfc.converter.models.GeneralModel;
+import org.sbfc.converter.models.SBMLModel;
+import org.sbfc.converter.sbml2biopax.arman.SBML2BioPAXConverter;
+import org.sbml.jsbml.SBMLDocument;
+import org.sbml.jsbml.SBMLReader;
+
+/**
+ * Converts an SBML model into a BioPAX L3 model, code done during GSOC 2016 by Tramy Nguyen, based on the work from the GSOC 2014.
+ *
+ *
+ * @author rodrigue
+ * @author tramy-nguyen
+ *
+ */
+public class SBML2BioPAX_Tramy extends GeneralConverter {
+
+
+ /**
+ * logger
+ */
+ private static Log log = LogFactory.getLog(SBML2BioPAX_Tramy.class);
+
+ /**
+ * Converts an input SBML file into a BioPAX L3 model and save it in the given output owl file.
+ *
+ * @param args arguments to the class, expect two files as input
+ * @throws IOException - if an I/O error occurs.
+ * @throws XMLStreamException - if there is an error reading the XML file.
+ */
+ public static void main(String[] args) throws IOException, XMLStreamException {
+ if(args.length < 2) {
+ System.err.println("Usage: SBML2BioPAX input.sbml output.owl");
+ System.exit(-1);
+ }
+
+ String sbmlFile = args[0],
+ bpFile = args[1];
+
+ log.info("Reading SBML file: " + sbmlFile);
+ SBMLDocument sbmlDocument = SBMLReader.read(new File(sbmlFile));
+ log.info("SBML model loaded: " + sbmlDocument.getModel().getNumReactions() + " reactions in it.");
+
+ log.info("Converting SBML model to BioPAX...");
+ SBML2BioPAXConverter sbml2BioPAXConverter = new SBML2BioPAXConverter();
+ Model bpModel = sbml2BioPAXConverter.convert(sbmlDocument);
+
+ log.info("Saving BioPAX model to " + bpFile);
+ SimpleIOHandler bpHandler = new SimpleIOHandler(BioPAXLevel.L3);
+ bpHandler.convertToOWL(bpModel, new FileOutputStream(bpFile));
+ log.info("Conversion completed.");
+ }
+
+ @Override
+ public GeneralModel convert(GeneralModel model)
+ throws ConversionException, ReadModelException
+ {
+ // using the code that was on the main method to implement the convert method
+ // this way we can easily add any converter into SBFC
+ if (! (model instanceof SBMLModel)) {
+
+ // TODO - check is GenereModel URI look like an SBML one. If yes, try to convert the model to an SBMLModel
+
+ throw new ReadModelException("Expecting an SBMLModel as input ! Got '" + model.getClass().getSimpleName() + "'");
+ }
+ SBMLDocument sbmlDocument = ((SBMLModel) model).getSBMLDocument();
+ log.info("SBML model loaded: " + sbmlDocument.getModel().getNumReactions() + " reactions in it.");
+
+ log.info("Converting SBML model to BioPAX...");
+ SBML2BioPAXConverter sbml2BioPAXConverter = new SBML2BioPAXConverter();
+ Model bpModel = sbml2BioPAXConverter.convert(sbmlDocument);
+
+ BioPAXModel biopaxModel = new BioPAXModel(bpModel);
+
+ return biopaxModel;
+ }
+
+ @Override
+ public String getResultExtension() {
+ return ".owl";
+ }
+
+ @Override
+ public String getName() {
+ return "SBML2BioPAX_Tramy";
+ }
+
+ @Override
+ public String getDescription() {
+ return "It converts a model format from SBML to BioPAX L3 and produce a mostly valib BioPAX L3";
+ }
+
+ @Override
+ public String getHtmlDescription() {
+ return "It converts a model format from SBML to BioPAX L3 and produce a mostly valib BioPAX L3";
+ }
+
+}
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2017-09-27 09:51:02 UTC (rev 708)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2017-11-30 11:52:22 UTC (rev 709)
@@ -588,6 +588,48 @@
// TODO - if the group package is not defined and/or we could not linked a group to the species, create a new EntityReference for the species
+ /*
+ * old deleted code to put back
+ *
+ HashSet<XReferrable> ers = new HashSet<XReferrable>();
+ for (Xref xref : xrefs) {
+ for (XReferrable xReferrable : xref.getXrefOf()) {
+ // Only add the entity references
+ if(xReferrable instanceof EntityReference) {
+ ers.add(xReferrable);
+ }
+ }
+ }
+
+ S reference;
+ if(ers.isEmpty()) {
+ reference = createBPEfromSBMLE(bpModel, refClass, species, completeId("ref_" + species.getId()));
+ for (Xref xref : xrefs) {
+ reference.addXref(xref);
+ }
+ } else if(ers.size() == 1) { // There shouldn't be more than one
+ reference = (S) ers.iterator().next();
+ } else {
+ log.warn(
+ "There are more than one EntityReferences that match with the same unification xref for species: "
+ + species.getName()
+ + ". Picking the first one: "
+ + ers.iterator().next().getRDFId()
+ );
+
+ reference = (S) ers.iterator().next();
+ }
+
+ T entity = createBPEfromSBMLE(bpModel, entityClass, species);
+ entity.setEntityReference(reference);
+
+ // Clean-up non-used xrefs
+ for (Xref xref : xrefs) {
+ if(xref.getXrefOf().isEmpty()) {
+ bpModel.remove(xref);
+ }
+ }*/
+
//entity.setEntityReference(reference);
return entity;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2017-09-27 09:51:06
|
Revision: 708
http://sourceforge.net/p/sbfc/code/708
Author: niko-rodrigue
Date: 2017-09-27 09:51:02 +0000 (Wed, 27 Sep 2017)
Log Message:
-----------
small update to the miriam export file.
Modified Paths:
--------------
trunk/miriam.xml
Modified: trunk/miriam.xml
===================================================================
--- trunk/miriam.xml 2017-08-29 11:09:47 UTC (rev 707)
+++ trunk/miriam.xml 2017-09-27 09:51:02 UTC (rev 708)
@@ -1355,6 +1355,8 @@
<uris>
<uri type="URN">urn:miriam:sbo</uri>
<uri type="URL">http://identifiers.org/sbo/</uri>
+ <uri type="URL" deprecated="true">http://identifiers.org/biomodels.sbo/</uri>
+ <uri type="URL" deprecated="true">http://identifiers.org/obo.sbo/</uri>
<uri type="URN" deprecated="true">urn:miriam:biomodels.sbo</uri>
<uri type="URN" deprecated="true">urn:miriam:obo.sbo</uri>
<uri type="URL" deprecated="true">http://www.biomodels.net/SBO/</uri>
@@ -2769,6 +2771,7 @@
<uris>
<uri type="URN">urn:miriam:mod</uri>
<uri type="URL">http://identifiers.org/mod/</uri>
+ <uri type="URL" deprecated="true">http://identifiers.org/psimod/</uri>
<uri type="URL" deprecated="true">http://identifiers.org/obo.psi-mod/</uri>
<uri type="URN" deprecated="true">urn:miriam:obo.psi-mod</uri>
<uri type="URN" deprecated="true">urn:miriam:psimod</uri>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|