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: <nv...@us...> - 2023-11-06 10:54:47
|
Revision: 757 http://sourceforge.net/p/sbfc/code/757 Author: nvntung Date: 2023-11-06 10:54:44 +0000 (Mon, 06 Nov 2023) Log Message: ----------- improved the methods of the Converter class Modified Paths: -------------- trunk/src/org/sbfc/converter/Converter.java Modified: trunk/src/org/sbfc/converter/Converter.java =================================================================== --- trunk/src/org/sbfc/converter/Converter.java 2023-11-06 10:40:17 UTC (rev 756) +++ trunk/src/org/sbfc/converter/Converter.java 2023-11-06 10:54:44 UTC (rev 757) @@ -133,9 +133,10 @@ * @return the path of the output file */ public static String convertFromFile(String inputModelType, String converterType, String inputFileName) { - - return convertFromFile(inputModelType, converterType, inputFileName, null); - + String convertedFilePath = convertFromFile(inputModelType, converterType, inputFileName, null); + logger.info("The converted file can be found at " + convertedFilePath); + System.out.println("The converted file is at " + convertedFilePath); + return convertedFilePath; } /** @@ -249,8 +250,6 @@ return null; } - - /** * Converts the input String using the provided model and converter classes. * @@ -293,9 +292,6 @@ return retModel; } - /** - * @param args - */ public static void main(String[] args) { if (args.length < 3) { // TODO : Allow to do several conversion at the same time ? @@ -303,11 +299,11 @@ "Usage: Converter.java [InputModelClass] [ConverterClass] [ModelFile]"); } else { - //convertFromFile(args[0], args[1], args[2]); - convertFromFile("SBMLModel", - "SBML2SBML_L3V1", - "/Users/tnguyen/ownCloud/Projects/biomodels-converters/sbfc-converters/sbfc/data/BIOMD0000000248.xml"); - // /Users/tnguyen/ownCloud/Projects/biomodels-converters/sbfc-converters/sbfc/test/org/sbfc/test/sbml2biopax/outputFiles/biopax3-genetic-interaction.owl + // adding the following arguments in your IDE or command line: + // args[0]: "SBMLModel", args[1]: "SBML2SBML_L3V1", and args[2]: "data/BIOMD0000000248.xml") + // then, call: convertFromFile(args[0], args[1], args[2]); + // or: convertFromFile("SBMLModel", "SBML2SBML_L3V1", "data/BIOMD0000000248.xml"); + convertFromFile(args[0], args[1], args[2]); System.exit(0); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2023-11-06 10:40:20
|
Revision: 756 http://sourceforge.net/p/sbfc/code/756 Author: nvntung Date: 2023-11-06 10:40:17 +0000 (Mon, 06 Nov 2023) Log Message: ----------- reimplemented SBML2SBML.convert method using jsbml library Modified Paths: -------------- trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java Modified: trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2023-11-06 10:08:01 UTC (rev 755) +++ trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2023-11-06 10:40:17 UTC (rev 756) @@ -32,17 +32,17 @@ import org.sbfc.converter.models.GeneralModel; import org.sbfc.converter.models.SBMLModel; import org.sbml.jsbml.SBMLDocument; -import org.sbml.libsbml.OStringStream; -import org.sbml.libsbml.SBMLReader; -import org.sbml.libsbml.SBMLWriter; -import org.sbml.libsbml.libsbmlConstants; +import org.sbml.jsbml.SBMLReader; +import org.sbml.jsbml.SBMLWriter; +import javax.xml.stream.XMLStreamException; + /** - * Converts an SBML file into an other SBML level and version. - * + * <p>Converts an SBML file into another SBML level and version.</p> + * <p> * The converter name that you pass to SBFC as to be SBML2SBML_LxVx where LxVx is the targeted - * SBML level and version. + * SBML level and version. </p> * * @author rodrigue * @version 1.0 @@ -104,7 +104,6 @@ try { targetLevel = Integer.parseInt(options.get("sbml.target.level")); targetVersion = Integer.parseInt(options.get("sbml.target.version")); - } catch (NumberFormatException e) { // return as we are not able to get the target level and version System.out.println("SBML2SBML : cannot read the target level and version : " + e.getMessage()); @@ -112,11 +111,9 @@ } if (targetLevel != currentLevel || targetVersion != currentVersion) { - String currentSBML; try { currentSBML = sbmlModel.modelToString(); - System.out.println("SBML2SBML : current model size = " + currentSBML.length()); // if (currentSBML != null && currentSBML.length() > 151) { @@ -130,37 +127,46 @@ if (isLibSBMLAvailable) { // Code using libSBML directly - org.sbml.libsbml.SBMLReader libSBMLReader = new SBMLReader(); - - org.sbml.libsbml.SBMLDocument libSBMLdoc = libSBMLReader.readSBMLFromString(currentSBML); - + SBMLReader sbmlReader = new SBMLReader(); + + SBMLDocument document; + try { + document = sbmlReader.readSBMLFromString(currentSBML); + } catch (XMLStreamException e) { + throw new RuntimeException(e); + } + System.out.println("SBML2SBML : trying to convert to SBML level " + targetLevel + " version " + targetVersion); - System.out.println("SBML2SBML : L1V2 compatibility = " + libSBMLdoc.checkL1Compatibility()); + System.out.println("SBML2SBML : L1V2 compatibility = " + document.checkConsistencyOffline()); - boolean isSetLVSuccesfull = libSBMLdoc.setLevelAndVersion(targetLevel, targetVersion); + boolean isSetLVSuccessfully = document.setLevelAndVersion(targetLevel, targetVersion); // libsbml.LIBSBML_OPERATION_SUCCESS - System.out.println("SBML2SBML : setLevelAndVersion worked = " + isSetLVSuccesfull); + System.out.println("SBML2SBML : setLevelAndVersion worked = " + isSetLVSuccessfully); // TODO : if setLevelAndVersion returned false, the conversion is not possible // and we need to return the list of errors found by libSBML // Could be written in the notes of an empty sbml element - if (!isSetLVSuccesfull) { + if (!isSetLVSuccessfully) { System.out.println("SBML2SBML - Conversion was not possible, here are the errors returned by libSBML:"); - libSBMLdoc.printErrors(); - OStringStream libsbmlOStream = new OStringStream(); - libSBMLdoc.printErrors(libsbmlOStream); - throw new ConversionException("The LibSBML conversion failed, it detected '" + libSBMLdoc.getNumErrors(libsbmlConstants.LIBSBML_SEV_ERROR) + "' potential problems." + /*InputStream libsbmlOStream = new InputStream(); + document.printErrors(libsbmlOStream); + throw new ConversionException("The LibSBML conversion failed, it detected '" + document.getNumErrors(libsbmlConstants.LIBSBML_SEV_ERROR) + "' potential problems." + "\n\nBefore attempting again to convert your model, check that it is valid SBML at http://sbml.org/Facilities/Validator.\n" - + "\nBelow is the list of errors:\n" + libsbmlOStream.str()); + + "\nBelow is the list of errors:\n" + libsbmlOStream.str());*/ } - org.sbml.libsbml.SBMLWriter libSBMLWriter = new SBMLWriter(); + SBMLWriter sbmlWriter = new SBMLWriter(); + String targetSBML; + try { + targetSBML = sbmlWriter.writeSBMLToString(document); + } catch (XMLStreamException e) { + throw new RuntimeException(e); + } - String targetSBML = libSBMLWriter.writeSBMLToString(libSBMLdoc); // System.out.println("SBML2SBML : converted model : \n" + targetSBML.substring(0, 150)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2023-11-06 10:08:05
|
Revision: 755 http://sourceforge.net/p/sbfc/code/755 Author: nvntung Date: 2023-11-06 10:08:01 +0000 (Mon, 06 Nov 2023) Log Message: ----------- this static block muted org.sbfc.converter.sbml2sbml.* so the converter throws exception Modified Paths: -------------- trunk/log4j.properties trunk/pom.xml trunk/sbfConverter.sh trunk/src/org/sbfc/converter/Converter.java trunk/src/org/sbfc/converter/GeneralConverter.java trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java trunk/src/org/sbfc/converter/sbml2sbgnml/SBML2SBGNML.java trunk/src/org/sbfc/converter/sbml2sbml/IdentifiersUtilLibSBML.java trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java trunk/src/org/util/classlist/ConverterSearcher.java trunk/test/org/sbfc/test/biopax2sbml/outputFiles/AKT_Signaling_Pathway.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/AKT_Signaling_Pathway_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/Catalysis_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/GeneticToggleSBML2_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/GeneticToggleSBML2_roundtripping2.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/GeneticToggleSBML2_roundtripping2_3.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/INOH_GPCR_signaling-pertussis_toxin-.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/INOH_GPCR_signaling-pertussis_toxin-_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/JNK.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/JNK_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/Modulation_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/NetPath_1.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/NetPath_1_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/TetR_Inverter_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/TetR_Inverter_roundtripping2.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/TetR_Inverter_roundtripping23.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax-example-ecocyc-glycolysis.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax-example-ecocyc-glycolysis_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax-example-proteomics-protein-interaction.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax-example-proteomics-protein-interaction_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax-example-short-pathway.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax-example-short-pathway_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax3-genetic-interaction.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax3-insulin-maturation.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax3-insulin-maturation_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax3-phosphorylation-reaction.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax3-protein-interaction.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax3-short-metabolic-pathway.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax3-short-metabolic-pathway_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/biopax3-template-reaction.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/mapSingleSpecies_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/mapSpeciesSpecies_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/replacingASpecies_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/replacingASpecies_roundtripping2.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/replacingASpecies_roundtripping2_3.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/replacingElements_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/replacingElements_roundtripping2.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/replacingElements_roundtripping2_3.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/rna.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/rna_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/testBiochemReactParticipantsLocationRule.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/testBiochemReactParticipantsLocationRule_Transport.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/testBiochemReactParticipantsLocationRule_Transport_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/testBiochemReactParticipantsLocationRule_roundtripping.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/testControlTypeRule.xml trunk/test/org/sbfc/test/biopax2sbml/outputFiles/testControlTypeRule_roundtripping.xml trunk/test/org/sbfc/test/resources/INOH_GPCR_signaling-pertussis_toxin-.xml trunk/test/org/sbfc/test/sbml2biopax/SBMLSpeciesArmanTests.java trunk/test/org/sbfc/test/sbml2biopax/outputFiles/GeneticToggleSBML2_roundtripping.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/GeneticToggleSBML2_roundtripping2.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/GeneticToggleSBML2_roundtripping2_3.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/TetR_Inverter_roundtripping.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/TetR_Inverter_roundtripping2.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/TetR_Inverter_roundtripping23.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/biopax3-genetic-interaction.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/biopax3-phosphorylation-reaction.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/biopax3-protein-interaction.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/biopax3-template-reaction.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/mapSingleSpecies_roundtripping.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/mapSpeciesSpecies_roundtripping.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/replacingASpecies_roundtripping.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/replacingASpecies_roundtripping2.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/replacingASpecies_roundtripping2_3.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/replacingElements_roundtripping.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/replacingElements_roundtripping2.owl trunk/test/org/sbfc/test/sbml2biopax/outputFiles/replacingElements_roundtripping2_3.owl Modified: trunk/log4j.properties =================================================================== --- trunk/log4j.properties 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/log4j.properties 2023-11-06 10:08:01 UTC (rev 755) @@ -28,4 +28,4 @@ log4j.logger.org.sbml.jsbml.test=WARN # comment the following line to get the debug messages from sbfc -#log4j.logger.org.sbfc=DEBUG +log4j.logger.org.sbfc=DEBUG Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/pom.xml 2023-11-06 10:08:01 UTC (rev 755) @@ -13,21 +13,21 @@ <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> + <java.version>1.8</java.version> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> <src.dir>src</src.dir> <test.dir>test</test.dir> <slf4j.version>1.7.13</slf4j.version> - <paxtools.version>5.0.1</paxtools.version> + <paxtools.version>5.1.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> + <junit.version>4.13.2</junit.version> </properties> <build> <sourceDirectory>${src.dir}</sourceDirectory> @@ -46,7 +46,7 @@ <directory>${test.dir}</directory> <includes> <include>**/*.owl</include> - <include>**/outputFiles/*.owl></include> + <include>**/outputFiles/*.owl</include> </includes> </testResource> <!-- testResource> @@ -72,12 +72,6 @@ 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> @@ -94,7 +88,7 @@ <dependency> <groupId>org.sbml.jsbml</groupId> <artifactId>jsbml</artifactId> - <version>${jsbml.version}</version> + <version>1.6.1</version> </dependency> <dependency> <groupId>org.biopax.paxtools</groupId> @@ -121,23 +115,19 @@ <version>${junit.version}</version> <scope>test</scope> </dependency> + + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + </dependency> </dependencies> <repositories> - <repository> - <id>ebi-repo</id> - <name>EBI Maven Repository</name> - <url>https://www.ebi.ac.uk/~maven/m2repo/</url> - </repository> - <repository> - <id>ebi-repo-snapshots</id> - <name>EBI Maven Snapshot Repository</name> - <url>https://www.ebi.ac.uk/~maven/m2repo_snapshots/</url> - </repository> <!-- for libsbgn --> <repository> <id>SEMS</id> - <url>https://mvn.sems.uni-rostock.de/releases/</url> + <url>https://mvn.bio.informatik.uni-rostock.de/releases/org/sbgn/sbgn-SEMS/2/</url> </repository> </repositories> </project> Modified: trunk/sbfConverter.sh =================================================================== --- trunk/sbfConverter.sh 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/sbfConverter.sh 2023-11-06 10:08:01 UTC (rev 755) @@ -2,7 +2,7 @@ # Setting up libsbml, needed for the SBML2SBML converters #LD_LIBRARY_PATH=/nfs/production/biomodels/sw/libSBML-5.11.6-Linux/usr/lib64 -LD_LIBRARY_PATH=/nfs/production/biomodels/sw//libSBML-5.18.0-Linux/usr/lib64 +#LD_LIBRARY_PATH=/nfs/production/biomodels/sw/libSBML-5.18.0-Linux/usr/lib64 # Setting up for Java properties PROPERTIES="" @@ -16,7 +16,8 @@ # Setting up java -export JAVA_HOME=/nfs/public/rw/webadmin/java/jdks/latest_1.8 + +#export JAVA_HOME=/nfs/public/rw/webadmin/java/jdks/latest_1.8 export PATH=${JAVA_HOME}/bin:${PATH} RESOLVE_LINK=`readlink -f $0` @@ -123,11 +124,12 @@ 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 "`basename $0`: Conversion, using $CONVERTER_NAME, for '$SBML_DIR'..." >> $LOG_FILE 2>&1 echo "------------------------------------------------------------" >> $LOG_FILE 2>&1 eval $COMMAND -Dmiriam.xml.export=${SBF_CONVERTER_HOME}/miriam.xml org.sbfc.converter.Converter $MODEL_NAME $CONVERTER_NAME $SBML_DIR >> $LOG_FILE 2>&1 touch `dirname $file`/`basename $file .input`.done + echo $CONVERTER_NAME fi Modified: trunk/src/org/sbfc/converter/Converter.java =================================================================== --- trunk/src/org/sbfc/converter/Converter.java 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/src/org/sbfc/converter/Converter.java 2023-11-06 10:08:01 UTC (rev 755) @@ -52,7 +52,7 @@ public static ArrayList<String> converterFullNames = ConverterSearcher.getConverterFullNameList(); public static String converterPackage = ConverterSearcher.getConverterSuperPackage(); - + /** * Search for the converter package associated to the converter type * @@ -119,8 +119,7 @@ return new ConverterData(converterType, converterPackage); } - - + public Converter() { super(); } @@ -160,14 +159,15 @@ converterType = data.getConverterType(); converterPackage = data.getConverterPackage(); - + //Instantiating the converter GeneralConverter converter=null; try { - converter = (GeneralConverter) Class.forName(converterPackage+"."+converterType).newInstance(); + String className = converterPackage + "." + converterType; + converter = (GeneralConverter) Class.forName(className).newInstance(); converter.setOptions(converterOptions); } catch (Exception e1) { - //Creating an error report + // Creating an error report int pos = inputFileName.lastIndexOf("."); FileOutputStream fconv; try { @@ -191,19 +191,22 @@ e2.printStackTrace(); }; } + try { String modelPackage = "org.sbfc.converter.models"; - //Instantiating the inputModel - GeneralModel inputModel = (GeneralModel) Class.forName(modelPackage+"."+inputModelType).newInstance(); + // Instantiating the inputModel + String className = modelPackage + "." + inputModelType; + GeneralModel inputModel = (GeneralModel) Class.forName(className).newInstance(); inputModel.setModelFromFile(inputFileName); //Converting the Model - GeneralModel result = converter.convert(inputModel); + assert converter != null; + GeneralModel result = converter.convert(inputModel); if (converterOptions.get("save.result").equals("yes")) { //Creating the OutputFile - if (outputFileName == null || outputFileName.trim().length() == 0) { + if (outputFileName == null || outputFileName.trim().isEmpty()) { int pos = inputFileName.lastIndexOf("."); outputFileName = inputFileName.substring(0,pos) + converter.getResultExtension(); } @@ -293,19 +296,18 @@ /** * @param args */ - public static void main(String args[]) { - if(args.length < 3) { + public static void main(String[] args) { + if (args.length < 3) { // TODO : Allow to do several conversion at the same time ? - System.out.println("Wrong number of arguments :\n"+ "Usage: Converter.java [InputModelClass] [ConverterClass] [ModelFile]"); - } - else { - convertFromFile(args[0], args[1], args[2]); -// convertFromFile("SBMLModel", -// "SBML2BioPAX_l3", -// "/Users/tramynguyen/Documents/GSoC_2016/BioPAX2SBML/KEGGtranslator/files/KEGGtrans_hsa00010jSBML.sbml.xml"); + } else { + //convertFromFile(args[0], args[1], args[2]); + convertFromFile("SBMLModel", + "SBML2SBML_L3V1", + "/Users/tnguyen/ownCloud/Projects/biomodels-converters/sbfc-converters/sbfc/data/BIOMD0000000248.xml"); + // /Users/tnguyen/ownCloud/Projects/biomodels-converters/sbfc-converters/sbfc/test/org/sbfc/test/sbml2biopax/outputFiles/biopax3-genetic-interaction.owl System.exit(0); } } Modified: trunk/src/org/sbfc/converter/GeneralConverter.java =================================================================== --- trunk/src/org/sbfc/converter/GeneralConverter.java 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/src/org/sbfc/converter/GeneralConverter.java 2023-11-06 10:08:01 UTC (rev 755) @@ -68,7 +68,8 @@ /** * Set the converter options. - * @param options + * @param options A {@link Map} object denoting the conversion options. + * For example: "sbml.target.level" --> "3" if we convert a SBML model to level 3 */ public void setOptions(Map<String, String> options) { this.options = options; Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilitiesArman2014.java 2023-11-06 10:08:01 UTC (rev 755) @@ -194,7 +194,7 @@ .replace("obo ", "") ; xref.setDb(dataBase); - String idToken = tokens[3]; + String idToken = tokens[2]; try { URI uri = new URI(idToken); xref.setId(uri.getPath()); Modified: trunk/src/org/sbfc/converter/sbml2sbgnml/SBML2SBGNML.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2sbgnml/SBML2SBGNML.java 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/src/org/sbfc/converter/sbml2sbgnml/SBML2SBGNML.java 2023-11-06 10:08:01 UTC (rev 755) @@ -294,7 +294,7 @@ /** * Take a SBMLDocument and build the corresponding SBGN-ML object * @param sbmlDocument - * @param outputFile + * @return outputFile An {@lik Sbgn} object */ public Sbgn convertSBGNML(SBMLDocument sbmlDocument) throws SBMLException { @@ -612,7 +612,7 @@ } /** - * Create sbgn {@link Glyph} from a {@link ListOf<Species} and add them to the given {@link Map}. + * Create sbgn {@link Glyph} from a {@link ListOf<Species>} and add them to the given {@link Map}. * In order to be able to write complexes, this function is called recursively. * TODO : Complex components should be determined thanks to web services, like MIRIAM web services or * Ontology Lookup Services (GO, CHEBI) and Uniprot. @@ -656,7 +656,7 @@ * Coordinates of {@link Start} and {@link End} are set to 0. * Through this method, default classes are given by the user. Default classes have to be chosen very carefully because they will have * priority over SBML retrieved SBO terms in case of discordance between their meaning in terms of SBGN-ML glyphs. - * @param specie : {@link SBase} element which is bound to the arc. + * @param reaction : {@link SBase} element which is bound to the arc. * @param defaultSBGNClass : {@link String} the default SBGN-ML class of the arc. * @param source : {@link Glyph} source glyph of the SBGN-ML arc. * @param target : {@link Glyph} target glyph of the SBGN-ML arc. Modified: trunk/src/org/sbfc/converter/sbml2sbml/IdentifiersUtilLibSBML.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2sbml/IdentifiersUtilLibSBML.java 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/src/org/sbfc/converter/sbml2sbml/IdentifiersUtilLibSBML.java 2023-11-06 10:08:01 UTC (rev 755) @@ -24,23 +24,15 @@ */ package org.sbfc.converter.sbml2sbml; +import org.identifiers.registry.RegistryLocalProvider; +import org.sbml.jsbml.*; + +import javax.xml.stream.XMLStreamException; +import java.io.IOException; import java.util.ArrayList; import java.util.Calendar; import java.util.List; -import org.sbml.libsbml.CVTerm; -import org.sbml.libsbml.Event; -import org.sbml.libsbml.KineticLaw; -import org.sbml.libsbml.ListOf; -import org.sbml.libsbml.Model; -import org.sbml.libsbml.Reaction; -import org.sbml.libsbml.SBMLDocument; -import org.sbml.libsbml.SBMLReader; -import org.sbml.libsbml.SBMLWriter; -import org.sbml.libsbml.SBase; -import org.sbml.libsbml.UnitDefinition; -import org.identifiers.registry.RegistryLocalProvider; - /** * This class will provide utility methods to transform all the annotations in am SBML model to use either only identifiers.org URL * or miriam URN. @@ -286,7 +278,7 @@ return doc; } - public static void main(String[] args) { + public static void main(String[] args) throws XMLStreamException, IOException { if (!isLibSBMLAvailable) { System.out.println("LibSBML does not seems to be correctly configured !!"); @@ -356,10 +348,10 @@ if (nbSecondes > 120) { System.out.println("It took " + nbSecondes/60 + " minutes."); } else { - System.out.println("It took " + nbSecondes + " secondes."); + System.out.println("It took " + nbSecondes + " seconds."); } - System.out.println("Reading : " + nbSecondesRead + " secondes."); - System.out.println("Writing : " + nbSecondesWrite + " secondes, AnnoUpdate : " + nbSecondesAnnoUpdate + " secondes."); + System.out.println("Reading : " + nbSecondesRead + " seconds."); + System.out.println("Writing : " + nbSecondesWrite + " seconds, AnnoUpdate : " + nbSecondesAnnoUpdate + " seconds."); } Modified: trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2023-11-06 10:08:01 UTC (rev 755) @@ -49,11 +49,10 @@ * */ public class SBML2SBML extends GeneralConverter { - int targetLevel = -1; int targetVersion = -1; - private static boolean isLibSBMLAvailable = false; + private static boolean isLibSBMLAvailable = true; public SBML2SBML() { @@ -60,7 +59,7 @@ super(); } - static { + /*static { try { System.loadLibrary("sbmlj"); @@ -69,13 +68,13 @@ isLibSBMLAvailable = true; } catch (SecurityException e) { - // System.out.println("SecurityException exception catched : Could not load libsbml library."); + System.out.println("SecurityException exception catched : Could not load libsbml library."); throw e; } catch (UnsatisfiedLinkError e) { // always sending an exception so that the SBFC framework know there is a problem and the actual exception message can be displayed // System.out.println("UnsatisfiedLinkError exception catched : Could not load libsbml library."); // System.out.println("You need to install libsbml before being able to use the SBML2SBML converter."); - throw new RuntimeException("You need to install libsbml before being able to use the SBML2SBML converter.", e); + throw new RuntimeException("You need to install libsbml before being able to use the SBML2SBML converter.", e); } catch (ClassNotFoundException e) { // e.printStackTrace(); // System.out.println("ClassNotFoundException exception catched : Could not load libsbml class file."); @@ -86,7 +85,7 @@ + "Control that the libsbmlj.jar that you are using is synchronized with your current libSBML installation."); } - } + }*/ @Override public GeneralModel convert(GeneralModel model) throws ConversionException, ReadModelException { Modified: trunk/src/org/util/classlist/ConverterSearcher.java =================================================================== --- trunk/src/org/util/classlist/ConverterSearcher.java 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/src/org/util/classlist/ConverterSearcher.java 2023-11-06 10:08:01 UTC (rev 755) @@ -58,8 +58,8 @@ private static boolean isConverter(String className) { try { Class<?> cls = Class.forName(className); - Object clsInstance = (Object) cls.newInstance(); - if(clsInstance instanceof GeneralConverter) { + Object clsInstance = cls.newInstance(); + if (clsInstance instanceof GeneralConverter) { return true; } } Modified: trunk/test/org/sbfc/test/biopax2sbml/outputFiles/AKT_Signaling_Pathway.xml =================================================================== --- trunk/test/org/sbfc/test/biopax2sbml/outputFiles/AKT_Signaling_Pathway.xml 2022-09-09 22:16:38 UTC (rev 754) +++ trunk/test/org/sbfc/test/biopax2sbml/outputFiles/AKT_Signaling_Pathway.xml 2023-11-06 10:08:01 UTC (rev 755) @@ -4,10 +4,10 @@ <comp:modelDefinition id="http___pid_nci_nih_gov_biopaxpid_108233" name="akt signaling pathway"> <listOfCompartments> <compartment constant="true" id="defaultCompartment" sboTerm="SBO:0000290" /> - <compartment constant="true" id="cytoplasm" metaid="_0e2cb773-03e6-4ef7-968d-f5bcdfc7290e" sboTerm="SBO:0000290"> + <compartment constant="true" id="cytoplasm" metaid="dc378609-48d0-4669-bc00-c25006107dcc" sboTerm="SBO:0000290"> <annotation> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"> - <rdf:Description rdf:about="#_0e2cb773-03e6-4ef7-968d-f5bcdfc7290e"> + <rdf:Description rdf:about="#dc378609-48d0-4669-bc00-c25006107dcc"> <bqbiol:is> <rdf:Bag> <rdf:li rdf:resource="http://identifiers.org/go/GO:0005737" /> @@ -17,10 +17,10 @@ </rdf:RDF> </annotation> </compartment> - <compartment constant="true" id="extracellular_region" metaid="_1ce13bae-974f-4c2e-9929-4b80873ef262" sboTerm="SBO:0000290"> + <compartment constant="true" id="extracellular_region" metaid="_6133e4b6-194b-4ca5-a595-a10a3c8d51ac" sboTerm="SBO:0000290"> <annotation> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"> - <rdf:Description rdf:about="#_1ce13bae-974f-4c2e-9929-4b80873ef262"> + <rdf:Description rdf:about="#_6133e4b6-194b-4ca5-a595-a10a3c8d51ac"> <bqbiol:is> <rdf:Bag> <rdf:li rdf:resource="http://identifiers.org/go/GO:0005576" /> @@ -30,10 +30,10 @@ </rdf:RDF> </annotation> </compartment> - <compartment constant="true" id="nucleus" metaid="_27f6603c-70cb-4432-8a96-5d2b8b93a9a1" sboTerm="SBO:0000290"> + <compartment constant="true" id="nucleus" metaid="e15e2e2e-5d05-4d7d-bf7c-c6fb9051d834" sboTerm="SBO:0000290"> <annotation> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/"> - <rdf:Description rdf:about="#_27f6603c-70cb-4432-8a96-5d2b8b93a9a1"> + <rdf:Description rdf:about="#e15e2e2e-5d05-4d7d-bf7c-c6fb9051d834"> <bqbiol:is> <rdf:Bag> <rdf:li rdf:resource="http://identifiers.org/go/GO:0005634" /> @@ -45,61 +45,250 @@ </compartment> </listOfCompartments> <listOfSpecies> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_981" initialAmount="1" name="HSPCA" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1359" initialAmount="1" name="AKT" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108289" initialAmount="1" - name="HSP90/AKT" sboTerm="SBO:0000253" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_105130" initialAmount="1" name="PPP2CA" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1033" initialAmount="1" name="AKT" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_54617" initialAmount="1" name="GH/GH R" - sboTerm="SBO:0000253" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1585" initialAmount="1" name="PI3K" - sboTerm="SBO:0000253" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1594" initialAmount="1" name="PI3K" - sboTerm="SBO:0000253" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1550" initialAmount="1" name="PDPK1" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_28772" initialAmount="1" name="CASP9" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108240" initialAmount="1" name="CASP9" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_31559" initialAmount="1" name="BAD" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108278" initialAmount="1" name="BAD" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_6986" initialAmount="1" name="YWHAH" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="cytoplasm" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108256" initialAmount="1" - name="Forkhead Transcription Factors" sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108263" initialAmount="1" - name="14-3-3/Forkhead Transcription Factors" sboTerm="SBO:0000253" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_48168" initialAmount="1" name="GHR" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="extracellular_region" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_48171" initialAmount="1" name="GH" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1352" initialAmount="1" name="IKK" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_29575" initialAmount="1" name="IKK" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="cytoplasm" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108248" initialAmount="1" - name="Forkhead Transcription Factors" sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="nucleus" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108273" initialAmount="1" - name="Forkhead Transcription Factors" sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1616" initialAmount="1" name="PIP2" - sboTerm="SBO:0000247" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1582" initialAmount="1" name="PIP3" - sboTerm="SBO:0000247" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_16844" initialAmount="1" name="FAS L" - sboTerm="SBO:0000252" /> - <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1578" initialAmount="1" name="PDPK1" - sboTerm="SBO:0000252" /> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_981" name="HSPCA" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_981"> + <comment>http://pid.nci.nih.gov/biopaxpid_981http://pid.nci.nih.gov/biopaxpid_108289@Layout@http://pid.nci.nih.gov/biopaxpid_108233@65@291http://pid.nci.nih.gov/biopaxpid_981@Layout@http://pid.nci.nih.gov/biopaxpid_108233@139@268dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1359" name="AKT" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1359"> + <comment>http://pid.nci.nih.gov/biopaxpid_1359http://pid.nci.nih.gov/biopaxpid_108289@Layout@http://pid.nci.nih.gov/biopaxpid_108233@20@285http://pid.nci.nih.gov/biopaxpid_1359@Layout@http://pid.nci.nih.gov/biopaxpid_108233@419@378dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108289" name="HSP90/AKT" sboTerm="SBO:0000253"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_108289"> + <comment>dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_105130" name="PPP2CA" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_105130"> + <comment>http://pid.nci.nih.gov/biopaxpid_105130@Layout@http://pid.nci.nih.gov/biopaxpid_108233@354@330dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1033" name="AKT" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1033"> + <comment>http://pid.nci.nih.gov/biopaxpid_1033@Layout@http://pid.nci.nih.gov/biopaxpid_108233@175@411dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_54617" name="GH/GH R" sboTerm="SBO:0000253"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_54617"> + <comment>dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1585" name="PI3K" sboTerm="SBO:0000253"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1585"> + <comment>dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1594" name="PI3K" sboTerm="SBO:0000253"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1594"> + <comment>dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1550" name="PDPK1" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1550"> + <comment>http://pid.nci.nih.gov/biopaxpid_1550@Layout@http://pid.nci.nih.gov/biopaxpid_108233@247@288dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_28772" name="CASP9" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_28772"> + <comment>http://pid.nci.nih.gov/biopaxpid_28772@Layout@http://pid.nci.nih.gov/biopaxpid_108233@119@387dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108240" name="CASP9" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_108240"> + <comment>http://pid.nci.nih.gov/biopaxpid_108240@Layout@http://pid.nci.nih.gov/biopaxpid_108233@137@340dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_31559" name="BAD" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_31559"> + <comment>http://pid.nci.nih.gov/biopaxpid_31559@Layout@http://pid.nci.nih.gov/biopaxpid_108233@310@526dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108278" name="BAD" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_108278"> + <comment>http://pid.nci.nih.gov/biopaxpid_108278@Layout@http://pid.nci.nih.gov/biopaxpid_108233@438@504dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_6986" name="YWHAH" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_6986"> + <comment>http://pid.nci.nih.gov/biopaxpid_6986@Layout@http://pid.nci.nih.gov/biopaxpid_108233@641@117http://pid.nci.nih.gov/biopaxpid_6986http://pid.nci.nih.gov/biopaxpid_108263@Layout@http://pid.nci.nih.gov/biopaxpid_108233@739@104dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="cytoplasm" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108256" name="Forkhead Transcription Factors" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_108256"> + <comment>dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886http://pid.nci.nih.gov/biopaxpid_108256@Layout@http://pid.nci.nih.gov/biopaxpid_108233@670@314</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108263" name="14-3-3/Forkhead Transcription Factors" sboTerm="SBO:0000253"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_108263"> + <comment>dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_48168" name="GHR" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_48168"> + <comment>http://pid.nci.nih.gov/biopaxpid_48168@Layout@http://pid.nci.nih.gov/biopaxpid_108233@582@150http://pid.nci.nih.gov/biopaxpid_48168http://pid.nci.nih.gov/biopaxpid_54617@Layout@http://pid.nci.nih.gov/biopaxpid_108233@379@197dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="extracellular_region" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_48171" name="GH" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_48171"> + <comment>http://pid.nci.nih.gov/biopaxpid_48171http://pid.nci.nih.gov/biopaxpid_54617@Layout@http://pid.nci.nih.gov/biopaxpid_108233@334@197http://pid.nci.nih.gov/biopaxpid_48171@Layout@http://pid.nci.nih.gov/biopaxpid_108233@507@266dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1352" name="IKK" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1352"> + <comment>http://pid.nci.nih.gov/biopaxpid_1352@Layout@http://pid.nci.nih.gov/biopaxpid_108233@192@497dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_29575" name="IKK" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_29575"> + <comment>http://pid.nci.nih.gov/biopaxpid_29575@Layout@http://pid.nci.nih.gov/biopaxpid_108233@133@447dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="cytoplasm" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108248" name="Forkhead Transcription Factors" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_108248"> + <comment>dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886http://pid.nci.nih.gov/biopaxpid_108248@Layout@http://pid.nci.nih.gov/biopaxpid_108233@752@368</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="nucleus" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_108273" name="Forkhead Transcription Factors" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_108273"> + <comment>http://pid.nci.nih.gov/biopaxpid_108273@Layout@http://pid.nci.nih.gov/biopaxpid_108233@937@339dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1616" name="PIP2" sboTerm="SBO:0000247"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1616"> + <comment>http://pid.nci.nih.gov/biopaxpid_1616@Layout@http://pid.nci.nih.gov/biopaxpid_108233@28@148dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1582" name="PIP3" sboTerm="SBO:0000247"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1582"> + <comment>http://pid.nci.nih.gov/biopaxpid_1582@Layout@http://pid.nci.nih.gov/biopaxpid_108233@172@170dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_16844" name="FAS L" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_16844"> + <comment>http://pid.nci.nih.gov/biopaxpid_16844@Layout@http://pid.nci.nih.gov/biopaxpid_108233@1112@196dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> + <species boundaryCondition="false" compartment="defaultCompartment" constant="false" hasOnlySubstanceUnits="true" id="http___pid_nci_nih_gov_biopaxpid_1578" name="PDPK1" sboTerm="SBO:0000252"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <PhysicalEntity uri="http://pid.nci.nih.gov/biopaxpid_1578"> + <comment>http://pid.nci.nih.gov/biopaxpid_1578@Layout@http://pid.nci.nih.gov/biopaxpid_108233@102@218dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886</comment> + </PhysicalEntity> + </biopax2sbml> + </annotation> + </species> </listOfSpecies> <listOfReactions> <reaction fast="true" id="http___pid_nci_nih_gov_biopaxpid_108288" name="http://pid.nci.nih.gov/biopaxpid_108288" reversible="false" sboTerm="SBO:0000177"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108288"> + <comment>http://pid.nci.nih.gov/biopaxpid_108288true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@211@329</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108292" species="http___pid_nci_nih_gov_biopaxpid_981" stoichiometry="1" /> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108293" species="http___pid_nci_nih_gov_biopaxpid_1359" stoichiometry="1" /> @@ -109,6 +298,13 @@ </listOfProducts> </reaction> <reaction fast="false" id="http___pid_nci_nih_gov_biopaxpid_108267" name="http://pid.nci.nih.gov/biopaxpid_108267" reversible="false" sboTerm="SBO:0000176"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108267"> + <comment>http://pid.nci.nih.gov/biopaxpid_108267true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@293@371</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108268" species="http___pid_nci_nih_gov_biopaxpid_1359" stoichiometry="1" /> </listOfReactants> @@ -120,6 +316,13 @@ </listOfModifiers> </reaction> <reaction fast="false" id="http___pid_nci_nih_gov_biopaxpid_108283" name="http://pid.nci.nih.gov/biopaxpid_108283" reversible="false" sboTerm="SBO:0000176"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108283"> + <comment>http://pid.nci.nih.gov/biopaxpid_108283true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@319@122</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108284" species="http___pid_nci_nih_gov_biopaxpid_1585" stoichiometry="1" /> </listOfReactants> @@ -131,6 +334,13 @@ </listOfModifiers> </reaction> <reaction fast="false" id="http___pid_nci_nih_gov_biopaxpid_1546" name="http://pid.nci.nih.gov/biopaxpid_1546" reversible="false" sboTerm="SBO:0000176"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_1546"> + <comment>http://pid.nci.nih.gov/biopaxpid_1546true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@279@417</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_1547" species="http___pid_nci_nih_gov_biopaxpid_1033" stoichiometry="1" /> </listOfReactants> @@ -142,6 +352,13 @@ </listOfModifiers> </reaction> <reaction fast="false" id="http___pid_nci_nih_gov_biopaxpid_108239" name="http://pid.nci.nih.gov/biopaxpid_108239" reversible="false" sboTerm="SBO:0000176"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108239"> + <comment>http://pid.nci.nih.gov/biopaxpid_108239true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@213@377</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108242" species="http___pid_nci_nih_gov_biopaxpid_28772" stoichiometry="1" /> </listOfReactants> @@ -153,6 +370,13 @@ </listOfModifiers> </reaction> <reaction fast="false" id="http___pid_nci_nih_gov_biopaxpid_108277" name="http://pid.nci.nih.gov/biopaxpid_108277" reversible="false" sboTerm="SBO:0000176"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108277"> + <comment>http://pid.nci.nih.gov/biopaxpid_108277true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@364@465</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108280" species="http___pid_nci_nih_gov_biopaxpid_31559" stoichiometry="1" /> </listOfReactants> @@ -164,6 +388,13 @@ </listOfModifiers> </reaction> <reaction fast="true" id="http___pid_nci_nih_gov_biopaxpid_108299" name="http://pid.nci.nih.gov/biopaxpid_108299" reversible="false" sboTerm="SBO:0000177"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108299"> + <comment>http://pid.nci.nih.gov/biopaxpid_108299true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@695@198</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108300" species="http___pid_nci_nih_gov_biopaxpid_6986" stoichiometry="1" /> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108301" species="http___pid_nci_nih_gov_biopaxpid_108256" stoichiometry="1" /> @@ -173,6 +404,13 @@ </listOfProducts> </reaction> <reaction fast="true" id="http___pid_nci_nih_gov_biopaxpid_108235" name="http://pid.nci.nih.gov/biopaxpid_108235" reversible="false" sboTerm="SBO:0000177"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108235"> + <comment>http://pid.nci.nih.gov/biopaxpid_108235true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@490@204</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108237" species="http___pid_nci_nih_gov_biopaxpid_48168" stoichiometry="1" /> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108236" species="http___pid_nci_nih_gov_biopaxpid_48171" stoichiometry="1" /> @@ -182,6 +420,13 @@ </listOfProducts> </reaction> <reaction fast="false" id="http___pid_nci_nih_gov_biopaxpid_108295" name="http://pid.nci.nih.gov/biopaxpid_108295" reversible="false" sboTerm="SBO:0000176"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108295"> + <comment>http://pid.nci.nih.gov/biopaxpid_108295true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@272@464</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108296" species="http___pid_nci_nih_gov_biopaxpid_1352" stoichiometry="1" /> </listOfReactants> @@ -193,6 +438,13 @@ </listOfModifiers> </reaction> <reaction fast="true" id="http___pid_nci_nih_gov_biopaxpid_108274" name="http://pid.nci.nih.gov/biopaxpid_108274" reversible="false" sboTerm="SBO:0000185"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_108274"> + <comment>http://pid.nci.nih.gov/biopaxpid_108274true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@917@409</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_108275" species="http___pid_nci_nih_gov_biopaxpid_108248" stoichiometry="1" /> </listOfReactants> @@ -201,6 +453,13 @@ </listOfProducts> </reaction> <reaction fast="false" id="http___pid_nci_nih_gov_biopaxpid_1615" name="http://pid.nci.nih.gov/biopaxpid_1615" reversible="false" sboTerm="SBO:0000176"> + <annotation> + <biopax2sbml xmlns="http://sbfc.sf.net/biopax2sbml"> + <Interaction uri="http://pid.nci.nih.gov/biopaxpid_1615"> + <comment>http://pid.nci.nih.gov/biopaxpid_1615true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@106@156</comment> + </Interaction> + </biopax2sbml> + </annotation> <listOfReactants> <speciesReference constant="true" name="http://pid.nci.nih.gov/biopaxpid_1618" species="http___pid_nci_nih_gov_biopaxpid_1616" stoichiometry="1" /> </listOfReactants> @@ -212,6 +471,13 @@ </listOfModifiers> </reaction> <reaction fast="false" id="http___pid_nci_nih_gov_biopaxpid_108271" name="http://pid.nci.nih.gov/biopaxpid_108271" reversible="false" s... [truncated message content] |
From: <nv...@us...> - 2022-09-09 22:16:41
|
Revision: 754 http://sourceforge.net/p/sbfc/code/754 Author: nvntung Date: 2022-09-09 22:16:38 +0000 (Fri, 09 Sep 2022) Log Message: ----------- Updated the newly changed package name Modified Paths: -------------- sbfcOnline/src/uk/ac/ebi/compneur/servlets/ConvertorsServlet.java sbfcOnline/src/uk/ac/ebi/compneur/servlets/GetFileServlet.java sbfcOnline/src/uk/ac/ebi/compneur/servlets/GetZipServlet.java sbfcOnline/src/uk/ac/ebi/compneur/servlets/JobInfoServlet.java sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java sbfcOnline/src/uk/ac/ebi/compneur/servlets/ResultServlet.java sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java sbfcOnline/src/uk/ac/ebi/compneur/threads/DBupdate.java Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/ConvertorsServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/ConvertorsServlet.java 2022-09-09 22:13:17 UTC (rev 753) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/ConvertorsServlet.java 2022-09-09 22:16:38 UTC (rev 754) @@ -21,7 +21,7 @@ import org.apache.commons.io.IOUtils; import uk.ac.ebi.compneur.config.ConfigParam; -import uk.ac.ebi.compneur.dbAccess.SessionAccess; +import uk.ac.ebi.compneur.database.SessionAccess; import uk.ac.ebi.compneur.mailer.Mailer; import uk.ac.ebi.compneur.threads.DBupdate; Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/GetFileServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/GetFileServlet.java 2022-09-09 22:13:17 UTC (rev 753) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/GetFileServlet.java 2022-09-09 22:16:38 UTC (rev 754) @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.log4j.Logger; import uk.ac.ebi.compneur.config.ConfigParam; /** @@ -22,7 +23,8 @@ * */ private static final long serialVersionUID = 1L; - + + private static final Logger LOGGER = Logger.getLogger(GetFileServlet.class); /** * */ @@ -37,7 +39,7 @@ } /** - * Sends a file to the ServletResponse output stream. Typically + * Sends a file to the ServletResponse output stream. Typically, * you want the browser to receive a different name than the * name the file has been saved in your local database, since * your local names need to be unique. @@ -46,7 +48,6 @@ * @param response The response */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String filename = request.getParameter("fileName"); String original_filename = request.getParameter("originalFileName"); File f = new File(filesPath+filename); Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/GetZipServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/GetZipServlet.java 2022-09-09 22:13:17 UTC (rev 753) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/GetZipServlet.java 2022-09-09 22:16:38 UTC (rev 754) @@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletResponse; import uk.ac.ebi.compneur.config.ConfigParam; -import uk.ac.ebi.compneur.dbAccess.JobAccess; +import uk.ac.ebi.compneur.database.JobAccess; import uk.ac.ebi.compneur.ressource.Job; /** Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/JobInfoServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/JobInfoServlet.java 2022-09-09 22:13:17 UTC (rev 753) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/JobInfoServlet.java 2022-09-09 22:16:38 UTC (rev 754) @@ -14,7 +14,7 @@ import javax.servlet.http.HttpServletResponse; import uk.ac.ebi.compneur.config.ConfigParam; -import uk.ac.ebi.compneur.dbAccess.JobAccess; +import uk.ac.ebi.compneur.database.JobAccess; /** * Servlet implementation class JobInfoServlet Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java 2022-09-09 22:13:17 UTC (rev 753) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java 2022-09-09 22:16:38 UTC (rev 754) @@ -4,7 +4,7 @@ import com.google.gson.Gson; import org.apache.commons.io.IOUtils; import uk.ac.ebi.compneur.config.ConfigParam; -import uk.ac.ebi.compneur.dbAccess.JobAccess; +import uk.ac.ebi.compneur.database.JobAccess; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/ResultServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/ResultServlet.java 2022-09-09 22:13:17 UTC (rev 753) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/ResultServlet.java 2022-09-09 22:16:38 UTC (rev 754) @@ -11,8 +11,8 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import uk.ac.ebi.compneur.dbAccess.JobAccess; -import uk.ac.ebi.compneur.dbAccess.SessionAccess; +import uk.ac.ebi.compneur.database.JobAccess; +import uk.ac.ebi.compneur.database.SessionAccess; import uk.ac.ebi.compneur.mailer.Mailer; import uk.ac.ebi.compneur.ressource.ListJob; @@ -104,9 +104,9 @@ httpSession.setAttribute("emailAddress", emailAddress); //Generating results URL - urlResults = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/results?sessionId=" + sessionId; + urlResults = "https://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/results?sessionId=" + sessionId; - //sending email + // sending email Mailer.sendMail(emailAddress, urlResults); } Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java 2022-09-09 22:13:17 UTC (rev 753) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/WebServiceServlet.java 2022-09-09 22:16:38 UTC (rev 754) @@ -20,8 +20,8 @@ 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; +import uk.ac.ebi.compneur.database.JobAccess; +import uk.ac.ebi.compneur.database.SessionAccess; // TODO - we could add several servlet so that it look a bit more like a normal REST WS // TODO - we could add other methods Modified: sbfcOnline/src/uk/ac/ebi/compneur/threads/DBupdate.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/threads/DBupdate.java 2022-09-09 22:13:17 UTC (rev 753) +++ sbfcOnline/src/uk/ac/ebi/compneur/threads/DBupdate.java 2022-09-09 22:16:38 UTC (rev 754) @@ -19,7 +19,7 @@ import javax.sql.DataSource; import uk.ac.ebi.compneur.config.ConfigParam; -import uk.ac.ebi.compneur.dbAccess.JobAccess; +import uk.ac.ebi.compneur.database.JobAccess; /** * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2022-09-09 22:13:19
|
Revision: 753 http://sourceforge.net/p/sbfc/code/753 Author: nvntung Date: 2022-09-09 22:13:17 +0000 (Fri, 09 Sep 2022) Log Message: ----------- Make sure the package name lower case Modified Paths: -------------- sbfcOnline/src/uk/ac/ebi/compneur/database/JobAccess.java sbfcOnline/src/uk/ac/ebi/compneur/database/SessionAccess.java Added Paths: ----------- sbfcOnline/src/uk/ac/ebi/compneur/database/ Removed Paths: ------------- sbfcOnline/src/uk/ac/ebi/compneur/dbAccess/ Modified: sbfcOnline/src/uk/ac/ebi/compneur/database/JobAccess.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/dbAccess/JobAccess.java 2022-09-09 21:12:01 UTC (rev 752) +++ sbfcOnline/src/uk/ac/ebi/compneur/database/JobAccess.java 2022-09-09 22:13:17 UTC (rev 753) @@ -1,5 +1,10 @@ -package uk.ac.ebi.compneur.dbAccess; +package uk.ac.ebi.compneur.database; +import org.apache.log4j.Logger; +import uk.ac.ebi.compneur.config.ConfigParam; +import uk.ac.ebi.compneur.ressource.Job; +import uk.ac.ebi.compneur.threads.DBupdate; + import java.io.File; import java.sql.Connection; import java.sql.PreparedStatement; @@ -7,12 +12,6 @@ import java.sql.Statement; import java.util.ArrayList; -import org.apache.log4j.Logger; - -import uk.ac.ebi.compneur.config.ConfigParam; -import uk.ac.ebi.compneur.ressource.Job; -import uk.ac.ebi.compneur.threads.DBupdate; - /** * * @author rodrigue @@ -21,7 +20,7 @@ */ public class JobAccess { - // TODO : use prepareStatment for all queries ?? + // TODO : use prepareStatement for all queries ?? /** * The query to insert a job into the database. Modified: sbfcOnline/src/uk/ac/ebi/compneur/database/SessionAccess.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/dbAccess/SessionAccess.java 2022-09-09 21:12:01 UTC (rev 752) +++ sbfcOnline/src/uk/ac/ebi/compneur/database/SessionAccess.java 2022-09-09 22:13:17 UTC (rev 753) @@ -1,4 +1,4 @@ -package uk.ac.ebi.compneur.dbAccess; +package uk.ac.ebi.compneur.database; import java.math.BigInteger; import java.security.MessageDigest; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2022-09-09 21:12:03
|
Revision: 752 http://sourceforge.net/p/sbfc/code/752 Author: nvntung Date: 2022-09-09 21:12:01 +0000 (Fri, 09 Sep 2022) Log Message: ----------- Corrected the way to get the sys env var Modified Paths: -------------- sbfcOnline/src/uk/ac/ebi/compneur/threads/DBupdate.java Modified: sbfcOnline/src/uk/ac/ebi/compneur/threads/DBupdate.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/threads/DBupdate.java 2022-09-09 20:40:11 UTC (rev 751) +++ sbfcOnline/src/uk/ac/ebi/compneur/threads/DBupdate.java 2022-09-09 21:12:01 UTC (rev 752) @@ -273,13 +273,13 @@ public void contextInitialized(ServletContextEvent arg0) { System.out.println("DBUpdate - contextInitialized. Initializing DB connection."); - datacentre = System.getProperty("datacentre"); + datacentre = ConfigParam.getFromEnvironment("datacentre"); if (datacentre == null) { System.out.println("Environment variable 'datacentre' not defined, using 'ebi'."); datacentre = "ebi"; } - System.out.println("Data center = " + datacentre); + System.out.println("Data centre = " + datacentre); //Connexion to mysql connection = getNewConnection(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2022-09-09 20:40:13
|
Revision: 751 http://sourceforge.net/p/sbfc/code/751 Author: nvntung Date: 2022-09-09 20:40:11 +0000 (Fri, 09 Sep 2022) Log Message: ----------- Changed the SMTP mail server host Modified Paths: -------------- sbfcOnline/src/uk/ac/ebi/compneur/config/ConfigParam.java Modified: sbfcOnline/src/uk/ac/ebi/compneur/config/ConfigParam.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/config/ConfigParam.java 2022-09-09 20:20:56 UTC (rev 750) +++ sbfcOnline/src/uk/ac/ebi/compneur/config/ConfigParam.java 2022-09-09 20:40:11 UTC (rev 751) @@ -66,16 +66,16 @@ public final static String DB_LOGGER_NAME = "DB"; - public final static String MAIL_SMTP_HOST = "hh-smtp.ebi.ac.uk"; + public final static String MAIL_SMTP_HOST = "outgoing.ebi.ac.uk"; public final static String MAIL_SMTP_PORT = "25"; // 25 is the default - public static final String MAIL_FROM = "bio...@li..."; + public static final String MAIL_FROM = "bio...@eb..."; /** - * Recipient of the exception messages. + * Recipients of the exception messages. * Comma separated list of email. */ - public static final String MAIL_TO = "rod...@eb..., nik...@gm..."; // bio...@li... + public static final String MAIL_TO = "bio...@eb..., rod...@eb..., nik...@gm..., nv...@gm..."; /** * Gets a property value either from the JNDI environment or This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2022-09-09 20:20:58
|
Revision: 750 http://sourceforge.net/p/sbfc/code/750 Author: nvntung Date: 2022-09-09 20:20:56 +0000 (Fri, 09 Sep 2022) Log Message: ----------- Upgraded the look and feel by using EBI Visual Framework V.1.3 Modified Paths: -------------- sbfcOnline/WebContent/jsp/about.jsp sbfcOnline/WebContent/jsp/end_body.jsp sbfcOnline/WebContent/jsp/end_head.jsp sbfcOnline/WebContent/jsp/end_menu.jsp sbfcOnline/WebContent/jsp/main.jsp sbfcOnline/WebContent/jsp/results.jsp sbfcOnline/WebContent/jsp/start_body_fluid.jsp sbfcOnline/WebContent/jsp/start_head.jsp Modified: sbfcOnline/WebContent/jsp/about.jsp =================================================================== --- sbfcOnline/WebContent/jsp/about.jsp 2022-09-09 15:32:37 UTC (rev 749) +++ sbfcOnline/WebContent/jsp/about.jsp 2022-09-09 20:20:56 UTC (rev 750) @@ -1,69 +1,35 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> +<!doctype html> +<html class="no-js" lang="en"> +<head> -<!-- Including EBI template --> -<jsp:include page= 'start_head.jsp' /> -<!-- Page title --> - <title>System Biology Format Converter (SBFC) online - About Page</title> +<jsp:include page='start_head.jsp' /> +<title>About | System Biology Format Converter (SBFC) online</title> <jsp:include page= 'end_head.jsp' /> -<!-- may be not needed here --> <link href="css/css.css" rel="StyleSheet"> +</head> -<!-- close the 'head' html element and start the 'body' and 'header' html elements --> +<body class="level2 ebi-black-bar-loaded google-analytics-loaded" + style="" data-new-gr-c-s-check-loaded="14.1078.0" data-gr-ext-installed=""> + <jsp:include page= 'start_body_fluid.jsp' /> +<div id="content" role="main" class="row" style="box-shadow: -5px 5px 5px 5px grey;"> + <div class="columns large-12 medium-12 small-12"> -<!-- ########## EBI Header ######### --> -<div id="local-masthead" class="masthead grid_24 nomenu" style="background: rgb(255, 255, 255) none repeat scroll 0% 0%;"> - - <!-- local-title --> - <!-- NB: for additional title style patterns, see http://frontier.ebi.ac.uk/web/style/patterns - - We could get rid of the big 'local-title' by commenting the following 3 lines - --> - - <div id="local-title"> - <h1 style="margin: 10px 0;"><a href="<%=request.getContextPath()%>" title="Back to SBFC Online homepage" style="color: rgb(32, 122, 122);"> - <img src="<%=request.getContextPath()%>/img/sbfc-logo-75x73.png" alt="SBFC logo" height="75" style="padding-right: 12px;"/> - SBFC Online About Page</a> - </h1> - </div> - <!-- /local-title --> - - <!-- local-nav --> - - <nav> - <ul class="grid_24" id="local-nav" style="background: #71B360 none repeat scroll 0% 0%;"> - <li class="first"><a href="<%=request.getContextPath()%>">Home</a></li> - <li ><a href="http://sbfc.sourceforge.net/" target="_blank">Documentation</a></li> <!-- link to one of the sf wiki page ?? --> - <li class="last active"><a href="about">About SBFC</a></li> - <li class="functional"><a href="https://sourceforge.net/p/sbfc/bugs/" target="_blank" class="icon icon-generic" data-icon="\">Feedback</a></li> - </ul> - </nav> - - <!-- /local-nav --> - -</div> -</header> -<!-- ########## EBI Header END ######### --> - <!-- ============================================================================ --> - -<div id="content" role="main" class="grid_18 clearfix prefix_3 suffix_3" style="box-shadow: -5px 5px 5px 5px grey;"> - <!-- Full width --> <section> <h2>About SBFC</h2> <p>The Systems Biology Format Converter (SBFC) aims to provide a generic framework to convert a Systems Biology model format into another. The software is written in Java and can be used as a standalone executable or as web service. - SBFC is a collaborative project and we hope that developers will provide support for more formats by creating + SBFC is a collaborative project, and we hope that developers will provide support for more formats by creating new converter modules.</p> <br> <p>In order to use this SBFC web application, the user should follow the following steps: <ol> - <li>Select the formats for the input and output model s/he wish to convert.</li> + <li>Select the formats for the input and output model s/he wishes to convert.</li> <li>If desired, it is possible to specify an email address to obtain the web-link to the completed results. </li> <li>Once the input and output model formats have been specified, the user should submit the model(s) to convert. To do this, there are three modes: <ul> @@ -73,7 +39,7 @@ </ul> If successfully uploaded, these model files should appear on the table right above the button "Convert!". </li> - <li>Finally, the user should press the button "Convert!", and the results should be available within 72 hours. </li> + <li>Finally, the user should press the button "Convert", and the results should be available within 72 hours. </li> </ol> </p> @@ -85,6 +51,9 @@ </section> </div> +</div> +<jsp:include page='end_body.jsp' /> -<jsp:include page= 'end_body.jsp' /> \ No newline at end of file +</body> +</html> \ No newline at end of file Modified: sbfcOnline/WebContent/jsp/end_body.jsp =================================================================== --- sbfcOnline/WebContent/jsp/end_body.jsp 2022-09-09 15:32:37 UTC (rev 749) +++ sbfcOnline/WebContent/jsp/end_body.jsp 2022-09-09 20:20:56 UTC (rev 750) @@ -1,4 +1,5 @@ - <footer> +<div class="row"> </div> +<footer> <!-- Optional local footer (insert citation / project-specific copyright / etc here --> <!-- <div id="local-footer" class="grid_24 clearfix"> @@ -6,60 +7,39 @@ </div> --> <!-- End optional local footer --> - - <div id="global-footer" class="grid_24"> - - <nav id="global-nav-expanded"> - - <div class="grid_4 alpha"> - <h3 class="embl-ebi"><a href="//www.ebi.ac.uk/" title="EMBL-EBI">EMBL-EBI</a></h3> - </div> - - <div class="grid_4"> - <h3 class="services"><a href="//www.ebi.ac.uk/services">Services</a></h3> - </div> - - <div class="grid_4"> - <h3 class="research"><a href="//www.ebi.ac.uk/research">Research</a></h3> - </div> - - <div class="grid_4"> - <h3 class="training"><a href="//www.ebi.ac.uk/training">Training</a></h3> - </div> - - <div class="grid_4"> - <h3 class="industry"><a href="//www.ebi.ac.uk/industry">Industry</a></h3> - </div> - - <div class="grid_4 omega"> - <h3 class="about"><a href="//www.ebi.ac.uk/about">About us</a></h3> - </div> + <div id="global-footer" class="global-footer"> + <nav id="global-nav-expanded" class="global-nav-expanded row"> - </nav> - - <section id="ebi-footer-meta"> - <h3 style="display:none">EBI footer meta data</h3> - <p class="address">EMBL-EBI, Wellcome Trust Genome Campus, Hinxton, Cambridgeshire, CB10 1SD, UK +44 (0)1223 49 44 44</p> - <p class="legal">Copyright © EMBL-EBI 2013 | EBI is an outstation of the <a href="http://www.embl.org">European Molecular Biology Laboratory</a> | <a href="/about/privacy">Privacy</a> | <a href="/about/cookies">Cookies</a> | <a href="/about/terms-of-use">Terms of use</a></p> - </section> + </nav> + <section id="ebi-footer-meta" class="ebi-footer-meta row"> - </div> + </section> + </div> +</footer> +</div> <!--! end of #wrapper --> - - </footer> - </div> <!--! end of #wrapper --> - <!-- JavaScript at the bottom for fast page loading --> + <!-- JavaScript at the bottom for fast page loading --> + <script src="https://ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.3/js/script.js"></script> +<%-- <script src="https://dev.ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.4/js/script.js"></script>--%> + <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline --> + + <!-- The Foundation theme JavaScript --> + <script src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.3/libraries/foundation-6/js/foundation.js"></script> + <script src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.3/js/foundationExtendEBI.js"></script> + <script type="text/JavaScript">$(document).foundation();</script> + <script type="text/JavaScript">$(document).foundationExtendEBI();</script> + <!-- Your custom JavaScript file scan go here... change names accordingly --> <!-- <script defer="defer" src="//www.ebi.ac.uk/web_guidelines/js/plugins.js"></script> <script defer="defer" src="//www.ebi.ac.uk/web_guidelines/js/script.js"></script> --> - <script defer="defer" src="//www.ebi.ac.uk/web_guidelines/js/cookiebanner.js"></script> - <script defer="defer" src="//www.ebi.ac.uk/web_guidelines/js/foot.js"></script> +<%-- <script defer="defer" src="//www.ebi.ac.uk/web_guidelines/js/cookiebanner.js"></script> --%> +<%-- <script defer="defer" src="//www.ebi.ac.uk/web_guidelines/js/foot.js"></script>--%> <!-- end scripts--> <!-- Google Analytics details... --> Modified: sbfcOnline/WebContent/jsp/end_head.jsp =================================================================== --- sbfcOnline/WebContent/jsp/end_head.jsp 2022-09-09 15:32:37 UTC (rev 749) +++ sbfcOnline/WebContent/jsp/end_head.jsp 2022-09-09 20:20:56 UTC (rev 750) @@ -11,14 +11,39 @@ <!-- CSS: implied media=all --> <!-- CSS concatenated and minified via ant build script--> - <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/boilerplate-style.css"> - <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/ebi-global.css" type="text/css" media="screen"> - <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/ebi-visual.css" type="text/css" media="screen"> - <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/984-24-col-fluid.css" type="text/css" media="screen"> + + <!-- If you have custom icon, replace these as appropriate. + You can generate them at realfavicongenerator.net --> + <link rel="icon" type="image/x-icon" href="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/favicon.ico"> + <link rel="icon" type="image/png" href="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/favicon-32x32.png"> + <link rel="icon" type="image/png" sizes="192×192" href="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/android-chrome-192x192.png"> <!-- Android (192px) --> + <link rel="apple-touch-icon-precomposed" sizes="114x114" href="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/apple-icon-114x114.png"> <!-- For iPhone 4 Retina display (114px) --> + <link rel="apple-touch-icon-precomposed" sizes="72x72" href="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/apple-icon-72x72.png"> <!-- For iPad (72px) --> + <link rel="apple-touch-icon-precomposed" sizes="144x144" href="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/apple-icon-144x144.png"> <!-- For iPad retinat (144px) --> + <link rel="apple-touch-icon-precomposed" href="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/apple-icon-57x57.png"> <!-- For iPhone (57px) --> + <link rel="mask-icon" href="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/safari-pinned-tab.svg" color="#ffffff"> <!-- Safari icon for pinned tab --> + <meta name="msapplication-TileColor" content="#2b5797"> <!-- MS Icons --> + <meta name="msapplication-TileImage" content="//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/mstile-144x144.png"> + + <!-- CSS: implied media=all --> + <!-- CSS concatenated and minified via ant build script--> + <link rel="stylesheet" type="text/css" + href="https://ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.3/css/ebi-global.css" + media="none" onload="if(media!=='all') media='all'"> + <link rel="stylesheet" type="text/css" + href="https://ebi.emblstatic.net/web_guidelines/EBI-Icon-fonts/v1.3/fonts.css" + media="none" onload="if(media!=='all') media='all'"> + + <style>.font-massive{font-size:800%;line-height:1}.warning-triangle.home-color{color:#c6c6c6}</style> + +<%-- <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/boilerplate-style.css">--%> +<%-- <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/ebi-global.css" type="text/css" media="screen">--%> +<%-- <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/ebi-visual.css" type="text/css" media="screen">--%> +<%-- <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/984-24-col-fluid.css" type="text/css" media="screen">--%> <!-- you can replace this with [projectname]-colours.css. See http://frontier.ebi.ac.uk/web/style/colour for details of how to do this --> <!-- also inform ES so we can host your colour palette file --> - <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/embl-petrol-colours.css" type="text/css" media="screen"> +<%-- <link rel="stylesheet" href="//www.ebi.ac.uk/web_guidelines/css/compliance/develop/embl-petrol-colours.css" type="text/css" media="screen">--%> <!-- for production the above can be replaced with --> <!-- @@ -41,7 +66,7 @@ <!-- <script src="//www.ebi.ac.uk/web_guidelines/js/libs/modernizr.minified.2.1.6.js"></script> --> <!-- custom build (lacks most of the "advanced" HTML5 support --> - <script src="//www.ebi.ac.uk/web_guidelines/js/libs/modernizr.custom.49274.js"></script> +<%-- <script src="//www.ebi.ac.uk/web_guidelines/js/libs/modernizr.custom.49274.js"></script>--%> Modified: sbfcOnline/WebContent/jsp/end_menu.jsp =================================================================== --- sbfcOnline/WebContent/jsp/end_menu.jsp 2022-09-09 15:32:37 UTC (rev 749) +++ sbfcOnline/WebContent/jsp/end_menu.jsp 2022-09-09 20:20:56 UTC (rev 750) @@ -1,4 +1,4 @@ -<img src="http://www.ebi.ac.uk/inc/images/spacer.gif" class="spacer" alt="spacer" /></div></td> - <td class="contentsarea" id="contentsarea"> - <!-- InstanceBeginEditable name="contents" --> - <!-- start contents here --> +<img src="https://www.ebi.ac.uk/inc/images/spacer.gif" class="spacer" alt="spacer"/></div></td> +<td class="contentsarea" id="contentsarea"> + <!-- InstanceBeginEditable name="contents" --> + <!-- start contents here --> Modified: sbfcOnline/WebContent/jsp/main.jsp =================================================================== --- sbfcOnline/WebContent/jsp/main.jsp 2022-09-09 15:32:37 UTC (rev 749) +++ sbfcOnline/WebContent/jsp/main.jsp 2022-09-09 20:20:56 UTC (rev 750) @@ -1,17 +1,14 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> -<jsp:include page= 'start_head.jsp' /> -<!-- Page title --> - <title>System Biology Format Converter (SBFC) online</title> -<jsp:include page= 'end_head.jsp' /> - - +<!doctype html> +<html class="no-js" lang="en"> +<head> +<jsp:include page='start_head.jsp' /> +<title>Home | System Biology Format Converter (SBFC) online</title> +<jsp:include page='end_head.jsp' /> <link href="css/css.css" type="text/css" rel="StyleSheet"> -<script>var contextPath = "<%=request.getContextPath()%>";</script> +<script>const contextPath = "<%=request.getContextPath()%>";</script> <script type="text/javascript" src="js/optionsParsing.js"></script> - <script src="js/jquery.ui.widget.js"></script> <script src="js/jquery.iframe-transport.js"></script> <script src="js/jquery.fileupload.js"></script> @@ -19,74 +16,40 @@ <link href="css/dropzone.css" type="text/css" rel="stylesheet" /> <script src="js/myuploadfunction.js"></script> - <script type="text/javascript"> <!-- Command executed at each refresh --> $(document).ready(function() { console.log("ready_function"); // Handler for .ready() called. - var rep ="<option value='not_selected' selected>Select ..."; + const rep = "<option value='not_selected' selected>Select ..."; $('#select_convert').html(rep); // replace, using jquery, the content of the html element with id 'select_convert'. }); </script> +</head> +<!-- close the 'head' html element and start the 'body' and 'header' html elements --> +<body class="level2 ebi-black-bar-loaded google-analytics-loaded" + style="" data-new-gr-c-s-check-loaded="14.1078.0" data-gr-ext-installed=""><!-- add any of your classes or IDs --> -<!-- close the 'head' html element and start the 'body' and 'header' html elements --> <jsp:include page= 'start_body_fluid.jsp' /> - -<!-- ########## EBI Header ######### --> -<div id="local-masthead" class="masthead grid_24 nomenu" style="background: rgb(255, 255, 255) none repeat scroll 0% 0%;"> - - <!-- local-title --> - <!-- NB: for additional title style patterns, see http://frontier.ebi.ac.uk/web/style/patterns --> - - <div id="local-title"> - <h1 style="margin: 10px 0;"><a href="<%=request.getContextPath()%>" title="Back to SBFC Online homepage" style="color: rgb(32, 122, 122);"> - <img src="<%=request.getContextPath()%>/img/sbfc-logo-75x73.png" alt="SBFC logo" height="75" style="padding-right: 12px;"/> - System Biology Format Converter (SBFC) Online</a> - </h1> - </div> - - <!-- /local-title (white background and dark grey letters) --> - - <!-- local-nav --> - - <nav> - <ul class="grid_24" id="local-nav" style="background: #71B360 none repeat scroll 0% 0%;"> - <li class="first active"><a href="<%=request.getContextPath()%>">Home</a></li> - <li ><a href="http://sbfc.sourceforge.net/" target="_blank">Documentation</a></li> <!-- link to one of the sf wiki page ?? --> - <li class="last"><a href="about">About SBFC</a></li> - <li class="functional"><a href="https://sourceforge.net/p/sbfc/bugs/" class="icon icon-generic" data-icon="\" target="_blank">Feedback</a></li> - </ul> - </nav> - - <!-- /local-nav --> - -</div> -</header> -<!-- ########## EBI Header END ######### --> - <!-- ============================================================================ --> - <input type="hidden" id="sessionId" value="<%=request.getAttribute("sessionId") %>"> <input type="hidden" id="hm" value="0"> <input type="hidden" id="hmnow" value="0"> - <div id="content" role="main" class="grid_24 clearfix" style="box-shadow: -5px 5px 5px 5px grey;"> - +<div id="content" role="main" class="row" style="box-shadow: -5px 5px 5px 5px grey;"> + <div class="columns large-12 medium-12 small-12"> <!-- Example layout containers --> <form id="main-form"> <section> - <h2 style="display:none;">System Biology Format Converter (SBFC) online</h2> - <!-- <div class="smallwarning">WARNING : This web site is under development</div><br/> - --> - - <div class="cadre">If you detect any problems or issues, please send a mail to <b>biomodels-net-support at lists.sourceforge.net</b></div><br/> + <h2>Complete the following steps to convert your model with SBFC</h2> + <!-- <div class="smallwarning">WARNING : This web site is under development</div><br/> --> + <p class="cadre">If you detect any problems or issues, please send a mail to <b>biomodels-net-support at lists.sourceforge.net</b></p> </section> @@ -100,7 +63,7 @@ </div> <div class="grid_3"> - <div id="valid_input" style="display:none;text-align:rigth;"><img src="img/valid.png" style="height:30px; width: 30px" alt="valid input"/></div> + <div id="valid_input" style="display:none;text-align: right;"><img src="img/valid.png" style="height:30px; width: 30px" alt="valid input"/></div> </div> <div class="grid_12 omega" id="input_description" style="display:none;text-align:left "></div> </section> @@ -116,7 +79,7 @@ </span></p> </div> <div class="grid_3"> - <div id="valid_convertor" style="display:none;text-align:rigth;"><img src="img/valid.png" style="height:30px; width: 30px" alt="valid input"/></div> + <div id="valid_convertor" style="display:none;text-align: right;"><img src="img/valid.png" style="height:30px; width: 30px" alt="valid input"/></div> </div> <div class="grid_12 omega" id="output_description" style="display:none;text-align:left "></div> </section> @@ -150,69 +113,76 @@ <h4>Choose a method for submitting your model(s):</h4> <table class="blackbordertable" style="margin-left:auto;margin-right:auto;width: 100%;border-spacing:0;"> - <tr><td style="width: 33%;padding:5;" class="blackbordertable" >File upload : <input checked type="radio" name="method" value="file" onClick="upload_method('file')"/></td> - <td style="width: 33%;padding:5;" class="blackbordertable" >Model from URL : <input type="radio" name="method" value="url" onClick="upload_method('url')"/></td> - <td style="width: 33%;padding:5;" class="blackbordertable" >Copy/Paste : <input type="radio" name="method" value="text" onClick="upload_method('text')"/></td></tr> - </table> - <div id='uiElements' style='display:inline;'> + <tr><td style="width: 33%; padding: 5px;" class="blackbordertable" >File upload : <input checked type="radio" name="method" value="file" onClick="upload_method('file')"/></td> + <td style="width: 33%; padding: 5px;" class="blackbordertable" >Model from URL : <input type="radio" name="method" value="url" onClick="upload_method('url')"/></td> + <td style="width: 33%; padding: 5px;" class="blackbordertable" >Copy/Paste : <input type="radio" name="method" value="text" onClick="upload_method('text')"/></td></tr> + </table> + <div id='uiElements' style='display:inline;'> <table style="margin-left:auto;margin-right:auto;width: 100%"> - <tr id="file_upload_tr"> - <td colspan="2"> - <div id='uploaderContainer'> - <h2>Select files to upload and convert</h2><br/> - <input id="fileupload" type="file" name="files[]" data-url="upload" multiple> - - <div id="dropzone" class="fade well">Drop files here</div> - - <div id="progress" class="progress"> - <div class="bar" style="width: 0%;"></div> - </div> - <h5 style="text-align:center">Files</h5> + <tr id="file_upload_tr"> + <td colspan="2"> + <div id='uploaderContainer'> + <h2>Select files to upload and convert</h2><br/> + <input id="fileupload" type="file" name="files[]" data-url="upload" multiple> - <table id="uploaded-files" class="table"> - <tr> - <th>File Name</th> - <th>File Size</th> - <th>File Type</th> - <!-- <th>Download</th> - <th>Uploaded By</th> --> - </tr> - </table> - </div> - </td> - </tr> - <tr id="url_upload_tr" style="display:none"> - <td style="width: 30%;vertical-align:top;"> - <h2>Give the URL of your model</h2> - </td> - <td style="width: 70%"> - <input id="url_upload" type="text" size="60" class="blackbordertable" value="" onFocus="if(this.value == 'Your URL here')this.value=''"/> - </td> - </tr> - <tr id="text_upload_tr" style="display:none"> - <td style="width: 30%;vertical-align:top;" > - <h2>Copy/Paste your model</h2><br/> - </td> - <td style="width: 70%"> - <textarea class="blackbordertable" id="text_upload" cols="60" rows="15" onFocus="if(this.value == 'Your Model here')this.value=''"></textarea> - </td> - </tr> - <tr> - <td colspan="2"> - <div class='uploadButton' style='float:left'><a class='rolloverButton' href='#' onClick='upload(); return false;'></a></div> - </td> - </tr> + <div id="dropzone" class="fade well">Drop files here</div> + + <div id="progress" class="progress"> + <div class="bar" style="width: 0%;"></div> + </div> + <h5 style="text-align:center">Files</h5> + + <table id="uploaded-files" class="table"> + <tr> + <th>File Name</th> + <th>File Size</th> + <th>File Type</th> + <!-- <th>Download</th> + <th>Uploaded By</th> --> + </tr> + </table> + </div> + </td> + </tr> + <tr id="url_upload_tr" style="display:none"> + <td style="width: 30%;vertical-align:top;"> + <h2>Give the URL of your model</h2> + </td> + <td style="width: 70%"> + <input id="url_upload" type="text" size="60" class="blackbordertable" value="" + onFocus="if(this.value == 'Your URL here')this.value=''"/> + </td> + </tr> + <tr id="text_upload_tr" style="display:none"> + <td style="width: 30%;vertical-align:top;"> + <h2>Copy/Paste your model</h2><br/> + </td> + <td style="width: 70%"> + <textarea class="blackbordertable" id="text_upload" cols="60" rows="15" + onFocus="if(this.value == 'Your Model here')this.value=''"></textarea> + </td> + </tr> </table> - </div> + </div> </div> - </section> + </section> + <section> + <div class='uploadButton' style='float:left'><a class="rolloverButton button" href="#" + onClick="upload(); return false;">Convert</a> + </div> + </section> </form> + </div> +</section> </div> <script type="text/javascript" src="js/file_upload.js"></script> <script>document.onload = getLanguages();document.onload = init();</script> -<jsp:include page= 'end_body.jsp' /> \ No newline at end of file +<jsp:include page='end_body.jsp' /> +<%--<jsp:include page='footer.jsp' />--%> +</body> +</html> \ No newline at end of file Modified: sbfcOnline/WebContent/jsp/results.jsp =================================================================== --- sbfcOnline/WebContent/jsp/results.jsp 2022-09-09 15:32:37 UTC (rev 749) +++ sbfcOnline/WebContent/jsp/results.jsp 2022-09-09 20:20:56 UTC (rev 750) @@ -1,3 +1,8 @@ +<!doctype html> +<html class="no-js" lang="en"> +<head> +<jsp:include page='start_head.jsp' /> + <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="java.util.ArrayList, java.util.Iterator, uk.ac.ebi.compneur.ressource.Job"%> @@ -5,9 +10,9 @@ class="uk.ac.ebi.compneur.ressource.ListJob" /> <jsp:useBean id="sessionId" scope="request" type="java.lang.String" /> -<jsp:include page= 'start_head.jsp' /> + <title>SBFC - Conversion Results</title> -<jsp:include page= 'end_head.jsp' /> +<jsp:include page='end_head.jsp' /> <%@page import="uk.ac.ebi.compneur.threads.DBupdate"%> @@ -155,49 +160,19 @@ </script> +</head> +<body class="level2 ebi-black-bar-loaded google-analytics-loaded" + style="" data-new-gr-c-s-check-loaded="14.1078.0" data-gr-ext-installed=""><!-- add any of your classes or IDs --> + <!-- close the 'head' html element and start the 'body' and 'header' html elements --> <jsp:include page= 'start_body_fluid.jsp' /> - - -<!-- ########## EBI Header ######### --> -<div id="local-masthead" class="masthead grid_24 nomenu" style="background: rgb(255, 255, 255) none repeat scroll 0% 0%;"> - -<!-- local-title --> -<!-- NB: for additional title style patterns, see http://frontier.ebi.ac.uk/web/style/patterns --> - -<div id="local-title"> - <h1 style="margin: 10px 0;"><a href="<%=request.getContextPath()%>" title="Back to SBFC Online homepage" style="color: rgb(32, 122, 122);"> - <img src="<%=request.getContextPath()%>/img/sbfc-logo-75x73.png" alt="SBFC logo" height="75" style="padding-right: 12px;"/> - System Biology Format Converter (SBFC) Online</a> - </h1> -</div> - -<!-- /local-title (white background and dark grey letters) --> - -<!-- local-nav --> - -<nav> - <ul class="grid_24" id="local-nav" style="background: #71B360 none repeat scroll 0% 0%;"> - <li class="first active"><a href="<%=request.getContextPath()%>">Home</a></li> - <li ><a href="http://sbfc.sourceforge.net/" target="_blank">Documentation</a></li> <!-- link to one of the sf wiki page ?? --> - <li class="last"><a href="about">About SBFC</a></li> - <li class="functional"><a href="https://sourceforge.net/p/sbfc/bugs/" target="_blank" class="icon icon-generic" data-icon="\">Feedback</a></li> - </ul> - </nav> - - <!-- /local-nav --> - - </div> - </header> - <!-- ########## EBI Header END ######### --> - - - <div id="content" role="main" class="grid_24 clearfix" style="box-shadow: -5px 5px 5px 5px grey;"> +<div id="content" role="main" class="row" style="box-shadow: -5px 5px 5px 5px grey;"> + <div class="columns large-12 medium-12 small-12"> <table style='width:100%;text-align:center;border-spacing:0;'> <tr> - <td style='width:100%;text-align:left;padding:5;'> + <td style='width:100%;text-align:left;padding:5px;'> <h2>Conversion Results</h2> @@ -207,20 +182,20 @@ </td> </tr> <tr> - <td style='width:100%;text-align:left;padding:5;'> - <b>You can get your conversion results during <%=DBupdate.sessionLifeSpan %>H at the - following URL:</b> <a href="results?sessionId=<%=sessionId%>">http://<%=request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/results?sessionId="+sessionId %>.</a> + <td style='width:100%;text-align:left;padding:5px;'> + <b>You can get your conversion results during <%=DBupdate.sessionLifeSpan %>H at the following URL:</b><br/> + <a href="results?sessionId=<%=sessionId%>">http://<%=request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/results?sessionId="+sessionId %>.</a> <br/><input class="blackbordertable" type="button" value="Download all files" onClick="document.location.href='getzip?sessionId=<%=sessionId%>';"/> </td> </tr> <tr> - <td style='padding:5;'> + <td style='padding:5px;'> <% - //Iterating on every job of the session + // Iterating on every job of the session Iterator<Job> iter = list.getList().iterator(); while (iter.hasNext()) { Job job = iter.next(); - // '.' is a special character in JQuery selector so we need to replace it. + // '.' is a special character in JQuery selector, so we need to replace it. String fileNameNoDot = job.getFileName().replace(".", "_"); out.println("<div id='details_" + fileNameNoDot + "'></div>"+ "<input type='hidden' id='finished_" + job.getFileName() + "' value='0'/>"+ @@ -231,14 +206,16 @@ </td> </tr> <tr> - <td style='width:100%;text-align:left;padding:5;'> - <b>You can get your conversion results during <%=DBupdate.sessionLifeSpan %>H at the - following URL: </b><a href="results?sessionId=<%=sessionId%>">http://<%=request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/results?sessionId="+sessionId %></a> + <td style='width:100%;text-align:left;padding:5px;'> + <b>You can get your conversion results during <%=DBupdate.sessionLifeSpan %>H at the following URL:</b><br/> + <a href="results?sessionId=<%=sessionId%>">http://<%=request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/results?sessionId="+sessionId %></a> <br/><input class="blackbordertable" type="button" value="Download all files" onClick="document.location.href='getzip?sessionId=<%=sessionId%>';"/> </td> </tr> </table> </div> - +</div> -<jsp:include page= 'end_body.jsp' /> \ No newline at end of file +<jsp:include page= 'end_body.jsp' /> +</body> +</html> \ No newline at end of file Modified: sbfcOnline/WebContent/jsp/start_body_fluid.jsp =================================================================== --- sbfcOnline/WebContent/jsp/start_body_fluid.jsp 2022-09-09 15:32:37 UTC (rev 749) +++ sbfcOnline/WebContent/jsp/start_body_fluid.jsp 2022-09-09 20:20:56 UTC (rev 750) @@ -1,30 +1,56 @@ -</head> -<body class="level2"><!-- add any of your classes or IDs --> - <div id="skip-to"> - <ul> - <li><a href="#content">Skip to main content</a></li> - <li><a href="#local-nav">Skip to local navigation</a></li> - <li><a href="#global-nav">Skip to EBI global navigation menu</a></li> - <li><a href="#global-nav-expanded">Skip to expanded EBI global navigation menu (includes all sub-sections)</a></li> - </ul> - </div> +<div id="skip-to"> + <a href="#content">Skip to main content</a> +</div> - <div id="wrapper" class="container_24"> +<header id="masthead-black-bar" class="clearfix masthead-black-bar"> + <!-- EBML-EBI menu items will be rendered by the script in script.js --> +</header> - <header> - <div id="global-masthead" class="masthead grid_24"> - <!--This has to be one line and no newline characters--> - <a href="//www.ebi.ac.uk/" title="Go to the EMBL-EBI homepage"><img src="//www.ebi.ac.uk/web_guidelines/images/logos/EMBL-EBI/EMBL_EBI_Logo_white.png" alt="EMBL European Bioinformatics Institute"></a> +<div data-sticky-container class="sticky-container"> + <!-- Suggested layout containers --> + <header id="masthead" class="masthead" data-sticky data-sticky-on="large" data-top-anchor="content:top" + data-btm-anchor="content:bottom"> - <nav> - <ul id="global-nav"> - <!-- set active class as appropriate --> - <li class="first active" id="services"><a href="//www.ebi.ac.uk/services">Services</a></li> - <li id="research"><a href="//www.ebi.ac.uk/research">Research</a></li> - <li id="training"><a href="//www.ebi.ac.uk/training">Training</a></li> - <li id="industry"><a href="//www.ebi.ac.uk/industry">Industry</a></li> - <li id="about" class="last"><a href="//www.ebi.ac.uk/about">About us</a></li> - </ul> - </nav> - - </div> + <!-- local-title, local search --> + <div class="masthead-inner row" style="height: 109px; padding-top: 0rem"> + <div id="local-title"> + <h1 style="margin: 10px 0;"><a href="<%=request.getContextPath()%>/" title="Back to SBFC Online homepage" style="color: rgb(32, 122, 122);"> + <img src="<%=request.getContextPath()%>/img/sbfc-logo-75x73.png" alt="SBFC logo" height="75" style="padding-right: 12px;"/> + System Biology Format Converter (SBFC) Online</a> + </h1> + </div> + + <!-- local-search --> + <%--<div id="localsearch" class="small-12 medium-12 large-8 columns float-right"> + <g:render template="/templates/${grailsApplication.config.jummp.branding.style}/searchBox"/> + </div>--%> + </div> + <!-- /local-title --> + <div class="row" style="background: #71B360 none repeat scroll 0% 0%"> + <!-- local navigation bar --> + <nav> + <ul id="local-nav" class="main-menu dropdown menu" + data-description="navigational" data-dropdown-menu role="menubar"> + <li class="first active" id="menu-item-home"><a href="<%=request.getContextPath()%>/">Home</a></li> + <li ><a href="https://sbfc.sourceforge.net/" target="_blank">Documentation</a></li> <!-- link to one of the sf wiki page ?? --> + <li class="last" id="menu-item-about"><a href="about">About SBFC</a></li> + <li class="functional"><a href="https://sourceforge.net/p/sbfc/bugs/" class="icon icon-generic" data-icon="\" target="_blank">Feedback</a></li> + </ul> + </nav> + </div> + </header> +</div> +<script> + $(document).ready(function () { + const lastPartURI = $(location).attr("href").split('/').pop(); + if (lastPartURI === 'about') { + $('#menu-item-about').addClass("active"); + $('#menu-item-home').removeClass("active"); + } else if (lastPartURI === '') { + // home page + $('#menu-item-home').addClass("active"); + $('#menu-item-about').removeClass("active"); + } + }); + +</script> \ No newline at end of file Modified: sbfcOnline/WebContent/jsp/start_head.jsp =================================================================== --- sbfcOnline/WebContent/jsp/start_head.jsp 2022-09-09 15:32:37 UTC (rev 749) +++ sbfcOnline/WebContent/jsp/start_head.jsp 2022-09-09 20:20:56 UTC (rev 750) @@ -1,8 +1,5 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html> -<head> - <meta charset="utf-8"> - <%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> + <meta charset="utf-8"> + <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!-- jQuery --> <script src="<%=request.getContextPath()%>/js/jquery-1.11.1.js"></script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2022-09-09 15:32:40
|
Revision: 749 http://sourceforge.net/p/sbfc/code/749 Author: nvntung Date: 2022-09-09 15:32:37 +0000 (Fri, 09 Sep 2022) Log Message: ----------- Replaced the email address with the session identifier Modified Paths: -------------- sbfcOnline/WebContent/js/file_upload.js sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java Added Paths: ----------- sbfcOnline/lib/gson-2.8.2.jar Modified: sbfcOnline/WebContent/js/file_upload.js =================================================================== --- sbfcOnline/WebContent/js/file_upload.js 2022-09-09 15:24:58 UTC (rev 748) +++ sbfcOnline/WebContent/js/file_upload.js 2022-09-09 15:32:37 UTC (rev 749) @@ -17,10 +17,10 @@ function submitForm(){ console.log( "file_upload:submitForm called !!" ); - var fileListStr = fileList.toString(); + const fileListStr = fileList.toString(); console.log( "fileList for ajax query: " + fileListStr); - //Making the Ajax call to send url or copy/paste model and launch the conversion jobs + // Making the Ajax call to send url or copy/paste model and launch the conversion jobs $.ajax({ // The URL for the request url: "launchjobs", @@ -42,7 +42,7 @@ // Code to run if the request succeeds; // the response is passed to the function done: function( ) { - console.log( "The launchjobs request is a done successfully!" ); + console.log( "The launchjobs request is done successfully!" ); }, // Code to run if the request fails; the raw request and // status codes are passed to the function @@ -54,18 +54,22 @@ }, // Code to run regardless of success or failure always: function( xhr, status ) { - console.log( "launchjobs always called" ); + console.log("launchjobs always called"); + }, + success: function(data) { + console.log("DATA: " + data); + const json = JSON.parse(data); + redirectToResults(json["sessionId"]); } }); - - setTimeout(redirectToResults, 1000); } -function redirectToResults(){ +function redirectToResults(sessionId){ // redirecting to the result page - document.location.href = contextPath + "/results?emailAddress=" + document.getElementById('emailAddress').value; - + const resultURL = contextPath + "/results?sessionId=" + sessionId; + // console.log("View the conversion results at: " + resultURL); + document.location.href = resultURL; // reset the list of files and the table displaying it. fileList.length = 0; $("#uploaderContainer tr:has(td)").remove(); @@ -86,7 +90,7 @@ console.log("DEBUG : Step 4a : fileList.toString() : " + fileList.toString()); console.log("DEBUG : Step 4b : document.getElementById('url_upload').value : " + document.getElementById('url_upload').value); console.log("DEBUG : Step 4c : document.getElementById('text_upload').value : " + document.getElementById('text_upload').value); - if(fileList.toString() == "" && + if (fileList.toString() == "" && (document.getElementById('url_upload').value == "" || document.getElementById('url_upload').value == "Your URL here") && (document.getElementById('text_upload').value == "" || document.getElementById('text_upload').value == "Your Model here")) { alert("Error: you must upload 1 file at least. See Step 4."); @@ -100,7 +104,7 @@ // Uploads the files. function upload() { console.log("DEBUG : upload : fileList : " + fileList); - if(checkForm()) { + if (checkForm()) { submitForm(); } } Added: sbfcOnline/lib/gson-2.8.2.jar =================================================================== (Binary files differ) Index: sbfcOnline/lib/gson-2.8.2.jar =================================================================== --- sbfcOnline/lib/gson-2.8.2.jar 2022-09-09 15:24:58 UTC (rev 748) +++ sbfcOnline/lib/gson-2.8.2.jar 2022-09-09 15:32:37 UTC (rev 749) Property changes on: sbfcOnline/lib/gson-2.8.2.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java 2022-09-09 15:24:58 UTC (rev 748) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java 2022-09-09 15:32:37 UTC (rev 749) @@ -1,32 +1,23 @@ package uk.ac.ebi.compneur.servlets; -import java.io.BufferedReader; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.io.PrintWriter; -import java.net.URL; -import java.net.URLDecoder; -import java.text.MessageFormat; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; +import com.google.gson.Gson; +import org.apache.commons.io.IOUtils; +import uk.ac.ebi.compneur.config.ConfigParam; +import uk.ac.ebi.compneur.dbAccess.JobAccess; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.net.URL; +import java.net.URLDecoder; +import java.text.MessageFormat; +import java.util.*; -import org.apache.commons.io.IOUtils; -import uk.ac.ebi.compneur.config.ConfigParam; -import uk.ac.ebi.compneur.dbAccess.JobAccess; - - /** * Servlet implementation class ConvertorsServlet */ @@ -87,23 +78,21 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("LaunchJobsServlet - doPost called"); - - response.setContentType("text/html"); - - // small html page in the response to keep firefox happy ? - PrintWriter pw = response.getWriter(); - pw.println("<html>"); - pw.println("<body>"); - pw.println("<p>Fake html response to test</p>"); - pw.println("</body>"); - pw.println("</html>"); - + String inputModelType = request.getParameter("inputModelType"); String converterType = request.getParameter("converterType"); - //Getting the user session id + // Getting the user session id String sessionId = (String)request.getParameter("sessionId"); String files = request.getParameter("files"); - + + // Returns the session identifier to be used in the link sent to the requesters + response.setContentType("application/json"); + PrintWriter pw = response.getWriter(); + Map<String, String> options = new LinkedHashMap(); + options.put("sessionId", sessionId); + String json = new Gson().toJson(options); + pw.write(json); + // Check that we have a list of files boolean isSetListOfFiles = files != null && files.trim().length() > 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2022-09-09 15:24:59
|
Revision: 748 http://sourceforge.net/p/sbfc/code/748 Author: nvntung Date: 2022-09-09 15:24:58 +0000 (Fri, 09 Sep 2022) Log Message: ----------- Treated the file name in case of dowloading models from BioModels Modified Paths: -------------- sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java 2022-09-08 17:58:17 UTC (rev 747) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/LaunchJobsServlet.java 2022-09-09 15:24:58 UTC (rev 748) @@ -107,7 +107,7 @@ // Check that we have a list of files boolean isSetListOfFiles = files != null && files.trim().length() > 0; - if(isSetListOfFiles) { + if (isSetListOfFiles) { System.out.println("LaunchJobsServlet - doPost - files = '" + files); // TODO - use log4j.debug @@ -178,21 +178,19 @@ System.out.println("sessionId = " + sessionId + ", input model type = " + inputModelType + ", converter type = " + converterType); String fileName = null; - String inputModel=""; + String inputModel = ""; // TODO - create random temporary files ?? - //Checking that Parameters are set - if(inputModelType != null && !inputModelType.isEmpty() && converterType != null && !converterType.isEmpty()) { - - - //Retreving model from URL + // Checking that Parameters are set + if (inputModelType != null && !inputModelType.isEmpty() && converterType != null && !converterType.isEmpty()) { + // Retrieving model from URL if(request.getParameter("url_upload") != null && !request.getParameter("url_upload").isEmpty()) { String urlStr = URLDecoder.decode(request.getParameter("url_upload"), "UTF-8"); - System.out.println("Retreving model from URL '" + urlStr + "'"); + System.out.println("Retrieving model from URL '" + urlStr + "'"); // TODO - add log4j logging - convErrorprint.println(inputModelType+" "+converterType+" "+sessionId+" "+request.getParameter("url_upload")); @@ -204,34 +202,40 @@ inputModel += buffer+"\n"; } in.close(); - + // trying to get a meaningful file name from the URL int fileNameStart = urlStr.lastIndexOf("/"); - int fileNameEnd = urlStr.lastIndexOf("."); - - if (fileNameEnd == -1) { - fileNameEnd = urlStr.lastIndexOf("?"); + int fileNameEnd = urlStr.lastIndexOf("."); + + // handle the URLs of BioModels + // it looks like https://www.ebi.ac.uk/biomodels/model/download/BIOMD0000000338.2?filename=BIOMD0000000338_url.xml + if (urlStr.contains("biomodels") && urlStr.contains("filename=")) { + fileNameStart = urlStr.lastIndexOf("="); + fileNameEnd = urlStr.length(); + } else { + if (fileNameEnd == -1) { + fileNameEnd = urlStr.lastIndexOf("?"); + } + // In case the url does not contain either '.' or '?' or 'filename=', we take the last position of the String + if (fileNameEnd == -1) { + fileNameEnd = urlStr.length(); + } } - // In case the url does not contain either '.' or '?', we take the last position of the String - if (fileNameEnd == -1) { - fileNameEnd = urlStr.length(); - } - /*We add a small number to the fileName to avoid problems * if somebody wants to convert several times the same file or * a file with the same name during one session */ - convertNum= (convertNum + 1) % 100; + convertNum = (convertNum + 1) % 100; fileName = urlStr.substring(fileNameStart + 1, fileNameEnd).replace(' ', '_') + "_" + convertNum; } - //Converting model from the text_upload (form) + // Converting model from the text_upload (form) else if (request.getParameter("text_upload") != null && !request.getParameter("text_upload").isEmpty()) { inputModel = URLDecoder.decode(request.getParameter("text_upload"), "UTF-8"); - System.out.println("Retreving model from copy/paste (" + fileName + ")"); // @\n" + inputModel + "\n@\n" + System.out.println("Retrieving model from copy/paste (" + fileName + ")"); // @\n" + inputModel + "\n@\n" convertNum= (convertNum + 1) % 100; fileName = "Conversion_job_" + convertNum; @@ -244,7 +248,7 @@ jobAccess.addJobDB(sessionId, fileName); - //Saving the inputModel in a file + // Saving the inputModel in a file FileOutputStream fconv = new FileOutputStream (filesPath + fileName + "_" + sessionId + ".input"); PrintStream convprint = new PrintStream(fconv); convprint.println (inputModel); @@ -251,7 +255,7 @@ fconv.close(); - //Launching the conversion job + // Launching the conversion job String command = MessageFormat.format(ConfigParam.getFromEnvironment(ConfigParam.SBFC_COMMAND_NAME), fileName + "_" + sessionId, inputModelType, converterType); System.out.println("command = '" + command + "'"); @@ -258,8 +262,8 @@ Process child = Runtime.getRuntime().exec(command); - //Creating the errorLog file - if(!convertStreamToString(child.getErrorStream()).isEmpty()) { + // Creating the errorLog file + if (!convertStreamToString(child.getErrorStream()).isEmpty()) { FileOutputStream fErrorconv2 = new FileOutputStream (filesPath+fileName+"_"+sessionId+".error"); PrintStream convErrorprint2 = new PrintStream(fErrorconv2); convErrorprint2.println (convertStreamToString(child.getErrorStream())); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2022-09-08 17:58:19
|
Revision: 747 http://sourceforge.net/p/sbfc/code/747 Author: nvntung Date: 2022-09-08 17:58:17 +0000 (Thu, 08 Sep 2022) Log Message: ----------- Updated the mail SMTP host Modified Paths: -------------- sbfcOnline/src/uk/ac/ebi/compneur/config/ConfigParam.java Modified: sbfcOnline/src/uk/ac/ebi/compneur/config/ConfigParam.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/config/ConfigParam.java 2022-09-08 13:47:30 UTC (rev 746) +++ sbfcOnline/src/uk/ac/ebi/compneur/config/ConfigParam.java 2022-09-08 17:58:17 UTC (rev 747) @@ -66,8 +66,8 @@ public final static String DB_LOGGER_NAME = "DB"; - public final static String MAIL_SMTP_HOST = "mx1.ebi.ac.uk"; - public final static String MAIL_SMTP_PORT = "587"; // 25 is the default + public final static String MAIL_SMTP_HOST = "hh-smtp.ebi.ac.uk"; + public final static String MAIL_SMTP_PORT = "25"; // 25 is the default public static final String MAIL_FROM = "bio...@li..."; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nv...@us...> - 2022-09-08 13:47:32
|
Revision: 746 http://sourceforge.net/p/sbfc/code/746 Author: nvntung Date: 2022-09-08 13:47:30 +0000 (Thu, 08 Sep 2022) Log Message: ----------- Directed Tomcat creating the temporary files in the java.io.tmpdir directory This change is helpful to deploy the converters to Tomcat which the running user has no writable permission on the Tomcat root directory. By default, this location is set as CATALINA_BASE/temp. Modified Paths: -------------- sbfcOnline/src/uk/ac/ebi/compneur/servlets/MultipartRequestHandler.java Modified: sbfcOnline/src/uk/ac/ebi/compneur/servlets/MultipartRequestHandler.java =================================================================== --- sbfcOnline/src/uk/ac/ebi/compneur/servlets/MultipartRequestHandler.java 2021-01-28 15:53:38 UTC (rev 745) +++ sbfcOnline/src/uk/ac/ebi/compneur/servlets/MultipartRequestHandler.java 2022-09-08 13:47:30 UTC (rev 746) @@ -50,10 +50,10 @@ // 3. Go over each part FileMeta temp = null; - for(Part part:parts){ + for (Part part : parts){ // 3.1 if part is multiparts "file" - if(part.getContentType() != null){ + if (part.getContentType() != null) { // 3.2 Create a new FileMeta object temp = new FileMeta(); @@ -89,7 +89,7 @@ FileMeta temp = null; // 2. If yes (it has multipart "files") - if(isMultipart){ + if (isMultipart) { // 2.1 instantiate Apache FileUpload classes // Create a factory for disk-based file items @@ -97,7 +97,11 @@ // Set factory constraints factory.setSizeThreshold(1); - factory.setRepository(new File(".")); + String uploadDir = System.getProperty("CATALINA_TMPDIR"); + if (uploadDir == null || uploadDir.length() == 0) { + uploadDir = System.getProperty("java.io.tmpdir"); + } + factory.setRepository(new File(uploadDir)); ServletFileUpload upload = new ServletFileUpload(factory); @@ -114,7 +118,7 @@ String contact = ""; // 2.4 Go over each FileItem - for (FileItem item:items) + for (FileItem item : items) { // 2.5 if FileItem is not of type "file" if (item.isFormField()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2021-01-28 15:53:41
|
Revision: 745 http://sourceforge.net/p/sbfc/code/745 Author: niko-rodrigue Date: 2021-01-28 15:53:38 +0000 (Thu, 28 Jan 2021) Log Message: ----------- Updated libsbml jar file and scripts + updated jsbml jar file to the latest version Modified Paths: -------------- trunk/sbfConverter.sh trunk/sbfConverterOnline.sh Added Paths: ----------- trunk/lib/jsbml-1.5-with-dependencies.jar trunk/lib/libsbml-5.18.0.jar Removed Paths: ------------- trunk/lib/jsbml-1.3.1-with-dependencies.jar trunk/lib/libsbml-5.15.0.jar Deleted: trunk/lib/jsbml-1.3.1-with-dependencies.jar =================================================================== (Binary files differ) Added: trunk/lib/jsbml-1.5-with-dependencies.jar =================================================================== (Binary files differ) Index: trunk/lib/jsbml-1.5-with-dependencies.jar =================================================================== --- trunk/lib/jsbml-1.5-with-dependencies.jar 2020-03-12 15:34:29 UTC (rev 744) +++ trunk/lib/jsbml-1.5-with-dependencies.jar 2021-01-28 15:53:38 UTC (rev 745) Property changes on: trunk/lib/jsbml-1.5-with-dependencies.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/zip \ No newline at end of property Deleted: trunk/lib/libsbml-5.15.0.jar =================================================================== (Binary files differ) Added: trunk/lib/libsbml-5.18.0.jar =================================================================== (Binary files differ) Index: trunk/lib/libsbml-5.18.0.jar =================================================================== --- trunk/lib/libsbml-5.18.0.jar 2020-03-12 15:34:29 UTC (rev 744) +++ trunk/lib/libsbml-5.18.0.jar 2021-01-28 15:53:38 UTC (rev 745) Property changes on: trunk/lib/libsbml-5.18.0.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/zip \ No newline at end of property Modified: trunk/sbfConverter.sh =================================================================== --- trunk/sbfConverter.sh 2020-03-12 15:34:29 UTC (rev 744) +++ trunk/sbfConverter.sh 2021-01-28 15:53:38 UTC (rev 745) @@ -1,9 +1,9 @@ #!/bin/bash # Setting up libsbml, needed for the SBML2SBML converters -LD_LIBRARY_PATH=/nfs/production/biomodels/sw/libSBML-5.11.6-Linux/usr/lib64 +#LD_LIBRARY_PATH=/nfs/production/biomodels/sw/libSBML-5.11.6-Linux/usr/lib64 +LD_LIBRARY_PATH=/nfs/production/biomodels/sw//libSBML-5.18.0-Linux/usr/lib64 - # Setting up for Java properties PROPERTIES="" Modified: trunk/sbfConverterOnline.sh =================================================================== --- trunk/sbfConverterOnline.sh 2020-03-12 15:34:29 UTC (rev 744) +++ trunk/sbfConverterOnline.sh 2021-01-28 15:53:38 UTC (rev 745) @@ -29,8 +29,10 @@ LOG_FILE=${LOG_FILE_FOLDER}/`basename $SBML_DIR .input`-$CONVERTER_NAME-export-`date +%F`.log # Setting up libsbml, needed for the SBML2SBML converters -LD_LIBRARY_PATH=/nfs/production/biomodels/sw/libSBML-5.11.6-Linux/usr/lib64 +#LD_LIBRARY_PATH=/nfs/production/biomodels/sw/libSBML-5.11.6-Linux/usr/lib64 +LD_LIBRARY_PATH=/nfs/production/biomodels/sw//libSBML-5.18.0-Linux/usr/lib64 + # Setting up java export JAVA_HOME=/nfs/public/rw/webadmin/java/jdks/latest_1.8 export PATH=${JAVA_HOME}/bin:${PATH} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2020-03-12 15:34:31
|
Revision: 744 http://sourceforge.net/p/sbfc/code/744 Author: niko-rodrigue Date: 2020-03-12 15:34:29 +0000 (Thu, 12 Mar 2020) Log Message: ----------- updated jar file Modified Paths: -------------- trunk/lib/sbfc-1.3.8-SNAPSHOT.jar 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...> - 2020-03-12 15:31:42
|
Revision: 743 http://sourceforge.net/p/sbfc/code/743 Author: niko-rodrigue Date: 2020-03-12 15:31:40 +0000 (Thu, 12 Mar 2020) Log Message: ----------- added support for more SBML level and version Modified Paths: -------------- trunk/src/org/sbfc/converter/Converter.java Modified: trunk/src/org/sbfc/converter/Converter.java =================================================================== --- trunk/src/org/sbfc/converter/Converter.java 2020-03-12 15:09:52 UTC (rev 742) +++ trunk/src/org/sbfc/converter/Converter.java 2020-03-12 15:31:40 UTC (rev 743) @@ -85,13 +85,21 @@ } else if (levelAndVersion != null && levelAndVersion.trim().length() > 0) { - System.out.println("Level and version = " + levelAndVersion); - if (levelAndVersion.equals("L3V1")) { + System.out.println("Level and version = " + levelAndVersion); + // TODO - do that with a regexp ?? + + if (levelAndVersion.equals("L3V2")) { + converterOptions.put("sbml.target.level", "3"); + converterOptions.put("sbml.target.version", "2"); + } else if (levelAndVersion.equals("L3V1")) { converterOptions.put("sbml.target.level", "3"); converterOptions.put("sbml.target.version", "1"); } else if (levelAndVersion.equals("L2V4")) { converterOptions.put("sbml.target.level", "2"); converterOptions.put("sbml.target.version", "4"); + } else if (levelAndVersion.equals("L2V3")) { + converterOptions.put("sbml.target.level", "2"); + converterOptions.put("sbml.target.version", "3"); } else if (levelAndVersion.equals("L2V1")) { converterOptions.put("sbml.target.level", "2"); converterOptions.put("sbml.target.version", "1"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2020-03-12 15:09:53
|
Revision: 742 http://sourceforge.net/p/sbfc/code/742 Author: niko-rodrigue Date: 2020-03-12 15:09:52 +0000 (Thu, 12 Mar 2020) Log Message: ----------- Fixed the sbfc online script Modified Paths: -------------- trunk/sbfConverterOnline.sh Modified: trunk/sbfConverterOnline.sh =================================================================== --- trunk/sbfConverterOnline.sh 2020-03-12 13:43:50 UTC (rev 741) +++ trunk/sbfConverterOnline.sh 2020-03-12 15:09:52 UTC (rev 742) @@ -61,7 +61,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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2020-03-12 13:43:53
|
Revision: 741 http://sourceforge.net/p/sbfc/code/741 Author: niko-rodrigue Date: 2020-03-12 13:43:50 +0000 (Thu, 12 Mar 2020) Log Message: ----------- Added conversion to SBML L3V2 + Modified SBML to Biopax to use the latest version only. Removed biopax L2 conversion. Modified Paths: -------------- sbfcOnline/WebContent/config/converters.xml Modified: sbfcOnline/WebContent/config/converters.xml =================================================================== --- sbfcOnline/WebContent/config/converters.xml 2020-03-12 12:53:04 UTC (rev 740) +++ sbfcOnline/WebContent/config/converters.xml 2020-03-12 13:43:50 UTC (rev 741) @@ -37,14 +37,7 @@ --> </listlanguages> <listconvertors> - <convertor id="SBML2BioPAX_l2"> - <display>BioPAX Level 2</display> - <inputRef>SBMLModel</inputRef> - <outputRef>BioPAXModel</outputRef> - <tooltip>Convert to Biological Pathways Exchange Level 2 format.</tooltip> - <description>Convert to Biological Pathways Exchange Level 2 format.</description> - </convertor> - <convertor id="SBML2BioPAX_l3"> + <convertor id="SBML2BioPAX"> <display>BioPAX Level 3</display> <inputRef>SBMLModel</inputRef> <outputRef>BioPAXModel</outputRef> @@ -72,13 +65,20 @@ <tooltip>Convert to XPP format.</tooltip> <description>Convert to XPP format.</description> </convertor> -<!-- <convertor id="SBML2Dot"> + <convertor id="SBML2Dot"> <display>DOT + png</display> <inputRef>SBMLModel</inputRef> <outputRef>DotModel</outputRef> - <tooltip>Convert to Graphviz/Dot format.</tooltip> + <tooltip>Convert to Graphviz/Dot format + png.</tooltip> <description>Convert to Graphviz/Dot format and generate a png image.</description> - </convertor> Not working at the moment --> + </convertor> + <convertor id="SBML2SBML_L3V2"> + <display>SBML Level 3 Version 2</display> + <inputRef>SBMLModel</inputRef> + <outputRef>SBMLModel</outputRef> + <tooltip>Convert to SBML Level 3 Version 2 format.</tooltip> + <description>Convert to SBML Level 3 Version 2 format.</description> + </convertor> <convertor id="SBML2SBML_L3V1"> <display>SBML Level 3 Version 1</display> <inputRef>SBMLModel</inputRef> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2020-03-12 12:53:05
|
Revision: 740 http://sourceforge.net/p/sbfc/code/740 Author: niko-rodrigue Date: 2020-03-12 12:53:04 +0000 (Thu, 12 Mar 2020) Log Message: ----------- Updated sbml to biopax converter name. Modified Paths: -------------- trunk/sbml2biopax3.sh Modified: trunk/sbml2biopax3.sh =================================================================== --- trunk/sbml2biopax3.sh 2020-03-12 12:31:04 UTC (rev 739) +++ trunk/sbml2biopax3.sh 2020-03-12 12:53:04 UTC (rev 740) @@ -7,5 +7,5 @@ SBF_CONVERTER_HOME=`dirname ${RESOLVE_LINK}` -${SBF_CONVERTER_HOME}/sbfConverter.sh SBMLModel SBML2BioPAX_Tramy $1 +${SBF_CONVERTER_HOME}/sbfConverter.sh SBMLModel SBML2BioPAX $1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2020-03-12 12:31:07
|
Revision: 739 http://sourceforge.net/p/sbfc/code/739 Author: niko-rodrigue Date: 2020-03-12 12:31:04 +0000 (Thu, 12 Mar 2020) Log Message: ----------- Renamed the biopax converters in preparation for the removal of the old and deprecated ones. Modified Paths: -------------- trunk/lib/sbfc-1.3.8-SNAPSHOT.jar trunk/sbml2biopax3.bat trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAXannotationParameter.java trunk/test/org/sbfc/test/sbml2biopax/SBMLSpeciesTests.java Added Paths: ----------- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_2011.java trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_2011_l2.java trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_2011_l3.java Removed Paths: ------------- 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 Modified: trunk/lib/sbfc-1.3.8-SNAPSHOT.jar =================================================================== (Binary files differ) Modified: trunk/sbml2biopax3.bat =================================================================== --- trunk/sbml2biopax3.bat 2020-03-10 15:10:08 UTC (rev 738) +++ trunk/sbml2biopax3.bat 2020-03-12 12:31:04 UTC (rev 739) @@ -4,4 +4,4 @@ set CONVERTER_HOME=%~dp0 -%CONVERTER_HOME%\sbfConverter.bat SBMLModel SBML2BioPAX_Tramy %* +%CONVERTER_HOME%\sbfConverter.bat SBMLModel SBML2BioPAX %* Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java 2020-03-10 15:10:08 UTC (rev 738) +++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java 2020-03-12 12:31:04 UTC (rev 739) @@ -1,1460 +1,120 @@ -/* - * $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-2015 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.converter.sbml2biopax; -import java.text.DateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.Set; -import org.biopax.paxtools.model.BioPAXElement; -import org.biopax.paxtools.model.BioPAXFactory; +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.biopax.paxtools.model.level3.BioSource; -import org.biopax.paxtools.model.level3.Catalysis; -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.ControlledVocabulary; -import org.biopax.paxtools.model.level3.Controller; -import org.biopax.paxtools.model.level3.Conversion; -import org.biopax.paxtools.model.level3.ConversionDirectionType; -import org.biopax.paxtools.model.level3.Interaction; -import org.biopax.paxtools.model.level3.Level3Element; -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.Process; -import org.biopax.paxtools.model.level3.Provenance; -import org.biopax.paxtools.model.level3.Stoichiometry; -import org.biopax.paxtools.model.level3.XReferrable; -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.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.converter.utils.sbml.sbmlannotation.MiriamAnnotation; -import org.sbml.jsbml.CVTerm; -import org.sbml.jsbml.CVTerm.Qualifier; -import org.sbml.jsbml.Compartment; -import org.sbml.jsbml.ListOf; -import org.sbml.jsbml.Reaction; -import org.sbml.jsbml.SBMLException; -import org.sbml.jsbml.SBO; -import org.sbml.jsbml.Species; -import org.sbml.jsbml.SpeciesReference; +import org.sbfc.converter.sbml2biopax.arman.SBML2BioPAXConverter; +import org.sbml.jsbml.SBMLDocument; +import org.sbml.jsbml.SBMLReader; - - - /** - * Convert an SBML file into a BioPax owl file. + * Converts an SBML model into a BioPAX L3 model. * - * The package uk.ac.ebi.compneur.sbmlannotation is not used at the moment !!! Work in progress from Arnaud :-) + * <p>This new converter code was started during GSOC 2016 by Tramy Nguyen, based on the work from the GSOC 2014.</p> * - * @author Arnaud Henry - * @author Nicolas Rodriguez - * @author Camille Laibe * - * @version 2.3 - * + * @author rodrigue + * @author tramy-nguyen + * */ +public class SBML2BioPAX extends GeneralConverter { -// TODO : check if we could use ProteinReference and equivalent stuff as well -// TODO : add a check to see if there is no Reaction and Species, then don't generate a biopax file or just with a comment about the problem + /** + * logger + */ + private static Log log = LogFactory.getLog(SBML2BioPAX.class); -// TODO : have a look at RelationXRef + /** + * 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]; -public abstract class SBML2BioPAX extends GeneralConverter { - - protected String PHYSICAL_ENTITY = "PhysicalEntity"; - protected String CELLULAR_LOCATION_VOCABULARY = "CellularLocationVocabulary"; - protected String PROVENANCE_CLASS_NAME = "Provenance"; - protected String BIO_SOURCE = "BioSource"; - protected String PATHWAY_CLASS_NAME = "Pathway"; - protected String CONTROL = "Control"; - protected String BIOCHEMICAL_REACTION = "BiochemicalReaction"; - protected String COMPLEX_DIS_ASSEMBLY = "ComplexDisAssembly"; - protected String COMPLEX_ASSEMBLY = "ComplexAssembly"; - protected String TRANSPORT = "Transport"; - protected String LEFT_OF_REACTION = "LEFT"; - protected String RIGHT_OF_REACTION = "RIGHT"; - protected String PUBLICATION_XREF_CLASS_NAME = "PublicationXref"; - protected String UNIFICATION_XREF_CLASS_NAME = "UnificationXref"; - protected String PHYSICAL_ENTITY_PARTICIPANT = "PhysicalEntity"; + log.info("Reading SBML file: " + sbmlFile); + SBMLDocument sbmlDocument = SBMLReader.read(new File(sbmlFile)); + log.info("SBML model loaded: " + sbmlDocument.getModel().getNumReactions() + " reactions in it."); - protected String INTERACTION = "Interaction"; - protected String CATALYSIS = "Catalysis"; + log.info("Converting SBML model to BioPAX..."); + SBML2BioPAXConverter sbml2BioPAXConverter = new SBML2BioPAXConverter(); + Model bpModel = sbml2BioPAXConverter.convert(sbmlDocument); - - protected static final String EC_CODE_URI = "http://identifiers.org/ec-code"; // "urn:miriam:ec-code" - protected static final String BIOMODELS_URI = "http://identifiers.org/biomodels.db/"; // "urn:miriam:biomodels.db"; // + log.info("Saving BioPAX model to " + bpFile); + SimpleIOHandler bpHandler = new SimpleIOHandler(BioPAXLevel.L3); + bpHandler.convertToOWL(bpModel, new FileOutputStream(bpFile)); + log.info("Conversion completed."); + } - public static String VERSION = "3.1"; - - // make this configurable in a configuration file ?? - public static final String MIRIAM_WS_URL = "https://www.ebi.ac.uk/miriamws/main/MiriamWebServices"; + @Override + public GeneralModel convert(GeneralModel model) + throws ConversionException, ReadModelException + { + if (! (model instanceof SBMLModel)) { + + // TODO - check if GeneralModel 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() + "'"); + } + + // TODO - run a converter that would set the SBO term + + // TODO - if the model does contain qual, run the 2011_l3 converter until this converter support qual + + 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 "-biopax3.owl"; + } - - // creation of the link to the web services - public static RegistryLocalProvider link; - - public static HashMap<String, String> officialURIs = new HashMap<String, String>(); - public static HashMap<String, String> officialNames = new HashMap<String, String>(); - - static { - link = new RegistryLocalProvider(); - // link.setAddress(MIRIAM_WS_URL); - } + @Override + public String getName() { + return "SBML2BioPAX"; + } - protected int biopaxLevel = 3; + @Override + public String getDescription() { + return "It converts a model format from SBML to BioPAX L3"; + } - - /** - * <b>Constructor SBML2BioPAX.</b><br/> - * Main method of the biological model export from <a href="http://sbml.org/"><b>SBML</b></a> (Systems Biology Markup Language) - * to <a href="http://www.biopax.org/"><b>BioPAX</b></a> (Biological PAthway eXchange format). - * - * Provide it a file when you call the program with the command - * <code><pre>java uk.ac.ebi.compneur.sbml2biopax.SBML2BioPAX <SBMLfile></code></pre> - * - * JSBML is used to read and check the SBML file provided.<br/> - * - * Create the SBMLDocument object and start the creation of the Ontological BioPAX model.<br/> - * - * Save the BioPAX file in the same file path and name that the input file, but replace the extension by .owl. - * - * @param theFile Path of the SBML file to export - */ - public SBML2BioPAX(){ - super(); - } - - /** - * Converts a SBML model into a BioPax Model. - * <p> - * Use JSBML to read the SBML model, and Paxtools to write the BioPax model in OWL.<br/> - * The conversion is composed of different parts:<br/> <ul> - * <li/>fill the Maps coming from the configuration file. They will be use to determine the specific Biopax class of the translated SBML elements.<br/> - * <li/>'model' translation into a BioPax pathway: source on BioModels database, taxonomy, publication references<br/> - * <li/>compartments treatment<br/> - * <li/>species treatment (following the BioPAX classes: complex, dna, rna, protein, smallMolecule). - * The Algorithm take care about the constraint. For example a annotation about KEGG will be typing in a smallMolecule class. - * But the annotation "http://www.genome.jp/kegg/compound/#C00039" describe the Deoxyribonucleotide. - * A second loop replace the term in dna.<br/> - * The Ensembl annotation is special, due to the two first terms of the identifier indicating the type dna, rna or protein of the species. - * ex: http://www.ensembl.org/#ENSRNOG -> dna ; ENSRNOT -> rna ; ENSRNOP -> protein - * <li/>reaction parsing, and creation of the physicalInteraction subclasses. If the reaction contain one or several modifier, - * they are translate in a control or a catalysis (if contain a EC Code). The reactants and products part are translated in biochemicalReaction as default value. - * If they contain several compartment and annotations for the same species, the conversion is change for a transport. - * If the number of species between the reactant and product is different and the annotation correspond to a complex, the conversion is change to a complexAssembly<br/></ul> - * @param sbmlModel SBML object create with the path provide to the constructor - * @return biopaxModel BioPAX ontology corresponding to the SBML exported - */ - public BioPAXModel biopaxexport(SBMLModel sbmlmodel) throws SBMLException - { - //Mapping DB URI with the BioPAX subclass of physicalEntity - Hashtable<String, String> annotationSpecies = new Hashtable<String, String>(); - //Fill the MAP of publication, {key: URI_database_Publication; value:official_Name} - Hashtable<String, String> publicationModel = new Hashtable<String, String>(); - //Fill the MAP of annotation database about the species in SBML, {key: URI_database_Species; value:official_Name} - Hashtable<String, String> speciesAnnotationMap = new Hashtable<String, String>(); - /*Get all the URI for taxonomy*/ - Hashtable<String, String> taxonomyMap = new Hashtable<String, String>(); - - // Map of the created annotations to be sure that they are unique - // The key is the identifiers.org URI, the value is the biopax class instance - Hashtable<String, BioPAXElement> annotationXMLId = new Hashtable<String, BioPAXElement>(); - - int nbDatasource = 0; - int nbBiosource = 0; - boolean biomodelsCommentAdded = false; - - /*Fill the Maps and List for the annotation parameter*/ - SBML2BioPAXannotationParameter.parseSBML2BioPAXConfigFile(annotationSpecies, publicationModel, speciesAnnotationMap, taxonomyMap); - - /*Creates the model Factory*/ - BioPAXFactory bioPAXFactory = getBioPaxFactory(); - BioPAXFactory elementFactory = bioPAXFactory; - - /*Creates the new BioPAX Model*/ - BioPAXModel bioPaxModelGen = new BioPAXModel(bioPAXFactory.createModel()); - - Model bioPaxModel = bioPaxModelGen.getModel(); - - org.sbml.jsbml.Model sbmlModel = sbmlmodel.getModel(); - - - - if(sbmlModel == null) { - throw new SBMLException("SBML2BioPAX: Input file is not a regular SBML file."); - } - - - /** - * Model element analysis. - * - * We will create the pathway BioPax Individual. - * - * */ - String idmodel = new String(); - - if (sbmlModel.isSetId()) { - idmodel = sbmlModel.getId(); - } else if (sbmlModel.isSetName()) { - idmodel = sbmlModel.getName(); - } else { - idmodel = "BioModel"; - } - - //Creating the Pathway - BioPAXElement pathway = elementFactory.create(PATHWAY_CLASS_NAME, idmodel); - - // Comment BioPAX date creation (today) - addComment(pathway, "This BioPAX Level" + biopaxLevel + " file was automatically generated on " + DateFormat.getDateInstance().format(new Date()) + - " by SBML2BioPAX-" + VERSION + ", BioModels.net, EMBL-EBI."); - - //Adding the pathway to the model - bioPaxModel.add(pathway); - - //Pathway annotation - - //External references - for (CVTerm cvterm : sbmlModel.getAnnotation().getListOfCVTerms()) - { - for (String annotationURI : cvterm.getResources()) // The qualifier is ignored at the moment in the biopax export - { - MiriamAnnotation miriamAnnotation = parseMiriamAnnotation(updatedAnnotation(annotationURI)); - - if (miriamAnnotation != null) // it is a recognized URI - { - String annotationDB = miriamAnnotation.getUri(); // ex: http://identifiers.org/pubmed - String annotationIdentifier = miriamAnnotation.getId();// ex: 10659856 - - String rdfId = miriamAnnotation.getIdentifiers_orgURI(); - - if (rdfId == null) - { - debug("Could not create a proper miriamAnnotation for " + annotationURI); - continue; - } - - if (publicationModel.containsKey(annotationDB)) // This is a publication annotation - { - // TODO : specific thing about the publication - - String annotationDBname = publicationModel.get(annotationDB); - - // check that the annotationDBnameplusIdentifier is unique and don't add it several times - BioPAXElement xref = annotationXMLId.get(rdfId); - - if (xref == null) - { - //Creating the publication xref - xref = elementFactory.create(PUBLICATION_XREF_CLASS_NAME, rdfId); - setXrefDb(xref, annotationDBname); - setXrefId(xref, annotationIdentifier); - - annotationXMLId.put(rdfId, xref); // filling the Map - - //Adding the xref to the model - bioPaxModel.add(xref); - } - - //Adding the xref to the pathway - addXref(pathway, xref); - } - else if (taxonomyMap.containsKey(annotationDB)) // Taxonomy annotation - { - BioPAXElement xref = annotationXMLId.get(rdfId); - - if (xref == null) - { - //Creating the unification xref - xref = elementFactory.create(UNIFICATION_XREF_CLASS_NAME, rdfId); - setXrefId(xref, annotationIdentifier); - setXrefDb(xref, taxonomyMap.get(annotationDB)); - - annotationXMLId.put(rdfId, xref); // filling the Map - - //Adding the xref to the model - bioPaxModel.add(xref); - } - - - //Creating the bioSource element - nbBiosource++; - BioPAXElement biosource = elementFactory.create(BIO_SOURCE, "biosource_" + nbBiosource); - // biosource.setDisplayName("bioSource"); - - addXref(biosource, xref); - - //Adding the bioSource to the pathway - setOrganismToPathway(pathway, biosource); - - //Adding the biosource to the model - bioPaxModel.add(biosource); - } - else // Any other annotation, not publication and not taxonomy, we create a UnificationXref - { - //all the other externals references BioModels, GO, KEGGpathway - // if (speciesAnnotationMap.containsKey(annotationDB)){ // Don't think this test if necessary anymore - - BioPAXElement xref = annotationXMLId.get(rdfId); - - if (xref == null) - { - //Creating the UnificationXref xref - xref = elementFactory.create(UNIFICATION_XREF_CLASS_NAME, rdfId); - setXrefId(xref, annotationIdentifier); - - String db = speciesAnnotationMap.get(annotationDB); - - if (db == null) - { - debug("The database " + annotationDB + " is not in the speciesAnnotation Map"); - - db = getDatatypeName(annotationDB); - } - - setXrefDb(xref, db); - - annotationXMLId.put(rdfId, xref); // filling the Map - - //adding xref to the model - bioPaxModel.add(xref); - } - - //Adding the xref to the pathway - addXref(pathway, xref); - - // dataSource: the direct link to the original model - if (annotationDB.equals(BIOMODELS_URI) && cvterm.isModelQualifier() - && cvterm.getModelQualifierType().equals(CVTerm.Qualifier.BQM_IS)) - { - // TODO : add Biomodels Publication ?? - // TODO : For the other biomodels isDerivedFrom we should have a look at the relationXref - - // TODO : this relationXref might more appropriate for the qualifier other than is - - if (!biomodelsCommentAdded) - { - addComment(pathway, "The original model, '" + sbmlModel.getId() + "', was published in BioModels Database (http://www.ebi.ac.uk/biomodels/)."); - biomodelsCommentAdded = true; - } - - //Creating the dataSource element - nbDatasource++; - - BioPAXElement datasource = elementFactory.create(PROVENANCE_CLASS_NAME, "datasource_" + nbDatasource); - addName(datasource, "BioModels Database"); - setDisplayName(datasource, "BioModels Database"); - - addXref(datasource, xref); - - //Adding the datasource to the model and to the pathway - bioPaxModel.add(datasource); - addDataSource(pathway, datasource); - } - } - } - else - { - debug("Could not create a proper miriamAnnotation for " + annotationURI); - continue; - } - } - } - - // TODO : put the VCard in the BioPax file ?? - - //VCARD annotation -// if (annotation.contains("<vCard:")){ -// String annotationVCARD = annotation.substring(annotation.indexOf("<vCard:")); -// String lastpart = annotationVCARD.substring(annotationVCARD.lastIndexOf("</vCard:")); -// int lastmarkup = annotationVCARD.lastIndexOf("</vCard:")+lastpart.indexOf('>')+1; -// annotationVCARD = annotationVCARD.substring(0, lastmarkup); -// Resource vcard = null; -// String personURI = new String(); -// if (annotationVCARD.contains("vCard:Family")){ -// String family = annotationVCARD.substring(annotationVCARD.indexOf("vCard:Family")+13); -// family = family.substring(0,family.indexOf("</vCard:Family")); -// personURI = family; - -// vcard = biopaxModel.createResource(personURI); -// vcard.addProperty(VCARD.Family, family); -// } -// if (annotationVCARD.contains("vCard:Given")){ -// String given = annotationVCARD.substring(annotationVCARD.indexOf("vCard:Given")+12); -// given = given.substring(0, given.indexOf("</vCard:Given")); -// vcard.addProperty(VCARD.Given, given); -// } -// if (annotationVCARD.contains("vCard:EMAIL")){ -// String email = annotationVCARD.substring(annotationVCARD.indexOf("vCard:EMAIL")+12); -// email = email.substring(0, email.indexOf("</vCard:EMAIL")); -// vcard.addProperty(VCARD.EMAIL, email); -// } -// if (annotationVCARD.contains("vCard:Orgname")){ -// String orgname = annotationVCARD.substring(annotationVCARD.indexOf("vCard:Orgname")+14); -// orgname = orgname.substring(0, orgname.indexOf("</vCard:Orgname")); -// vcard.addProperty(VCARD.Orgname, orgname); -// } - - //// BioPAXtool.addBiopaxLinkedProperty("COMMENT", personURI, sbmlModel.getId(), biopaxModel); -// Individual pathwayind = biopaxModel.getIndividual(namespaceString+sbmlModel.getId()); -// Property vcardprop = biopaxModel.getProperty(biopaxString+"COMMENT"); -// Resource res = biopaxModel.getResource(namespaceString+personURI); -// pathwayind.addProperty(vcardprop,res); -// pathwayind.addProperty(vcardprop,"Model creator"); -// } - - - - /** - * Compartments - * - * - * - * */ - for (Compartment compartment : sbmlModel.getListOfCompartments()) - { - //Creating the openControlledVocabulary - BioPAXElement vocab = elementFactory.create(CELLULAR_LOCATION_VOCABULARY, compartment.getId()); - - //Adding the openControlledVocabulary to the model - bioPaxModel.add(vocab); - - if (compartment.isSetName()) - { - //Adding the compartment name to the openControlledVocabulary - addTerm(vocab, compartment.getName()); - } - else - { - //Adding the compartment id to the openControlledVocabulary - addTerm(vocab, compartment.getId()); - } - - //Compartment annotation - for (CVTerm cvterm : compartment.getAnnotation().getListOfCVTerms()) - { - for (String annotation : cvterm.getResources()) - { - MiriamAnnotation miriamAnnotation = parseMiriamAnnotation(updatedAnnotation(annotation)); - - if (miriamAnnotation == null) - { - debug("Could not create a proper miriamAnnotation for " + annotation); - continue; - } - - String annotationDB = miriamAnnotation.getUri(); - String annotationIdentifier = miriamAnnotation.getId(); - String rdfId = miriamAnnotation.getIdentifiers_orgURI(); - - if (speciesAnnotationMap.containsKey(annotationDB)) - { - annotationDB = speciesAnnotationMap.get(annotationDB); - } - else - { - debug("The database " + annotationDB + " is not in the speciesAnnotation Map"); - annotationDB = getDatatypeName(annotationDB); - } - - BioPAXElement xref = annotationXMLId.get(rdfId); - - if (xref == null) - { - // Creating the xref - xref = elementFactory.create(UNIFICATION_XREF_CLASS_NAME, rdfId); - setXrefId(xref, annotationIdentifier); - setXrefDb(xref, annotationDB); - - annotationXMLId.put(rdfId, xref); - } - - //Adding the xref to the openControlledVocabulary - addXref(vocab, xref); - - //adding xref to the model - if(bioPaxModel.getByID(rdfId) == null) - { - bioPaxModel.add(xref); - } - - } - } - } - - - /** - * Species - * - */ - // System.out.println("SBML2BioPAX : URI Map : \n" + officialURIs); - // System.out.println("\n\nSBML2BioPAX : annotationSpeciesMap : \n" + annotationSpecies); - - for (Species species : sbmlModel.getListOfSpecies()) - { - String physicalEntityType = PHYSICAL_ENTITY; // default value, will change depending of the annotations - boolean isAComplex = false; // true if the annotation contain bqbiol:hasPart or reference to BIND database - - ArrayList<MiriamAnnotation> speciesAnnotationList = new ArrayList<MiriamAnnotation>(); - - // WARNING : if two annotations are contradictory (the last is taken) - - for (CVTerm cvterm : species.getAnnotation().getListOfCVTerms()) - { - Qualifier cvTermQualifier = Qualifier.BQB_UNKNOWN; - - if (cvterm.isBiologicalQualifier()) - { - cvTermQualifier = cvterm.getBiologicalQualifierType(); - } - - if (cvTermQualifier.equals(Qualifier.BQB_HAS_PART)) - { - isAComplex = true; - } - - for (String annotation : cvterm.getResources()) - { - // here we have to be sure to normalize to the URIs used in the maps (identifiers.org URIs) - MiriamAnnotation miriamAnnotation = parseMiriamAnnotation(updatedAnnotation(annotation)); - - if (miriamAnnotation == null) - { - debug("Could not create a proper miriamAnnotation for " + annotation); - continue; - } - - String annotationDB = miriamAnnotation.getUri(); - String annotationTestEnsembl = ""; - String annotationTestEnsembl2 = ""; - speciesAnnotationList.add(miriamAnnotation); - - // System.out.println("SBML2BioPax : miriamAnnotation = " + annotationDB + ", " + miriamAnnotation.getId()); - - // constraint on a database which have yet an other entry - // ex:Chebi (small molecule DB) contain DNA and RNA and Ensembl - String officialAnnotation = miriamAnnotation.getFullURI(); - - if ((annotationDB.length() + 8) < officialAnnotation.length()){ - annotationTestEnsembl = officialAnnotation.substring(0, officialAnnotation.lastIndexOf("/") + 8); - annotationTestEnsembl2 = officialAnnotation.substring(0, officialAnnotation.lastIndexOf("/") + 5); - - // TODO : we need to use a regexp to be able to cover all the possible ensembl IDs - } - - // System.out.println("SBML2BioPax : species annotationDB = " + annotationDB); - - if (annotationSpecies.containsKey(annotationDB)){ - - if ((annotationSpecies.get(annotationDB)).equals("complex")){ - isAComplex = true; - } - - physicalEntityType = annotationSpecies.get(annotationDB); - - // System.out.println("SBML2BioPax : species physicalEntityType = " + physicalEntityType); - - if (annotationSpecies.containsKey(officialAnnotation)){ - physicalEntityType = annotationSpecies.get(officialAnnotation); - // System.out.println("SBML2BioPax : species Constraint physicalEntityType = " + physicalEntityType); - } - } - else - { - //Test for Ensembl annotation, check the 7 first characters of the identifier - if (annotationSpecies.containsKey(annotationTestEnsembl) - || annotationSpecies.containsKey(annotationTestEnsembl2)) - { - - if (annotationSpecies.containsKey(annotationTestEnsembl)) - { - physicalEntityType = annotationSpecies.get(annotationTestEnsembl); - } - else - { - physicalEntityType = annotationSpecies.get(annotationTestEnsembl2); - } - - // System.out.println("SBML2BioPax : Ensembl : annotation = " + officialAnnotation); - // System.out.println("SBML2BioPax : Ensembl : physicalEntityType = " + physicalEntityType + "\n"); - } - else - { - //constraint on a database which have not already an other entry - if (annotationSpecies.containsKey(officialAnnotation)){ - physicalEntityType = annotationSpecies.get(officialAnnotation); - } - } - } - } - if (isAComplex){ - physicalEntityType = "Complex"; - } - } - - if (biopaxLevel == 2) - { - // Putting the first letter to lower case for BioPax Level 2 class name - physicalEntityType = physicalEntityType.substring(0, 1).toLowerCase() + physicalEntityType.substring(1); - } - - // System.out.println("PhysicalEntity type : " + physicalEntityType); - //Creating the bioPaxElement corresponding to the physicalEntityType - BioPAXElement physicalEntity = elementFactory.create(physicalEntityType, species.getId()); - - if (species.isSetName()) - { - //Setting the name - setDisplayName(physicalEntity, species.getName()); - addName(physicalEntity, species.getName()); - } - else - { - //Setting the id as name - setDisplayName(physicalEntity, species.getId()); - } - - for (int l = 0; l < speciesAnnotationList.size(); l++) - { - MiriamAnnotation miriamAnno = speciesAnnotationList.get(l); - String rdfId = miriamAnno.getIdentifiers_orgURI(); - - if (rdfId == null) - { - debug("Could not create a proper miriamAnnotation for '" + speciesAnnotationList.get(l).getUri() - + "' : '" + speciesAnnotationList.get(l).getId()); - continue; - } - - BioPAXElement xref = annotationXMLId.get(rdfId); - - if (xref == null) - { - //Creating the unification xref - xref = elementFactory.create(UNIFICATION_XREF_CLASS_NAME, rdfId); - setXrefId(xref, miriamAnno.getId()); - - setXrefDb(xref, officialNames.get(miriamAnno.getUri())); - - annotationXMLId.put(rdfId, xref); - } - - //Adding the xref to the physicalEntity - addXref(physicalEntity, xref); - - // Adding the xref to the model if not already there - if(bioPaxModel.getByID(rdfId) == null) - { - bioPaxModel.add(xref); - } - - } - - //Adding the physicalEntity to the model - bioPaxModel.add(physicalEntity); - } - - - - /** - * Reactions - * - * */ - //Comment: -An EC-code can be added for the biochemicalReactions - for (Reaction reaction : sbmlModel.getListOfReactions()) - { - String conversionId = "conversion_" + reaction.getId(); - - // TODO changed from ControlType to Interaction - //String controlType = CONTROL; //Default value, if annotation contain ECnumber -> catalysis - String interactionType = INTERACTION; - - //Recovering the reaction Type - String reactionType = findReactionType(reaction, bioPaxModel); - - //Creating the new biochemicalReaction - BioPAXElement bioReaction; - - //BioPax has only one Class for complexAssembly and complexDisAssembly - if (reactionType.equals(COMPLEX_DIS_ASSEMBLY) || reactionType.equals(COMPLEX_ASSEMBLY)) - { - bioReaction = elementFactory.create(COMPLEX_ASSEMBLY, conversionId); - /*Usually complexAssembly and complexDisAssembly are spontaneous - * Let's assume so and indicate if the reaction is L-R or R-L - */ - setSpontaneous(bioReaction, true); - - if(reactionType.equals(COMPLEX_ASSEMBLY)) - { - setConversionDirection(bioReaction, ConversionDirectionType.LEFT_TO_RIGHT); - } - else - { - setConversionDirection(bioReaction, ConversionDirectionType.RIGHT_TO_LEFT); - } - } - else - { - bioReaction = elementFactory.create(reactionType, conversionId); - } - - if (reaction.isSetName()) - { - //Setting the bioReaction name - setDisplayName(bioReaction, reaction.getName()); - addName(bioReaction, reaction.getName()); - } - else - { - //Setting the bioReaction id as name - setDisplayName(bioReaction, reaction.getId()); - } - - //Reaction annotations - for (CVTerm cvterm : reaction.getAnnotation().getListOfCVTerms()) - { - for (String annotation : cvterm.getResources()) - { - MiriamAnnotation miriamAnnotation = parseMiriamAnnotation(annotation); - - if (miriamAnnotation == null) - { - debug("Could not create a proper miriamAnnotation for " + annotation); - continue; - } - - String annotationDB = miriamAnnotation.getUri(); - String annotationIdentifier = miriamAnnotation.getId(); - String rdfId = miriamAnnotation.getIdentifiers_orgURI(); - String datatypeName = officialNames.get(annotationDB); - - BioPAXElement xref = annotationXMLId.get(rdfId); - - if (datatypeName == null) - { - datatypeName = getDatatypeName(annotationDB); - officialNames.put(annotationDB, datatypeName); - } - - if (xref == null) - { - //Creating the unification xref - xref = elementFactory.create(UNIFICATION_XREF_CLASS_NAME, rdfId); - setXrefId(xref, annotationIdentifier); - setXrefDb(xref, datatypeName); - - annotationXMLId.put(rdfId, xref); - } - - //Adding the xref to the bioReaction - addXref(bioReaction, xref); - - //Adding xref to the model if necessary - if(bioPaxModel.getByID(rdfId) == null) - { - bioPaxModel.add(xref); - } - - String ECcodeName = officialNames.get(EC_CODE_URI); - - - // TODO REPLACED WITH data field - if (datatypeName.equals(ECcodeName)){ - interactionType = CATALYSIS; - } - } - } - - //listOfReactant - for (int i = 0; i < reaction.getReactantCount(); i++) - { - addReactant(bioPaxModel, bioReaction, elementFactory, reaction.getReactant(i), i); - } - - //listOfProduct - for (int i = 0; i < reaction.getProductCount(); i++) - { - addProduct(bioPaxModel, bioReaction, elementFactory, reaction.getProduct(i), i); - } - - //If we have modifiers we prepare to add them to the bioReaction - - if (reaction.getModifierCount() > 0) - { -// String controlId = "control_"+reaction.getId(); -// -// Set<? extends BioPAXElement> setOfcontrol = getListOfControl(bioReaction); - - String interactionId = conversionId; - - Set<? extends BioPAXElement> setOfInteraction = getListOfControl(bioReaction); - - //listOfModifier - for (int i = 0; i < reaction.getModifierCount(); i++) - { - Species speciesInstance = reaction.getModifier(i).getSpeciesInstance(); - - // creating a new interaction - BioPAXElement reacInteraction; - - - if (SBO.isInhibitor(reaction.getSBOTerm()) || SBO.isChildOf(reaction.getSBOTerm(), 459)) - { - reacInteraction = elementFactory.create(CATALYSIS, interactionId + "_" + speciesInstance.getId() + "_" + i); - } else - { - reacInteraction = elementFactory.create(INTERACTION, interactionId + "_" + speciesInstance.getId() + "_" + i); - } - - - //Creating new PEP (only for level 2) - if (reacInteraction instanceof Control) - { - // TODO should this use controlId ?? - BioPAXElement newPEP = elementFactory.create(PHYSICAL_ENTITY_PARTICIPANT, "PEP" + i + "_" + interactionId + speciesInstance.getId()); - - setDisplayName(newPEP, speciesInstance.getId()); - - setCellularLocation(newPEP, bioPaxModel.getByID(speciesInstance.getCompartment())); - - //Setting the Physical Entity to the PEP - addMemberPhysicalEntity(newPEP, bioPaxModel.getByID(speciesInstance.getId())); - - //Adding controller to the control - addController(reacInteraction, newPEP); - addControlled(reacInteraction, bioReaction); - bioPaxModel.add(newPEP); - } - - //Setting Interaction Type - setInteractionType(reacInteraction, reaction); - - //Adding interaction to the reaction - addControl(setOfInteraction, reacInteraction); - - bioPaxModel.add(reacInteraction); - - } - } - - addPathwayComponent(pathway, bioReaction); - - bioPaxModel.add(bioReaction); - } - - return bioPaxModelGen;//return a complete OWL model - } - - - - /** - * Updates the given annotation to the latest official URI. - * <br/>If miriam does not recognize the URI, the original, - * unmodified URI is returned. - * - * @param annotationURI - * @return the updated annotation URI. - */ - private String updatedAnnotation(String annotationURI) - { - String updateAnnotation = link.getMiriamURI(annotationURI); - - if (updateAnnotation != null) - { - return updateAnnotation; - } - - System.out.println("Annotation '" + annotationURI + "' was not recognized by miriam !!"); - - return annotationURI; - } - - - protected void setInteractionType(BioPAXElement reacInteraction, Reaction reaction) - { - if (reacInteraction instanceof Catalysis) - { - //Creating the controlType - ControlType bioPaxControlType = null; - - if (SBO.isInhibitor(reaction.getSBOTerm())) - { - bioPaxControlType = ControlType.INHIBITION; - } - else if (SBO.isChildOf(reaction.getSBOTerm(), 459)) // TODO the number 459 is id of SBO term: Stimulator - { - bioPaxControlType = ControlType.ACTIVATION; - } - - // TODO - check modifiers - - if(bioPaxControlType != null) - { - ((Control) reacInteraction).setControlType(bioPaxControlType); - } - } - } - - - protected void addControlled(BioPAXElement reacControl, BioPAXElement bioReaction) - { - if (reacControl instanceof Control && bioReaction instanceof Process) - { - ((Control) reacControl).addControlled((Process) bioReaction); - } - } - - protected void addController(BioPAXElement reacControl, BioPAXElement physicalEntityParticipant) - { - if (reacControl instanceof Control && physicalEntityParticipant instanceof PhysicalEntity) - { - ((Control) reacControl).addController((Controller) physicalEntityParticipant); - } - } - - @SuppressWarnings("unchecked") - protected void addControl(Set<? extends BioPAXElement> setOfcontrol, BioPAXElement reacControl) - { - if (reacControl instanceof Control) - { - ((Set<Control>) setOfcontrol).add((Control) reacControl); - } - else - { - println("addControl problem !! " + reacControl); - - } - } - - protected Set<? extends BioPAXElement> getListOfControl(BioPAXElement bioReaction) - { - if (bioReaction instanceof Control) - { - return ((Control) bioReaction).getControlledOf(); - } - else - { - println("getListOfControl problem !! " + bioReaction); - - } - - return null; - } - - - - protected Set<? extends BioPAXElement> getListOfConversion(BioPAXElement bioReaction) - { - if (bioReaction instanceof Conversion) - { - return ((Conversion) bioReaction).getControlledOf(); - } - else - { - println("getListOfConversion problem !! " + bioReaction); - - } - - return null; - } - - protected Set<? extends BioPAXElement> getListOfInteraction(BioPAXElement bioReaction) - { - if (bioReaction instanceof Interaction) - { - return ((Interaction) bioReaction).getControlledOf(); - } - else - { - println("getListOfConversion problem !! " + bioReaction); - - } - - return null; - } - - protected void setConversionDirection(BioPAXElement bioReaction, - ConversionDirectionType direction) - { - if (bioReaction instanceof Conversion) - { - ((Conversion) bioReaction).setConversionDirection(direction); - } - } - - protected void setSpontaneous(BioPAXElement bioReaction, boolean spontaneous) - { - if (bioReaction instanceof Conversion) - { - ((Conversion) bioReaction).setSpontaneous(spontaneous); - } - } - - protected void addTerm(BioPAXElement vocab, String term) - { - if (vocab instanceof ControlledVocabulary) - { - ((ControlledVocabulary) vocab).addTerm(term); - } - } - - protected void addDataSource(BioPAXElement pathway, BioPAXElement datasource) - { - if (pathway instanceof Pathway && datasource instanceof Provenance) - { - ((Pathway) pathway).addDataSource((Provenance) datasource); - } - - } - - protected void setDisplayName(BioPAXElement named, String displayName) - { - if (named instanceof Named) - { - ((Named) named).setDisplayName(displayName); - } - } - - protected void addName(BioPAXElement named, String name) - { - if (named instanceof Named) - { - ((Named) named).addName(name); - } - } - - protected void setXrefId(BioPAXElement xref, String annotationIdentifier) - { - if (xref instanceof Xref) - { - ((Xref) xref).setId(annotationIdentifier); - } - } - - protected void setXrefDb(BioPAXElement xref, String annotationDBname) - { - if (xref instanceof Xref) - { - ((Xref) xref).setDb(annotationDBname); - } - } - - protected void addPathwayComponent(BioPAXElement pathway, BioPAXElement bioReaction) - { - if (pathway instanceof Pathway && bioReaction instanceof Process) - { - ((Pathway) pathway).addPathwayComponent((Process) bioReaction); - } - } - - protected void setOrganismToPathway(BioPAXElement pathway, BioPAXElement biosource) - { - if (pathway instanceof Pathway && biosource instanceof BioSource) - { - ((Pathway) pathway).setOrganism((BioSource) biosource); - } - } - - protected void addXref(BioPAXElement biopaxElement, BioPAXElement xref) - { - if (biopaxElement instanceof XReferrable && xref instanceof Xref) - { - ((XReferrable) biopaxElement).addXref((Xref) xref); - } - } - - protected void addComment(BioPAXElement biopaxElement, String commentString) - { - if (biopaxElement instanceof Level3Element) - { - ((Level3Element) biopaxElement).addComment(commentString); - } - } - - protected BioPAXFactory getBioPaxFactory() - { - if (biopaxLevel == 3) - { - return BioPAXLevel.L3.getDefaultFactory(); - } - else if (biopaxLevel == 2) - { - return BioPAXLevel.L2.getDefaultFactory(); - } - - return null; - } - - private void addProduct(Model bioPaxModel, BioPAXElement bioReaction, - BioPAXFactory elementFactory, SpeciesReference sr, int index) - { - addSpeciesReference(bioPaxModel, bioReaction, elementFactory, sr, RIGHT_OF_REACTION, index); - } - - private void addReactant(Model bioPaxModel, BioPAXElement bioReaction, - BioPAXFactory elementFactory, SpeciesReference sr, int index) - { - addSpeciesReference(bioPaxModel, bioReaction, elementFactory, sr, LEFT_OF_REACTION, index); - } - - - private void addSpeciesReference(Model bioPaxModel, BioPAXElement bioReaction, - BioPAXFactory elementFactory, SpeciesReference speciesReferenceObj, - String direction, int index) - { - String speciesReference = speciesReferenceObj.getSpecies(); - Species speciesInstance = speciesReferenceObj.getSpeciesInstance(); - - //Creating the new PEP - BioPAXElement newPEP = elementFactory.create(PHYSICAL_ENTITY_PARTICIPANT, direction + "_" + index + "_" + bioReaction.getUri() + "_" + speciesReference); - - setDisplayName(newPEP, speciesReference); - - //Setting the Physical Entity to the PEP - addMemberPhysicalEntity(newPEP, bioPaxModel.getByID(speciesReference)); - setCellularLocation(newPEP, bioPaxModel.getByID(speciesInstance.getCompartment())); - - //setting participant stoichiometry - double stoichiometry = speciesReferenceObj.getStoichiometry(); - - BioPAXElement stoichio = setStoichiometry(bioReaction, newPEP, stoichiometry, direction + "_" + index + "_" + bioReaction.getUri() + "_" + speciesReference + "_STOICHIOMETRY", elementFactory); - - if (direction.equals(LEFT_OF_REACTION)) - { - //Adding PEP to the Left - addLeft(bioReaction, newPEP); - } - else if (direction.equals(RIGHT_OF_REACTION)) - { - //Adding PEP to the Right - addRight(bioReaction, newPEP); - } - - bioPaxModel.add(newPEP); - - if (biopaxLevel == 3 && stoichio != null) - { - bioPaxModel.add(stoichio); - } - } - - protected void addRight(BioPAXElement bioReaction, BioPAXElement physicalEntityParticipant) - { - if (bioReaction instanceof Conversion && physicalEntityParticipant instanceof PhysicalEntity) - { - ((Conversion) bioReaction).addRight((PhysicalEntity) physicalEntityParticipant); - } - } - - protected void addLeft(BioPAXElement bioReaction, BioPAXElement physicalEntityParticipant) - { - if (bioReaction instanceof Conversion && physicalEntityParticipant instanceof PhysicalEntity) - { - ((Conversion) bioReaction).addLeft((PhysicalEntity) physicalEntityParticipant); - } - } - - protected BioPAXElement setStoichiometry(BioPAXElement bioReaction, - BioPAXElement physicalEntityParticipant, double stoichiometry, String stochiometryId, BioPAXFactory elementFactory) - { - - if (bioReaction instanceof Conversion && physicalEntityParticipant instanceof PhysicalEntity) - { - Stoichiometry stoichio = elementFactory.create(Stoichiometry.class, stochiometryId); - - stoichio.setStoichiometricCoefficient((float) stoichiometry); - stoichio.setPhysicalEntity((PhysicalEntity) physicalEntityParticipant); - - ((Conversion) bioReaction).addParticipantStoichiometry(stoichio); - - return stoichio; - } - else - { - println("setStoichiometry problem !! " + physicalEntityParticipant + "; " + bioReaction); - } - - return null; - } - - protected void addMemberPhysicalEntity(BioPAXElement physicalEntityParticipant, - BioPAXElement physicalEntity) - { - if (physicalEntityParticipant instanceof PhysicalEntity && physicalEntity instanceof PhysicalEntity) - { - ((PhysicalEntity) physicalEntityParticipant).addMemberPhysicalEntity((PhysicalEntity) physicalEntity); - } - else - { - println("addMemberPhysicalEntity problem !! " + physicalEntityParticipant + "; " + physicalEntity); - } - } - - protected void setCellularLocation(BioPAXElement physicalEntityParticipant, BioPAXElement cellularLocation) - { - if (physicalEntityParticipant instanceof PhysicalEntity && cellularLocation instanceof CellularLocationVocabulary) - { - ((PhysicalEntity) physicalEntityParticipant).setCellularLocation((CellularLocationVocabulary) cellularLocation); - } - else - { - println("setCellularLocation problem !! " + physicalEntityParticipant + "; " + cellularLocation); - } - } - - /** - * @param reaction - * @param bioPaxModel - * @return - */ - private String findReactionType(Reaction reaction, Model bioPaxModel) - { - //List of reactants - ListOf<SpeciesReference> listReactants = reaction.getListOfReactants(); - //List of Products - ListOf<SpeciesReference> listProducts = reaction.getListOfProducts(); - - /* - * Let's see if we have a complex assembly or a complex disassembly - */ - - // Difference between number of complex in the reactants and in the products - int complexBalance = 0; - - //Counting complex in the reactants - for (SpeciesReference speciesReferenceReac: listReactants) - { - if (isComplex(bioPaxModel, speciesReferenceReac.getSpecies())) - { - complexBalance--; - } - } - - //Counting complex in the products - for (SpeciesReference speciesReferenceProd: listProducts) - { - if (isComplex(bioPaxModel, speciesReferenceProd.getSpecies())) - { - complexBalance++; - } - } - - /* - * If we have a complexBalance == 0, there has be no complexAssembly nor complexDisAssembly - * if complexBalance < 0 it is a complexdisAssembly - * if complexBalance > 0 it is a complexAssembly - */ - - /* - * Let's see if we have a transport or a transport with reaction - * Is the reaction a transport ? A -> A' (compartment(A) != compartment(A')) - */ - - boolean isTransport = false; - String compartmentProd; - String compartmentReac; - String reactionTypeReturn; - - // For each reactant - for (SpeciesReference speciesReferenceReac: listReactants) - { - // reset of the product compartment - compartmentProd = ""; - - // setting the reactant compartment - compartmentReac = speciesReferenceReac.getSpeciesInstance().getCompartment(); - - //Looping on the products - for (SpeciesReference speciesReferenceProd: listProducts) - { - compartmentProd = speciesReferenceProd.getSpeciesInstance().getCompartment(); - - if (! compartmentProd.equals(compartmentReac)) - { - isTransport = true; - break; - } - } - - if (isTransport) - { - break; - } - } - - // Returning the reaction type - if (isTransport) - { - reactionTypeReturn = TRANSPORT; - } - else if (complexBalance > 0) - { - reactionTypeReturn = COMPLEX_ASSEMBLY; - } - else if (complexBalance < 0) - { - reactionTypeReturn = COMPLEX_DIS_ASSEMBLY; - } - else - { - reactionTypeReturn = BIOCHEMICAL_REACTION; - } - - return reactionTypeReturn; - } - - protected boolean isComplex(Model bioPaxModel, String species) - { - if (bioPaxModel.getByID(species) instanceof Complex) - { - return true; - } - - return false; - } - - /** - * - * @param annotation - * @return - */ - private MiriamAnnotation parseMiriamAnnotation(String annotation) { - - String uri = link.getMiriamURI(annotation); - String id = RegistryUtilities.getElementPart(uri); - - // System.out.println("SBML2Biopax : parseMiriamAnnotation : uri = " + uri + ", id = " + id); - - if (uri != null && id != null) - { - return new MiriamAnnotation(id, RegistryUtilities.getDataPart(uri), uri); - } - else - { - println("WARNING : the annotation '" + annotation + "' could not be handled correctly !!!"); - } - - return null; - } - - - - /** - * Gets the official name of the datatype with the given URI. - * <p> - * example: - * <code><pre>link.getName("http://www.ec-code.org/");</code></pre> - * reply: Enzyme Nomenclature - * - * @param uri URI for the MIRIAM request. Looking for the official name of this database - * @return the Official name of the datatype. - */ - private String getDatatypeName(String uri) - { - return link.getName(uri); - } - - - - /** - * Control the validity of the identifier RDF<br/> - * The rdf:ID mustn't accept the characters: space, '/', ':'<br/> - * ex: "Gene Ontology/GO:0019236" give "Gene_Ontology_GO_0019236" - * @param db String to be check - * @return Corrected string - */ - @SuppressWarnings("unused") - private String checkDBname(String db){ - db = db.replace(" ", "_").replace(":", "_").replace("/", "_").replace("(", "_").replace(")", "_"); - return db; - } - - static void println(String msg){ - System.out.println(msg); - } - static void println(boolean msg){ - System.out.println(msg); - } - static void println(int msg){ - System.out.println(msg); - } - static void println(double msg){ - System.out.println(msg); - } - - static void debug(String mesg) - { - // TODO : add proper logging - System.out.println("DEBUG : " + mesg); - } - - @Override - public GeneralModel convert(GeneralModel model) throws ConversionException, ReadModelException { - try { - inputModel = model; - return biopaxexport((SBMLModel)model); - } catch (SBMLException e) { - throw new ReadModelException(e); - } - } - - public String getResultExtension() { - return "-biopax" + biopaxLevel + ".owl"; - } - - @Override - public String getName() { - return "SBML2BioPAX"; - } - - @Override - public String getDescription() { - return "It converts a model format from SBML to BioPAX"; - } - - @Override - public String getHtmlDescription() { - return "It converts a model format from SBML to BioPAX"; - } - - + @Override + public String getHtmlDescription() { + return "It converts a model format from SBML to BioPAX L3"; + } + } Added: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_2011.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_2011.java (rev 0) +++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_2011.java 2020-03-12 12:31:04 UTC (rev 739) @@ -0,0 +1,1460 @@ +/* + * $Id: SBML2BioPAX.java 728 2018-05-24 13:20:58Z niko-rodrigue $ + * $URL: svn+ssh://nik...@sv.../p/sbfc/code/trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX.java $ + * + * ========================================================================== + * 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-2015 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.converter.sbml2biopax; + +import java.text.DateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.Set; + +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.Catalysis; +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.ControlledVocabulary; +import org.biopax.paxtools.model.level3.Controller; +import org.biopax.paxtools.model.level3.Conversion; +import org.biopax.paxtools.model.level3.ConversionDirectionType; +import org.biopax.paxtools.model.level3.Interaction; +import org.biopax.paxtools.model.level3.Level3Element; +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.Process; +import org.biopax.paxtools.model.level3.Provenance; +import org.biopax.paxtools.model.level3.Stoichiometry; +import org.biopax.paxtools.model.level3.XReferrable; +import org.biopax.paxtools.model.level3.Xref; +import org.identifiers.registry.RegistryLocalProvider; +import org.identifiers.registry.RegistryUtilities; +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.converter.utils.sbml.sbmlannotation.MiriamAnnotation; +import org.sbml.jsbml.CVTerm; +import org.sbml.jsbml.CVTerm.Qualifier; +import org.sbml.jsbml.Compartment; +import org.sbml.jsbml.ListOf; +import org.sbml.jsbml.Reaction; +import org.sbml.jsbml.SBMLException; +import org.sbml.jsbml.SBO; +import org.sbml.jsbml.Species; +import org.sbml.jsbml.SpeciesReference; + + + + +/** + * Convert an SBML file into a BioPax owl file. + * + * The package uk.ac.ebi.compneur.sbmlannotation is not used at the moment !!! Work in progress from Arnaud :-) + * + * @author Arnaud Henry + * @author Nicolas Rodriguez + * @author Camille Laibe + * + * @version 2.3 + * + */ + +// TODO : check if we could use ProteinReference and equivalent stuff as well + +// TODO : add a check to see if there is no Reaction and Species, then don't generate a biopax file or just with a comment about the problem + +// TODO : have a look at RelationXRef + + +public abstract class SBML2BioPAX_2011 extends GeneralConverter { + + protected String PHYSICAL_ENTITY = "PhysicalEntity"; + protected String CELLULAR_LOCATION_VOCABULARY = "CellularLocationVocabulary"; + protected String PROVENANCE_CLASS_NAME = "Provenance"; + protected String BIO_SOURCE = "BioSource"; + protected String PATHWAY_CLASS_NAME = "Pathway"; + protected String CONTROL = "Control"; + protected String BIOCHEMICAL_REACTION = "BiochemicalReaction"; + protected String COMPLEX_DIS_ASSEMBLY = "ComplexDisAssembly"; + protected String COMPLEX_ASSEMBLY = "ComplexAssembly"; + protected String TRANSPORT = "Transport"; + protected String LEFT_OF_REACTION = "LEFT"; + protected String RIGHT_OF_REACTION = "RIGHT"; + protected String PUBLICATION_XREF_CLASS_NAME = "PublicationXref"; + protected String UNIFICATION_XREF_CLASS_NAME = "UnificationXref"; + protected String PHYSICAL_ENTITY_PARTICIPANT = "PhysicalEntity"; + + protected String INTERACTION = "Interaction"; + protected String CATALYSIS = "Catalysis"; + + + protected static final String EC_CODE_URI = "http://identifiers.org/ec-code"; // "urn:miriam:ec-code" + protected static final String BIOMODELS_URI = "http://identifiers.org/biomodels.db/"; // "urn:miriam:biomodels.db"; // + + public static String VERSION = "3.1"; + + // make this configurable in a configuration file ?? + public static final String MIRIAM_WS_URL = "https://www.ebi.ac.uk/miriamws/main/MiriamWebServices"; + + + + // creation of the link to the web services + public static RegistryLocalProvider link; + + public static HashMap<String, String> officialURIs = new HashMap<String, String>(); + public static HashMap<String, String> officialNames = new HashMap<String, String>(); + + static { + link = new RegistryLocalProvider(); + // link.setAddress(MIRIAM_WS_URL); + } + + protected int biopaxLevel = 3; + + + /** + * <b>Constructor SBML2BioPAX.</b><br/> + * Main method of the biological model export from <a href="http://sbml.org/"><b>SBML</b></a> (Systems Biology Markup Language) + * to <a href="http://www.biopax.org/"><b>BioPAX</b></a> (Biological PAthway eXchange format). + * + * Provide it a file when you call the program with the command + * <code><pre>java uk.ac.ebi.compneur.sbml2biopax.SBML2BioPAX <SBMLfile></code></pre> + * + * JSBML is used to read and check the SBML file provided.<br/> + * + * Create the SBMLDocument object and start the creation of the Ontological BioPAX model.<br/> + * + * Save the BioPAX file in the same file path and name that the input file, but replace the extension by .owl. + * + * @param theFile Path of the SBML file to export + */ + public SBML2BioPAX_2011(){ + super(); + } + + /** + * Converts a SBML model into a BioPa... [truncated message content] |
From: <nik...@us...> - 2020-03-10 15:10:09
|
Revision: 738 http://sourceforge.net/p/sbfc/code/738 Author: niko-rodrigue Date: 2020-03-10 15:10:08 +0000 (Tue, 10 Mar 2020) Log Message: ----------- updated jar file Modified Paths: -------------- trunk/lib/sbfc-1.3.8-SNAPSHOT.jar 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...> - 2020-03-10 15:03:19
|
Revision: 737 http://sourceforge.net/p/sbfc/code/737 Author: niko-rodrigue Date: 2020-03-10 15:03:17 +0000 (Tue, 10 Mar 2020) Log Message: ----------- Improved the display of SBML2SBML conversion errors. Modified Paths: -------------- trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java Modified: trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2018-06-20 15:20:36 UTC (rev 736) +++ trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2020-03-10 15:03:17 UTC (rev 737) @@ -32,6 +32,7 @@ import org.sbfc.converter.models.GeneralModel; import org.sbfc.converter.models.SBMLModel; import org.sbml.jsbml.SBMLDocument; +import org.sbml.libsbml.OStringStream; import org.sbml.libsbml.SBMLReader; import org.sbml.libsbml.SBMLWriter; import org.sbml.libsbml.libsbmlConstants; @@ -151,7 +152,11 @@ if (!isSetLVSuccesfull) { System.out.println("SBML2SBML - Conversion was not possible, here are the errors returned by libSBML:"); libSBMLdoc.printErrors(); - throw new ConversionException("The LibSBML conversion failed, it detected '" + libSBMLdoc.getNumErrors(libsbmlConstants.LIBSBML_SEV_ERROR) + "' potential problems."); + OStringStream libsbmlOStream = new OStringStream(); + libSBMLdoc.printErrors(libsbmlOStream); + throw new ConversionException("The LibSBML conversion failed, it detected '" + libSBMLdoc.getNumErrors(libsbmlConstants.LIBSBML_SEV_ERROR) + "' potential problems." + + "\n\nBefore attempting again to convert your model, check that it is valid SBML at http://sbml.org/Facilities/Validator.\n" + + "\nBelow is the list of errors:\n" + libsbmlOStream.str()); } org.sbml.libsbml.SBMLWriter libSBMLWriter = new SBMLWriter(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2018-06-20 15:20:38
|
Revision: 736 http://sourceforge.net/p/sbfc/code/736 Author: niko-rodrigue Date: 2018-06-20 15:20:36 +0000 (Wed, 20 Jun 2018) Log Message: ----------- updated jar file. Modified Paths: -------------- trunk/lib/sbfc-1.3.8-SNAPSHOT.jar 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-06-20 15:17:50
|
Revision: 735 http://sourceforge.net/p/sbfc/code/735 Author: niko-rodrigue Date: 2018-06-20 15:17:49 +0000 (Wed, 20 Jun 2018) Log Message: ----------- removed wrong/unused imports. 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-06-20 14:00:35 UTC (rev 734) +++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2018-06-20 15:17:49 UTC (rev 735) @@ -19,7 +19,6 @@ import org.biopax.paxtools.model.level3.Gene; import org.biopax.paxtools.model.level3.GeneticInteraction; import org.biopax.paxtools.model.level3.Interaction; -import org.biopax.paxtools.model.level3.Modulation; import org.biopax.paxtools.model.level3.MolecularInteraction; import org.biopax.paxtools.model.level3.NucleicAcid; import org.biopax.paxtools.model.level3.Pathway; @@ -48,8 +47,6 @@ import org.sbml.jsbml.ext.comp.SBaseRef; import org.sbml.jsbml.ext.comp.Submodel; -import sun.font.PhysicalStrike; - /** * Perform conversion from a SBML Document to a BioPAX Model. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2018-06-20 14:00:37
|
Revision: 734 http://sourceforge.net/p/sbfc/code/734 Author: niko-rodrigue Date: 2018-06-20 14:00:35 +0000 (Wed, 20 Jun 2018) Log Message: ----------- Gene cannot be converted into PhysicalEntity. In few biomdels models we had the case where Gene were present in a Conversion that accept only PhysicalEntity. For the moment, I just removed the participant until we found a proper solution. 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-06-20 13:31:50 UTC (rev 733) +++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2018-06-20 14:00:35 UTC (rev 734) @@ -48,6 +48,8 @@ import org.sbml.jsbml.ext.comp.SBaseRef; import org.sbml.jsbml.ext.comp.Submodel; +import sun.font.PhysicalStrike; + /** * Perform conversion from a SBML Document to a BioPAX Model. * @@ -452,15 +454,19 @@ if (interaction instanceof Conversion) { Conversion conversion = (Conversion) interaction; - if(isLeft) + + // TODO - if one of the participant is a Gene, we should not have a Conversion + // as Gene is an Entity but not a PhysicalEntity. Biomdels models 411, 466, 468 are in this case. + + if (isLeft && entity instanceof PhysicalEntity) { - conversion.addLeft((PhysicalEntity) entity); + conversion.addLeft((PhysicalEntity) entity); } - else + else if (entity instanceof PhysicalEntity) { conversion.addRight((PhysicalEntity) entity); } - if(!Double.isNaN(speciesRef.getStoichiometry())) + if (!Double.isNaN(speciesRef.getStoichiometry()) && entity instanceof PhysicalEntity) { parseStoichiometry(reaction, speciesRef, conversion, sbmlModel, bpModel, submodelId); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nik...@us...> - 2018-06-20 13:31:54
|
Revision: 733 http://sourceforge.net/p/sbfc/code/733 Author: niko-rodrigue Date: 2018-06-20 13:31:50 +0000 (Wed, 20 Jun 2018) Log Message: ----------- removed the creation of the BioPAX EntityReference from the annotations as it could be different than the sboTerm in some case, we will re-structure it to try to guess an SBOTerm from the annotations. Modified Paths: -------------- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAXannotationParameter.java trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAXannotationParameter.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAXannotationParameter.java 2018-06-20 09:31:25 UTC (rev 732) +++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAXannotationParameter.java 2018-06-20 13:31:50 UTC (rev 733) @@ -49,9 +49,6 @@ * @author ahenry * @author rodrigue */ - -// TODO : Fix/Patch the code to be able to use only one SBML2BioPAXannotationParameter class instead of two. - public class SBML2BioPAXannotationParameter { /** Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java =================================================================== --- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2018-06-20 09:31:25 UTC (rev 732) +++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2018-06-20 13:31:50 UTC (rev 733) @@ -601,15 +601,19 @@ * 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); - } - } - } + HashSet<XReferrable> ers = new HashSet<XReferrable>(); // TODO - not good. There could some very common annotation in the list, + // TODO we should first try to see if there is a main annotation like chebi or uniprot + // TODO we should use SBO first so if the ers found from annotation is not of the type indicated by the SBO, we need to create a new one ? + // TODO we should use annotation in the parent method to find out an SBO term ! + +// 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()) { @@ -799,6 +803,7 @@ // TODO - if SBOTerm is null, try to guess an SBOTerm from the annotations like before + if(SBO.isChildOf(speciesSBOValue, SBO.getGene())) { entity = convertSpeciesToE(bpModel, Gene.class, species); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |