|
From: <tra...@us...> - 2016-07-14 07:13:10
|
Revision: 671
http://sourceforge.net/p/sbfc/code/671
Author: tramy-nguyen
Date: 2016-07-14 07:13:05 +0000 (Thu, 14 Jul 2016)
Log Message:
-----------
Added the following changes for the SBML2BioPAX Converter:
- Implement SBML2BioPAX to support parsing of GeneticInteraction, TemplateReaction, and MolecularInteraction and remaining Conversion Interaction that are not supported in Arman's converter.
- Expanded parsing for reactants, products, and modifiers to support newly added parsing of Interactions
- Added missing SBO terms parsing for PhysicalEntity
- Added missing SBO terms parsing for Interactions
- Added missing SBO terms parsing for ControlType
- Added new OWL files to prepare testing in InteractionTest.java along with cleaning up testing methods
- Added javadoc on some of the methods in SBML2BioPAXConverter.java
Modified Paths:
--------------
trunk/src/org/sbfc/converter/biopax2sbml/BioPAX2SBML.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java
trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
trunk/test/org/sbfc/test/biopax2sbml/InteractionTests.java
Added Paths:
-----------
trunk/test/org/sbfc/test/resources/AKT_Signaling_Pathway.owl
trunk/test/org/sbfc/test/resources/INOH_GPCR_signaling-pertussis_toxin-.owl
trunk/test/org/sbfc/test/resources/NetPath_1.owl
trunk/test/org/sbfc/test/resources/biopax3-template-reaction.owl
Modified: trunk/src/org/sbfc/converter/biopax2sbml/BioPAX2SBML.java
===================================================================
--- trunk/src/org/sbfc/converter/biopax2sbml/BioPAX2SBML.java 2016-07-12 06:36:23 UTC (rev 670)
+++ trunk/src/org/sbfc/converter/biopax2sbml/BioPAX2SBML.java 2016-07-14 07:13:05 UTC (rev 671)
@@ -278,8 +278,6 @@
sbmlModel.setName(sbmlModelName);
}
- //TODO: a metaId must be used if MIRIAM annotation is used for annotation
- // sbmlModel.setMetaId("meta_" + pathway.toString());
sbmlModel.setTimeUnits(UnitDefinition.TIME);
sbmlModel.setVolumeUnits(UnitDefinition.VOLUME);
sbmlModel.setSubstanceUnits(UnitDefinition.SUBSTANCE);
@@ -350,7 +348,8 @@
SimplePhysicalEntity simplePhysicalEntity = (SimplePhysicalEntity) physicalEntity;
if(simplePhysicalEntity.getEntityReference() != null)
{
- parseEntityReference(simplePhysicalEntity.getEntityReference(), species);
+ //TODO: Implement EntityReference as SBML annotations by using SBML group
+ //parseEntityReference(simplePhysicalEntity.getEntityReference(), species);
}
}
}
@@ -436,7 +435,7 @@
else if(xref instanceof UnificationXref)
{
UnificationXref unificationXref = (UnificationXref) xref;
- cvtermList.add(setXrefId(unificationXref, Qualifier.BQM_IS));
+ cvtermList.add(setXrefId(unificationXref, Qualifier.BQB_IS));
}
else
{
@@ -763,25 +762,6 @@
return sbmlSpecies;
}
- //TODO: Determine if this method should be used when metaId is used
- private boolean isValidSBMLmetaId(String metaId)
- {
- if(!isLetter(metaId.charAt(0)) && metaId.charAt(0) != '_' && metaId.charAt(0) != ':' )
- {
- return false;
- }
- for (int i = 1; i < metaId.length(); i++)
- {
- //TODO: finish up this check for combining char and extender
- if(!isLetter(metaId.charAt(i)) && !isDigit(metaId.charAt(i)) &&
- metaId.charAt(i) != '.' && metaId.charAt(i) != '-' && metaId.charAt(i) != '_' && metaId.charAt(i) != ':')
- {
- return false;
- }
- }
- return true;
- }
-
/**
* Return an existing compartment from the given SBML model or create a new compartment if the given entity has a valid cellularLocation element.
* If the entity does not have any cellularLocation or the cellularLocation property is not
@@ -1034,7 +1014,6 @@
entityList.add(p);
}
}
- //TODO: what about entityList? how to handle that? If entityList is not empty, create modifier?
if(dnaList.size() > 0 && proteinList.size() >0 && rnaList.size() == 0 && entityList.size() == 0)
{
/*
@@ -1044,8 +1023,6 @@
for(Dna dna : dnaList)
{
ModifierSpeciesReference modifierSpeciesRef = getModifierSpeciesReference(dna);
-
- modifierSpeciesRef.setSBOTerm(SBO.getDNA()); //TODO: CLARIFY
reaction.addModifier(modifierSpeciesRef);
}
for(Protein protein : proteinList)
@@ -1064,7 +1041,6 @@
for(Dna dna : dnaList)
{
ModifierSpeciesReference modifierSpeciesRef = getModifierSpeciesReference(dna);
- modifierSpeciesRef.setSBOTerm(SBO.getDNA()); //TODO: CLARIFY
reaction.addModifier(modifierSpeciesRef);
}
for(Rna rna : rnaList)
@@ -1083,7 +1059,6 @@
for(Rna rna : rnaList)
{
ModifierSpeciesReference modifierSpeciesRef = getModifierSpeciesReference(rna);
- modifierSpeciesRef.setSBOTerm(SBO.getRNA()); //TODO: CLARIFY
reaction.addModifier(modifierSpeciesRef);
}
for(Protein protein : proteinList)
@@ -1102,7 +1077,6 @@
for(Dna dna : dnaList)
{
ModifierSpeciesReference modifierSpeciesRef = getModifierSpeciesReference(dna);
- modifierSpeciesRef.setSBOTerm(SBO.getDNA()); //TODO: CLARIFY
reaction.addModifier(modifierSpeciesRef);
}
for(Rna rna : rnaList)
@@ -1138,15 +1112,14 @@
}
}
- private void parseGeneticInteraction(GeneticInteraction molecularInteraction, Reaction reaction) throws ConversionException
+ private void parseGeneticInteraction(GeneticInteraction geneticInteraction, Reaction reaction) throws ConversionException
{
- Set<Entity> participants = molecularInteraction.getParticipant();
+ Set<Entity> participants = geneticInteraction.getParticipant();
for(Entity p : participants)
{
if(p instanceof Gene)
{
ModifierSpeciesReference modifierSpeciesRef = getModifierSpeciesReference(p);
- modifierSpeciesRef.setSBOTerm(SBO.getGene()); //TODO: confirm
reaction.addModifier(modifierSpeciesRef);
}
else
@@ -1527,9 +1500,6 @@
{
reaction.setName(reactionName);
}
- //TODO: Leave metaId until annotations are being used.
- // reaction.setMetaId("meta_" + entity.getRDFId());
-
/* Default settings for sbml reaction required attributes
* setFast(false) :
* Indicate fast reaction
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2016-07-12 06:36:23 UTC (rev 670)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXConverter.java 2016-07-14 07:13:05 UTC (rev 671)
@@ -10,12 +10,17 @@
import org.biopax.paxtools.model.level3.Conversion;
import org.biopax.paxtools.model.level3.Dna;
import org.biopax.paxtools.model.level3.DnaRegion;
+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.MolecularInteraction;
import org.biopax.paxtools.model.level3.Pathway;
import org.biopax.paxtools.model.level3.PhysicalEntity;
import org.biopax.paxtools.model.level3.Protein;
import org.biopax.paxtools.model.level3.Rna;
import org.biopax.paxtools.model.level3.RnaRegion;
import org.biopax.paxtools.model.level3.SmallMolecule;
+import org.biopax.paxtools.model.level3.TemplateReaction;
import org.sbml.jsbml.ListOf;
import org.sbml.jsbml.ModifierSpeciesReference;
import org.sbml.jsbml.Reaction;
@@ -24,16 +29,18 @@
import org.sbml.jsbml.Species;
import org.sbml.jsbml.SpeciesReference;
+
public class SBML2BioPAXConverter {
private static Log log = LogFactory.getLog(SBML2BioPAXConverter.class);
private SBML2BioPAXUtilities sbml2BioPAXUtilities = new SBML2BioPAXUtilities();
public Model convert(SBMLDocument sbmlDocument)
{
-// return convert(sbmlDocument.getModel());
+ // return convert(sbmlDocument.getModel());
return convert2(sbmlDocument.getModel());
}
+ /*
private Model convert(org.sbml.jsbml.Model sbmlModel) {
log.debug("First thing first: create a BioPAX model");
Model bpModel = sbml2BioPAXUtilities.createModel();
@@ -104,6 +111,7 @@
return bpModel;
}
+ */
private Model convert2(org.sbml.jsbml.Model sbmlModel) {
log.debug("First thing first: create a BioPAX model");
@@ -113,75 +121,120 @@
Pathway pathway = sbml2BioPAXUtilities.convertPathway(bpModel, sbmlModel);
// Species -> PhysicalEntities [start]
- ListOf<Species> sbmlSpecies = sbmlModel.getListOfSpecies();
- log.debug("There are " + sbmlSpecies.size() + " reactions in the SBML model. ");
+ log.debug("There are " + sbmlModel.getNumSpecies() + " reactions in the SBML model. ");
+ parseSpecies(sbmlModel.getListOfSpecies(), bpModel);
+
+ // Reactions -> Conversions [start]
+ log.debug("There are " + sbmlModel.getNumReactions() + " reactions in the SBML model. ");
+ log.debug("Let's iterate over reactions and convert them one by one.");
+ parseReactions(sbmlModel.getListOfReactions(), sbmlModel, bpModel, pathway);
+
+ // The process above leaves some of the complexes empty. We need to fix this.
+ sbml2BioPAXUtilities.fillComplexes(bpModel, sbmlModel);
+
+ // Let's assign organism to every possible entity
+ sbml2BioPAXUtilities.assignOrganism(bpModel);
+
+ // Some references do not have relationship entities in them
+ // Let's assign biomodels model id for them
+ sbml2BioPAXUtilities.assignRelationXrefs(bpModel);
+
+
+ return bpModel;
+ }
+
+ private void parseSpecies(ListOf<Species> sbmlSpecies, Model bpModel){
for(Species species: sbmlSpecies)
{
- PhysicalEntity physicalEntity = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
+ sbml2BioPAXUtilities.convertSpecies(bpModel, species);
}
+ }
- // Reactions -> Conversions [start]
- ListOf<Reaction> sbmlReactions = sbmlModel.getListOfReactions();
- log.debug("There are " + sbmlReactions.size() + " reactions in the SBML model. ");
- log.debug("Let's iterate over reactions and convert them one by one.");
+ private void parseReactions(ListOf<Reaction> sbmlReactions, org.sbml.jsbml.Model sbmlModel,
+ Model bpModel, Pathway pathway)
+ {
for (Reaction reaction : sbmlReactions) {
log.trace("Working on reaction conversion: " + reaction.getName());
- Conversion conversion = sbml2BioPAXUtilities.convertReaction(bpModel, reaction);
- pathway.addPathwayComponent(conversion);
+ Interaction interaction = sbml2BioPAXUtilities.convertReaction(bpModel, reaction);
+ pathway.addPathwayComponent(interaction);
// Modifiers -> Control reactions [start]
- ListOf<ModifierSpeciesReference> listOfModifiers = reaction.getListOfModifiers();
log.trace(
- "- There are " + listOfModifiers.size() + " modifiers to this reaction. " +
+ "- There are " + reaction.getNumModifiers() + " modifiers to this reaction. " +
"Converting them to controls to this reaction."
);
+ parseModifier(sbmlModel, reaction, bpModel, interaction, pathway);
- for (ModifierSpeciesReference modifierSpeciesReference : listOfModifiers) {
- Control control = sbml2BioPAXUtilities.convertModifier(bpModel, modifierSpeciesReference);
- pathway.addPathwayComponent(control);
- control.addControlled(conversion);
- Species species = sbmlModel.getSpecies(modifierSpeciesReference.getSpecies());
- Controller controller = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
- control.addController(controller);
- }
- // Modifiers -> Controls [end]
-
- // Reactants -> Left Participants [start]
- ListOf<SpeciesReference> listOfReactants = reaction.getListOfReactants();
- log.trace("- There are " + listOfReactants.size() + " reactants to this reaction. " +
+ // Reactants -> Left Participants [start]
+ log.trace("- There are " + reaction.getNumReactants() + " reactants to this reaction. " +
"Adding them to the reaction as left participants.");
- for (SpeciesReference reactantRef : listOfReactants) {
- Species species = sbmlModel.getSpecies(reactantRef.getSpecies());
- PhysicalEntity physicalEntity = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
- conversion.addLeft(physicalEntity);
- }
+ parseSpeciesReference(sbmlModel, reaction.getListOfReactants(), bpModel, interaction, false);
// Reactants -> Left Participants [end]
- // Products -> Right Participants [start]
- ListOf<SpeciesReference> listOfProducts = reaction.getListOfProducts();
- log.trace("- There are " + listOfProducts.size() + " products to this reaction. " +
+ // Products -> Right Participants [start]
+ log.trace("- There are " + reaction.getNumProducts() + " products to this reaction. " +
"Adding them to the reaction as right participants.");
- for (SpeciesReference productRef : listOfProducts) {
- Species species = sbmlModel.getSpecies(productRef.getSpecies());
- PhysicalEntity physicalEntity = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
- conversion.addRight(physicalEntity);
- }
+ parseSpeciesReference(sbmlModel, reaction.getListOfProducts(), bpModel, interaction, true);
// Products -> Right Participants [end]
}
// Reactions -> Conversions [end]
+ }
- // The process above leaves some of the complexes empty. We need to fix this.
- sbml2BioPAXUtilities.fillComplexes(bpModel, sbmlModel);
-
- // Let's assign organism to every possible entity
- sbml2BioPAXUtilities.assignOrganism(bpModel);
-
- // Some references do not have relationship entities in them
- // Let's assign biomodels model id for them
- sbml2BioPAXUtilities.assignRelationXrefs(bpModel);
-
-
- return bpModel;
+ private void parseModifier(org.sbml.jsbml.Model sbmlModel, Reaction reaction,
+ Model bpModel, Interaction interaction, Pathway pathway)
+ {
+ ListOf<ModifierSpeciesReference> listOfModifiers = reaction.getListOfModifiers();
+ for(ModifierSpeciesReference modifier : listOfModifiers)
+ {
+ if(interaction instanceof GeneticInteraction)
+ {
+ Species species = sbmlModel.getSpecies(modifier.getSpecies());
+ Gene gene = sbml2BioPAXUtilities.createGeneFromSpecies(bpModel, species);
+ interaction.addParticipant(gene);
+ }
+ else if(interaction instanceof TemplateReaction)
+ {
+ Species species = sbmlModel.getSpecies(modifier.getSpecies());
+ PhysicalEntity physicalEntity = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
+ if(physicalEntity instanceof Dna || physicalEntity instanceof Rna || physicalEntity instanceof Protein)
+ {
+ interaction.addParticipant(physicalEntity);
+ }
+ }
+ else {
+ Control control = sbml2BioPAXUtilities.convertModifier(bpModel, modifier);
+ pathway.addPathwayComponent(control);
+ control.addControlled(interaction);
+ Species species = sbmlModel.getSpecies(modifier.getSpecies());
+ Controller controller = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
+ control.addController(controller);
+ }
+ // Modifiers -> Controls [end]
+ }
}
-
+
+ private void parseSpeciesReference(org.sbml.jsbml.Model sbmlModel, ListOf<SpeciesReference> listOfSpeciesReferences,
+ Model bpModel, Interaction interaction, boolean isProduct)
+ {
+ // Reactants -> Left Participants [start]
+
+ for (SpeciesReference speciesRef : listOfSpeciesReferences) {
+ Species species = sbmlModel.getSpecies(speciesRef.getSpecies());
+ PhysicalEntity physicalEntity = sbml2BioPAXUtilities.convertSpecies(bpModel, species);
+ if(interaction instanceof Conversion){
+ Conversion conversion = (Conversion) interaction;
+ if(isProduct)
+ {
+ conversion.addRight(physicalEntity);
+ }
+ else
+ {
+ conversion.addLeft(physicalEntity);
+ }
+ }
+ else if(interaction instanceof GeneticInteraction || interaction instanceof MolecularInteraction){
+ interaction.addParticipant(physicalEntity);
+ }
+ }
+ }
}
\ No newline at end of file
Modified: trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2016-07-12 06:36:23 UTC (rev 670)
+++ trunk/src/org/sbfc/converter/sbml2biopax/arman/SBML2BioPAXUtilities.java 2016-07-14 07:13:05 UTC (rev 671)
@@ -30,6 +30,10 @@
import org.biopax.paxtools.model.level3.DnaRegion;
import org.biopax.paxtools.model.level3.DnaRegionReference;
import org.biopax.paxtools.model.level3.EntityReference;
+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.MolecularInteraction;
import org.biopax.paxtools.model.level3.Named;
import org.biopax.paxtools.model.level3.Pathway;
import org.biopax.paxtools.model.level3.PhysicalEntity;
@@ -44,6 +48,7 @@
import org.biopax.paxtools.model.level3.SimplePhysicalEntity;
import org.biopax.paxtools.model.level3.SmallMolecule;
import org.biopax.paxtools.model.level3.SmallMoleculeReference;
+import org.biopax.paxtools.model.level3.TemplateReaction;
import org.biopax.paxtools.model.level3.Transport;
import org.biopax.paxtools.model.level3.TransportWithBiochemicalReaction;
import org.biopax.paxtools.model.level3.UnificationXref;
@@ -90,6 +95,13 @@
return getXMLBase() + partialId;
}
+ /**
+ * Convert an SBML model to a biopax pathway.
+ *
+ * @param bpModel - The biopax model to store the Pathway that was converted from the given SBML Model.
+ * @param sbmlModel - The SBML Model to be converted to a BioPAX Interaction
+ * @return
+ */
public Pathway convertPathway(Model bpModel, org.sbml.jsbml.Model sbmlModel) {
Pathway pathway = createBPEfromSBMLE(bpModel, Pathway.class, sbmlModel);
for (Xref xref : generateXrefsForSBase(bpModel, RelationshipXref.class, sbmlModel)) {
@@ -105,47 +117,100 @@
return model;
}
- public Conversion convertReaction(Model bpModel, Reaction reaction) {
- Class<? extends Conversion> rxnClass;
+ /**
+ * Convert a SBML reaction to a BioPAX interaction.
+ *
+ * @param bpModel - The BioPAX Model to store the Interaction that was converted from the given SBML Reaction.
+ * @param reaction - The SBML Reaction to be converted to a BioPAX Interaction
+ * @return The converted BioPAX Interaction
+ */
+ public Interaction convertReaction(Model bpModel, Reaction reaction) {
+ Class<? extends Conversion> rxnClass = null;
+
+ Class<? extends Interaction> reactionClass = null;
+
+ boolean isConversionSet = false;
+
// Extend this switch with further SBO terms as needed
switch (reaction.getSBOTerm()) {
+ case 589:
+ reactionClass = TemplateReaction.class;
+ break;
+ case 343:
+ reactionClass = GeneticInteraction.class;
+ break;
+ case 344:
+ reactionClass = MolecularInteraction.class;
+ break;
+ case 231:
+ reactionClass = Interaction.class;
+ break;
case 177: //Complex Assembly
rxnClass = ComplexAssembly.class;
+ isConversionSet = true;
break;
case 176: // Biochemical reaction
rxnClass = BiochemicalReaction.class;
+ isConversionSet = true;
break;
case 167: // Transport With Biochemical Reaction
rxnClass = TransportWithBiochemicalReaction.class;
+ isConversionSet = true;
break;
case 185: // Transport reaction
rxnClass = Transport.class;
+ isConversionSet = true;
break;
case 179: // Degradation
rxnClass = Degradation.class;
+ isConversionSet = true;
break;
case 182: // Conversion
rxnClass = Conversion.class;
+ isConversionSet = true;
break;
- default: //Conversion
- rxnClass = Conversion.class;
+ default:
+ reactionClass = Interaction.class;
break;
}
- Conversion conversion = createBPEfromSBMLE(bpModel, rxnClass, reaction);
- conversion.setConversionDirection(
- reaction.getReversible()
- ? ConversionDirectionType.REVERSIBLE
- : ConversionDirectionType.LEFT_TO_RIGHT
- );
+ if(isConversionSet)
+ {
+ Conversion conversion = createBPEfromSBMLE(bpModel, rxnClass, reaction);
+ conversion.setConversionDirection(
+ reaction.getReversible()
+ ? ConversionDirectionType.REVERSIBLE
+ : ConversionDirectionType.LEFT_TO_RIGHT
+ );
+ return setXref(bpModel, reaction, conversion);
+ }
+ Interaction interaction = createBPEfromSBMLE(bpModel, reactionClass, reaction);
+ return setXref(bpModel, reaction, interaction);
+ }
+
+ /**
+ * Set xref to the BioPAX Interaction in the BioPAX Model based on the SBML Reaction.
+ *
+ * @param bpModel - The BioPAX Model to set the xref information
+ * @param reaction - The SBML reaction to retrieve xref information
+ * @param interaction - The BioPAX Interaction to add the xref information to
+ * @return The BioPAX Interaction that xref was added to
+ */
+ public Interaction setXref(Model bpModel, Reaction reaction, Interaction interaction)
+ {
for (Xref xref : generateXrefsForSBase(bpModel, RelationshipXref.class, reaction)) {
- conversion.addXref(xref);
+ interaction.addXref(xref);
}
-
- return conversion;
+ return interaction;
}
-
+
+ /**
+ * Provide the SBML SBase element with a given name
+ *
+ * @param namedSBase - The SBML SBase element to set the name
+ * @param named - The name to give the SBML SBase element
+ */
public void setNames(AbstractNamedSBase namedSBase, Named named) {
String name = namedSBase.getName();
if(name == null || name.toLowerCase().equals("null")) {
@@ -156,12 +221,50 @@
named.getName().add(name);
}
+ /**
+ * Convert a SBML ModifierSpeciesReference to a BioPAX Control Interaction.
+ *
+ * @param bpModel - The BioPAX Model to store the Control Interaction that was converted from the given SBML ModifierSpeciesReference.
+ * @param modifierSpeciesReference - The SBML ModifierSpeciesReference to be converted to a BioPAX Control Interaction
+ * @return The converted BioPAX Control Interaction
+ */
public Control convertModifier(Model bpModel, ModifierSpeciesReference modifierSpeciesReference) {
// Interesting enough, these reference objects don't have an ID associated with them
// That is why we are using hashcodes to generate unique BioPAX ID.
- String id = completeId("control_" + modifierSpeciesReference.hashCode());
+ String id = completeId("control_" + modifierSpeciesReference.getId());
Control control = createBPEfromSBMLE(bpModel, Control.class, modifierSpeciesReference, id);
- control.setControlType(ControlType.ACTIVATION);
+
+ //TODO: add terms for Inhibition irreversible, Inhibition allosteric
+ switch (modifierSpeciesReference.getSBOTerm()) {
+ case 13: // Catalysis
+ control.setControlType(ControlType.ACTIVATION);
+ break;
+ case 459: // Activation
+ control.setControlType(ControlType.ACTIVATION);
+ break;
+ case 21: // Activation allosteric
+ control.setControlType(ControlType.ACTIVATION_ALLOSTERIC);
+ break;
+ case 462: // Activation nonallosteric
+ control.setControlType(ControlType.ACTIVATION_NONALLOSTERIC);
+ break;
+ case 20: // TODO: Inhibition and Inhibition other
+ control.setControlType(ControlType.INHIBITION);
+ break;
+ case 207: // TODO: Inhibition noncompetitive and Inhibition uncompetitive
+ control.setControlType(ControlType.INHIBITION_NONCOMPETITIVE);
+ break;
+ case 206: // Inhibition competitive
+ control.setControlType(ControlType.INHIBITION_COMPETITIVE);
+ break;
+ case 596: // TODO: get controlType for this sbo term Modifier Unknown Activity
+ control.setControlType(ControlType.INHIBITION_COMPETITIVE);
+ break;
+ default: // TODO: get controlType for this sbo term Modifier Unknown Activity
+ control.setControlType(ControlType.ACTIVATION);
+ break;
+ }
+
return control;
}
@@ -256,10 +359,11 @@
}
/**
- * Convert SBML species to BioPAX physical entity
- * @param bpModel
- * @param species
- * @return
+ * Convert SBML Species to BioPAX Physical Entity
+ *
+ * @param bpModel - The BioPAX Model to store the Physical Entity that was converted from the given SBML Species.
+ * @param species - The SBML Species to be converted to a BioPAX Physical Entities
+ * @return The converted BioPAX Physical Entity
*/
public PhysicalEntity convertSpecies(Model bpModel, Species species) {
PhysicalEntity physicalEntity;
@@ -294,6 +398,13 @@
return physicalEntity;
}
+ /**
+ * Convert SBML Compartment to BioPAX CellularLocationVocabulary
+ *
+ * @param bpModel - The BioPAX Model to store the CellularLocationVocabulary that was converted from the given SBML Compartments.
+ * @param compartment - The SBML Compartment to be converted to a BioPAX CellularLocationVocabulary
+ * @return The converted BioPAX CellularLocationVocabulary
+ */
public CellularLocationVocabulary createCompartment(Model bpModel, Compartment compartment) {
String id = completeId(compartment.getId());
CellularLocationVocabulary cellularLocationVocabulary = (CellularLocationVocabulary) bpModel.getByID(id);
@@ -309,6 +420,13 @@
return cellularLocationVocabulary;
}
+ /**
+ * Convert SBML Species to BioPAX Complex Physical Entity
+ *
+ * @param bpModel - The BioPAX Model to store the Complex Physical Entity that was converted from the given SBML Species.
+ * @param species - The SBML Species to be converted to a BioPAX Complex Physical Entities
+ * @return The converted BioPAX Complex Physical Entity
+ */
private Complex createComplexFromSpecies(Model bpModel, Species species) {
Complex complex = createBPEfromSBMLE(bpModel, Complex.class, species);
for (Xref xref : generateXrefsForSBase(bpModel, RelationshipXref.class, species)) {
@@ -318,6 +436,22 @@
return complex;
}
+ /**
+ * Convert SBML Species to BioPAX Gene Physical Entity
+ *
+ * @param bpModel - The BioPAX Model to store the Gene that was converted from the given SBML Species.
+ * @param species - The SBML Species to be converted to a BioPAX Gene Entity
+ * @return The converted BioPAX Gene
+ */
+ public Gene createGeneFromSpecies(Model bpModel, Species species) {
+ Gene gene = createBPEfromSBMLE(bpModel, Gene.class, species);
+ for (Xref xref : generateXrefsForSBase(bpModel, UnificationXref.class, species)) {
+ gene.addXref(xref);
+ }
+
+ return gene;
+ }
+
private <T extends Xref> Set<Xref> generateXrefsForSBase(Model bpModel, Class<T> xrefClass, AbstractSBase sBase) {
Annotation annotation = sBase.getAnnotation();
HashSet<Xref> xrefs = new HashSet<Xref>();
Modified: trunk/test/org/sbfc/test/biopax2sbml/InteractionTests.java
===================================================================
--- trunk/test/org/sbfc/test/biopax2sbml/InteractionTests.java 2016-07-12 06:36:23 UTC (rev 670)
+++ trunk/test/org/sbfc/test/biopax2sbml/InteractionTests.java 2016-07-14 07:13:05 UTC (rev 671)
@@ -108,31 +108,8 @@
biopaxModel.setXmlBase("http://www.w3.org/2001/XMLSchema#string");
- //Interaction
-// biopaxModel.add(create_TemplateReaction_22());
-// biopaxModel.add(create_GeneticInteraction_2());
-// biopaxModel.add(create_Mdm2_p73_by_coimmunoprecipitation());
+ createBasicBiopaxElements(biopaxModel);
- //Conversion
- biopaxModel.add(PhysicalEntityTests.createEntity(COMPLEX_ASSEMBLY, "some_ComplexAssembly"));
-
- biopaxModel.add(PhysicalEntityTests.createEntity(BIOCHEMICAL_REACTION, "BiochemicalReaction_1"));
- biopaxModel.add(create_BiochemicalReaction_10());
-
- biopaxModel.add(PhysicalEntityTests.createEntity(TRANSPORT_WITH_BIOCHEMICAL_REACTION, "some_TransportWithBiochemicalReaction"));
- biopaxModel.add(PhysicalEntityTests.createEntity(TRANSPORT, "some_Transport"));
- biopaxModel.add(PhysicalEntityTests.createEntity(DEGRADATION, "some_Degradation"));
- biopaxModel.add(PhysicalEntityTests.createEntity(CONVERSION, "some_Conversion"));
-
-
- //Control
- biopaxModel.add(PhysicalEntityTests.createEntity(CATALYSIS, "some_Catalysis"));
- biopaxModel.add(PhysicalEntityTests.createEntity(MODULATION, "some_Modulation"));
- // biopaxModel.add(create_TemplateReactionRegulation_17());
-
- create_Interactions();
- create_modulationTest();
-
BioPAXModel sbfcBiopaxModel = new BioPAXModel(biopaxModel);
BioPAX2SBML sbml2biopax = new BioPAX2SBML();
@@ -172,111 +149,29 @@
}
- /**
- * Sample GeneticInteraction taken from https://github.com/BioPAX/specification/blob/master/Level3/examples/biopax3-genetic-interaction.owl
- */
- public static GeneticInteraction create_GeneticInteraction_2()
+ public static void createBasicBiopaxElements(Model biopaxModel)
{
- String uri = "GeneticInteraction_2";
- String displayName = "MYO2 - MLC1";
- String standardName = null;
- Set<String> name = null;
+ //Interaction
+ create_InteractionReaction();
+ create_controlInteraction();
- GeneticInteraction geneticInteraction =
- (GeneticInteraction) PhysicalEntityTests.createEntity(GENETIC_INTERACTION, uri);
+ //Conversion
+ biopaxModel.add(PhysicalEntityTests.createEntity(COMPLEX_ASSEMBLY, "some_ComplexAssembly"));
- PhysicalEntityTests.setEntityProperties(geneticInteraction, displayName, standardName, name);
- return geneticInteraction;
- }
+ biopaxModel.add(PhysicalEntityTests.createEntity(BIOCHEMICAL_REACTION, "some_BiochemicalReaction"));
-// /**
-// * Sample MolecularInteraction taken from https://github.com/BioPAX/specification/blob/master/Level3/examples/biopax3-protein-interaction.owl
-// */
-// public static MolecularInteraction create_Mdm2_p73_by_coimmunoprecipitation()
-// {
-// String uri = "Mdm2_p73_by_coimmunoprecipitation";
-// String displayName = "{Mdm2, p73} by coimmunoprecipitation";
-// String standardName = null;
-// Set<String> name = null;
-//
-// MolecularInteraction molecularInteraction =
-// (MolecularInteraction) PhysicalEntityTests.createEntity(MOLECULAR_INTERACTION, uri);
-//
-// PhysicalEntityTests.setEntityProperties(molecularInteraction, displayName, standardName, name);
-// return molecularInteraction;
-// }
+ biopaxModel.add(PhysicalEntityTests.createEntity(TRANSPORT_WITH_BIOCHEMICAL_REACTION, "some_TransportWithBiochemicalReaction"));
+ biopaxModel.add(PhysicalEntityTests.createEntity(TRANSPORT, "some_Transport"));
+ biopaxModel.add(PhysicalEntityTests.createEntity(DEGRADATION, "some_Degradation"));
+ biopaxModel.add(PhysicalEntityTests.createEntity(CONVERSION, "some_Conversion"));
-// /**
-// * Sample TemplateReaction taken from https://github.com/BioPAX/specification/blob/master/Level3/examples/biopax3-template-reaction.owl
-// *
-// * @return
-// */
-// public static TemplateReaction create_TemplateReaction_22()
-// {
-// String uri = "TemplateReaction_22";
-// String displayName = "Eve transcription";
-// String standardName = null;
-// Set<String> name = null;
-//
-// TemplateReaction templateReaction =
-// (TemplateReaction) PhysicalEntityTests.createEntity(TEMPLATE_REACTION, uri);
-//
-// PhysicalEntityTests.setEntityProperties(templateReaction, displayName, standardName, name);
-// return templateReaction;
-// }
-
- /**
- * Sample TemplateReactionRegulation taken from https://github.com/BioPAX/specification/blob/master/Level3/examples/biopax3-template-reaction.owl
- */
- public static TemplateReactionRegulation create_TemplateReactionRegulation_17()
- {
- String uri = "TemplateReactionRegulation_17";
- String displayName = "beta-catenin TCF1 regulates Wnt8";
- String standardName = null;
- Set<String> name = null;
-
- ControlType controlType = ControlType.ACTIVATION;
- String controllerId = "TemplateReaction_1";
- String controlledId = "#Complex_37";
- String interactionType = "#InteractionVocabulary_18";
-
- //TODO: Will not let me create templateReactionTemplate?
- TemplateReactionRegulation tempReactionRegulation =
- (TemplateReactionRegulation) PhysicalEntityTests.createEntity(TEMPLATE_REACTION_REGULATION, uri);
-
- PhysicalEntityTests.setEntityProperties(tempReactionRegulation, displayName, standardName, name);
-
- tempReactionRegulation.setControlType(controlType);
-
- Interaction controlled = (Interaction) PhysicalEntityTests.createEntity(CONTROLLED, controlledId);
- Controller controller = (Controller) PhysicalEntityTests.createEntity(CONTROLLER, controllerId);
-
- tempReactionRegulation.addControlled(controlled);
- tempReactionRegulation.addController(controller);
- return tempReactionRegulation;
+ //Control
+ biopaxModel.add(PhysicalEntityTests.createEntity(CATALYSIS, "some_Catalysis"));
+ biopaxModel.add(PhysicalEntityTests.createEntity(MODULATION, "some_Modulation"));
}
- /**
- * Sample taken from https://github.com/BioPAX/specification/blob/master/Level3/examples/biopax3-insulin-maturation.owl
- */
- public static BiochemicalReaction create_BiochemicalReaction_10()
+ public static void create_InteractionReaction()
{
- String uri = "BiochemicalReaction_10";
- String displayName = "A7-B7 disulfide bond formation";
- String standardName = "Disulfide bond formation between amino acids A7 and B7";
- Set<String> name = null;
- ConversionDirectionType conversionDirection = ConversionDirectionType.LEFT_TO_RIGHT;
-
- BiochemicalReaction biochemicalReaction =
- (BiochemicalReaction) PhysicalEntityTests.createEntity(BIOCHEMICAL_REACTION, uri);
-
- PhysicalEntityTests.setEntityProperties(biochemicalReaction, displayName, standardName, name);
- set_ConversionProperties(biochemicalReaction, conversionDirection);
- return biochemicalReaction;
- }
-
- public static void create_Interactions()
- {
String dnaURI = "dna";
String proteinURI = "protein";
String mrnaURI = "mRNA";
@@ -321,7 +216,7 @@
biopaxModel.add(s2_controlled);
}
- public static void create_modulationTest()
+ public static void create_controlInteraction()
{
Protein S = (Protein) PhysicalEntityTests.createEntity(PhysicalEntityTests.PROTEIN, "S");
Protein E = (Protein) PhysicalEntityTests.createEntity(PhysicalEntityTests.PROTEIN, "E");
@@ -354,81 +249,6 @@
}
- /**
- * Returns the TemplateReaction based on the given RDFId of the TemplateReaction from the given bioPAXModel.
- * null is returned if the given bioPAXModel doesn't contain the specified TemplateReaction
- *
- * @param bioPAXModel - The biopax model that contains the SmallMolecule that you are looking for
- * @param templateReactionURI - The RDFId of the TemplateReaction you are trying to find from the given biopax model
- * @return The TemplateReaction that was found from the biopax model. null is returned if the biopax model does not contain the specified TemplateReaction
- */
- public TemplateReaction get_TemplateReaction(org.biopax.paxtools.model.Model bioPAXModel, String templateReactionURI)
- {
- for(TemplateReaction templateReaction : bioPAXModel.getObjects(TemplateReaction.class))
- {
- if(templateReaction.getRDFId().equals(templateReactionURI))
- return templateReaction;
- }
-
- return null;
- }
-
- /**
- * Returns the TemplateReactionRegulation based on the given RDFId of the TemplateReactionRegulation from the given bioPAXModel.
- * null is returned if the given bioPAXModel doesn't contain the specified TemplateReactionRegulation
- *
- * @param bioPAXModel - The biopax model that contains the SmallMolecule that you are looking for
- * @param templateReactionRegulationURI - The RDFId of the TemplateReactionRegulation you are trying to find from the given biopax model
- * @return The TemplateReactionRegulation that was found from the biopax model. null is returned if the biopax model does not contain the specified TemplateReactionRegulation
- */
- public TemplateReactionRegulation get_TemplateReactionRegulation(org.biopax.paxtools.model.Model bioPAXModel, String templateReactionRegulationURI)
- {
- for(TemplateReactionRegulation templateReactionRegulation : bioPAXModel.getObjects(TemplateReactionRegulation.class))
- {
- if(templateReactionRegulation.getRDFId().equals(templateReactionRegulationURI))
- return templateReactionRegulation;
- }
-
- return null;
- }
-
- /**
- * Set the specified Conversion with the object's given property value(s).
- * Any of the property passed in the method parameter could be null to indicate that
- * the property does not have to be set but the Conversion must be provided.
- *
- * @param conversion - The Conversion object you want to set the properties to
- * @param conversionDir - The conversionDir you want this entity object to be
- */
- public static void set_ConversionProperties(Conversion conversion, ConversionDirectionType conversionDir)
- {
- /*
- * TODO: Dropped properties
- * conversion.addLeft(arg0);
- * conversion.addRight(arg0);
- */
- if(conversionDir != null)
- {
- conversion.setConversionDirection(conversionDir);
- }
- }
-
- /**
- * Set the specified interaction with the object's given property value(s).
- * Any of the property passed in the method parameter could be null to indicate that
- * the property does not have to be set but the interaction must be provided.
- *
- * @param interaction - The interaction object you want to set the properties to
- */
- public static void set_InteractionProperties(Interaction interaction)
- {
- /*
- * TODO: Dropped properties
- * interaction.addInteractionType(arg0);
- * interaction.addParticipant(arg0);
- */
- }
-
public static SBMLModel read_biopaxFile(String owlFile)
{
/*Creates the model Factory*/
@@ -473,7 +293,7 @@
}
return biopax2sbmlModel;
}
-
+
public void printSBMLModel(SBMLModel sbfcSBMLModel)
{
try
@@ -487,123 +307,36 @@
}
}
- /**
- *
- */
- @Before public void setUp() {}
-
-// @Test public void test_TemplateReaction_22()
-// {
-// org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-//
-// Assert.assertTrue(sbmlModel.containsReaction("TemplateReaction_22"));
-// Reaction templateReaction = sbmlModel.getReaction("TemplateReaction_22");
-//
-// Assert.assertTrue(templateReaction.getName().equals("Eve transcription"));
-// Assert.assertFalse(templateReaction.isFast());
-// // Assert.assertTrue(templateReaction.getSBOTerm() == SBO.getTemplateReaction());
-// }
-
-// @Test public void test_GeneticInteraction_2()
-// {
-// org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-//
-// Assert.assertTrue(sbmlModel.containsReaction("GeneticInteraction_2"));
-// Reaction geneticInteraction = sbmlModel.getReaction("GeneticInteraction_2");
-//
-// Assert.assertTrue(geneticInteraction.getName().equals("MYO2 - MLC1"));
-// Assert.assertFalse(geneticInteraction.isFast());
-// Assert.assertTrue(geneticInteraction.getSBOTerm() == SBO.getGeneticInteraction());
-// }
-
-// @Test public void test_MolecularInteraction()
-// {
-// org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-//
-// Assert.assertTrue(sbmlModel.containsReaction("Mdm2_p73_by_coimmunoprecipitation"));
-// Reaction geneticInteraction = sbmlModel.getReaction("Mdm2_p73_by_coimmunoprecipitation");
-//
-// Assert.assertTrue(geneticInteraction.getName().equals("{Mdm2, p73} by coimmunoprecipitation"));
-// Assert.assertFalse(geneticInteraction.isFast());
-// Assert.assertTrue(geneticInteraction.getSBOTerm() == SBO.getMolecularInteraction());
-// }
-
- @Test public void Test_tempReactionRegTest17()
+ @Test public void test_BasicBiopaxElements()
{
- org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
- //TODO
- // Assert.assertTrue(sbmlModel.containsReaction("TemplateReactionRegulation_17"));
- // Reaction tempReactReg = sbmlModel.getReaction("TemplateReactionRegulation_17");
- // Assert.assertTrue(tempReactReg.getSBOTerm() == SBO.getTemplateReactionRegulation());
- }
-
- @Test public void test_BiochemicalReaction_10()
- {
org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
- Assert.assertTrue(sbmlModel.containsReaction("BiochemicalReaction_10"));
- Reaction biochemicalReaction = sbmlModel.getReaction("BiochemicalReaction_10");
-
- Assert.assertTrue(biochemicalReaction.getName().equals("A7-B7 disulfide bond formation"));
- Assert.assertFalse(biochemicalReaction.isFast());
- Assert.assertTrue(biochemicalReaction.getSBOTerm() == SBO.getBiochemicalReaction());
- }
-
- @Test public void test_ComplexAssembly()
- {
- org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
Assert.assertTrue(sbmlModel.containsReaction("some_ComplexAssembly"));
Reaction complexAssembly = sbmlModel.getReaction("some_ComplexAssembly");
Assert.assertTrue(complexAssembly.getSBOTerm() == SBO.getComplexAssembly());
- }
- @Test public void test_BiochemicalReaction()
- {
- org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
- Assert.assertTrue(sbmlModel.containsReaction("BiochemicalReaction_1"));
- Reaction biochemicalReaction = sbmlModel.getReaction("BiochemicalReaction_1");
+ Assert.assertTrue(sbmlModel.containsReaction("some_BiochemicalReaction"));
+ Reaction biochemicalReaction = sbmlModel.getReaction("some_BiochemicalReaction");
Assert.assertTrue(biochemicalReaction.getSBOTerm() == SBO.getBiochemicalReaction());
- }
- @Test public void test_TransportWithBiochemicalReaction()
- {
- org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
Assert.assertTrue(sbmlModel.containsReaction("some_TransportWithBiochemicalReaction"));
Reaction transBiochemReact = sbmlModel.getReaction("some_TransportWithBiochemicalReaction");
- // Assert.assertTrue(transBiochemReact.getSBOTerm() == SBO.getTransportWithBiochemicalReaction()); //TODO
- }
+// Assert.assertTrue(transBiochemReact.getSBOTerm() == SBO.getTransportWithBiochemicalReaction()); //TODO
- @Test public void test_Transport()
- {
- org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
Assert.assertTrue(sbmlModel.containsReaction("some_Transport"));
Reaction transport = sbmlModel.getReaction("some_Transport");
Assert.assertTrue(transport.getSBOTerm() == SBO.getTransport());
- }
- @Test public void test_Degradation()
- {
- org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
Assert.assertTrue(sbmlModel.containsReaction("some_Degradation"));
Reaction degradation = sbmlModel.getReaction("some_Degradation");
Assert.assertTrue(degradation.getSBOTerm() == SBO.getDegradation());
- }
- @Test public void test_Conversion()
- {
- org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
Assert.assertTrue(sbmlModel.containsReaction("some_Conversion"));
Reaction conversion = sbmlModel.getReaction("some_Conversion");
Assert.assertTrue(conversion.getSBOTerm() == SBO.getConversion());
}
- @Test public void test_templateReaction()
+ @Test public void test_InteractionReaction()
{
org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
@@ -626,7 +359,7 @@
}
- @Test public void test_Modulation()
+ @Test public void test_ControlInteraction()
{
org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
@@ -650,7 +383,7 @@
Assert.assertFalse(true);
}
}
-// printSBMLModel(sbfcSBMLModel);
+ //printSBMLModel(sbfcSBMLModel);
}
@Test public void test_BiochemicalReactionFile()
@@ -659,15 +392,15 @@
SBMLModel sbfcSBMLModel = read_biopaxFile(owlFile);
org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
+
Assert.assertTrue(sbmlModel.getNumSpecies() == 5);
-
+
Assert.assertTrue(sbmlModel.containsSpecies("Protein_5"));
Species protein = sbmlModel.getSpecies("Protein_5");
Assert.assertTrue(protein.getId().equals("Protein_5"));
Assert.assertTrue(protein.getName().equals("CHK2"));
Assert.assertTrue(protein.getCompartment().equals("CellularLocationVocabulary_6"));
-
+
Assert.assertTrue(sbmlModel.containsSpecies("Protein_16"));
Species protein16 = sbmlModel.getSpecies("Protein_16");
Assert.assertTrue(protein16.getId().equals("Protein_16"));
@@ -679,7 +412,7 @@
Assert.assertTrue(protein27.getId().equals("Protein_27"));
Assert.assertTrue(protein27.getName().equals("ATM"));
Assert.assertTrue(protein27.getCompartment().equals("CellularLocationVocabulary_6"));
-
+
Assert.assertTrue(sbmlModel.containsSpecies("SmallMolecule_21"));
Species smallMolecule = sbmlModel.getSpecies("SmallMolecule_21");
Assert.assertTrue(smallMolecule.getId().equals("SmallMolecule_21"));
@@ -689,7 +422,7 @@
Assert.assertTrue(sbmlModel.containsReaction("BiochemicalReaction_2"));
Reaction reaction = sbmlModel.getReaction("BiochemicalReaction_2");
Assert.assertTrue(reaction.getSBOTerm() == SBO.getBiochemicalReaction());
-
+
Assert.assertTrue(reaction.getNumReactants() == 2);
for(int i = 0; i < 2; i++)
{
@@ -709,31 +442,70 @@
Assert.assertFalse(true);
}
}
-
+
Assert.assertTrue(reaction.getNumModifiers() == 1);
Assert.assertTrue(reaction.getModifier(0).getSpecies().equals("Protein_27"));
-
- printSBMLModel(sbfcSBMLModel);
+
+ //printSBMLModel(sbfcSBMLModel);
}
-
+
@Test public void test_gene()
{
String owlFile = "./test/org/sbfc/test/resources/biopax3-genetic-interaction.owl";
SBMLModel sbfcSBMLModel = read_biopaxFile(owlFile);
org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
-// printSBMLModel(sbfcSBMLModel);
+
+ //printSBMLModel(sbfcSBMLModel);
}
+
+ @Test public void test_TemplateReactionFile()
+ {
+ //TODO: File failing TemplateReaction parser during conversion
+ String owlFile = "./test/org/sbfc/test/resources/biopax3-template-reaction.owl";
+
+ SBMLModel sbfcSBMLModel = read_biopaxFile(owlFile);
+ org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
+ }
- @Test public void test_nestedCVTerm()
+ @Test public void test_GeneticInteractionFile()
{
+ String owlFile = "./test/org/sbfc/test/resources/biopax3-genetic-interaction.owl";
+
+ SBMLModel sbfcSBMLModel = read_biopaxFile(owlFile);
+ org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
+ }
+
+ @Test public void test_MolecularInteractionFile()
+ {
String owlFile = "./test/org/sbfc/test/resources/biopax3-protein-interaction.owl";
SBMLModel sbfcSBMLModel = read_biopaxFile(owlFile);
org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
-
-// printSBMLModel(sbfcSBMLModel);
}
+ @Test public void test_ComplexAssemblyFile()
+ {
+ String owlFile = "./test/org/sbfc/test/resources/INOH_GPCR_signaling-pertussis_toxin-.owl";
+
+ SBMLModel sbfcSBMLModel = read_biopaxFile(owlFile);
+ org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
+ }
+
+ @Test public void test_TransportWithBiochemicalReactionFile()
+ {
+ String owlFile = "./test/org/sbfc/test/resources/AKT_Signaling_Pathway.owl";
+
+ SBMLModel sbfcSBMLModel = read_biopaxFile(owlFile);
+ org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
+ }
+
+
+ @Test public void test_Transport()
+ {
+ String owlFile = "./test/org/sbfc/test/resources/NetPath_1.owl";
+
+ SBMLModel sbfcSBMLModel = read_biopaxFile(owlFile);
+ org.sbml.jsbml.Model sbmlModel = sbfcSBMLModel.getModel();
+ }
}
Added: trunk/test/org/sbfc/test/resources/AKT_Signaling_Pathway.owl
===================================================================
--- trunk/test/org/sbfc/test/resources/AKT_Signaling_Pathway.owl (rev 0)
+++ trunk/test/org/sbfc/test/resources/AKT_Signaling_Pathway.owl 2016-07-14 07:13:05 UTC (rev 671)
@@ -0,0 +1,1351 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rdf:RDF
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:bp="http://www.biopax.org/release/biopax-level3.owl#"
+ xml:base="http://pathwaycommons.org/biopax/">
+<owl:Ontology rdf:about="">
+ <owl:imports rdf:resource="http://www.biopax.org/release/biopax-level3.owl#" />
+</owl:Ontology>
+
+<bp:ProteinReference rdf:about="http://pid.nci.nih.gov/biopaxpid_31506">
+ <bp:xref rdf:resource="urn:biopax:RelationshipXref:NCBI+GENE_572" />
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">BAD</bp:displayName>
+ <bp:organism rdf:resource="http://identifiers.org/taxonomy/9606" />
+</bp:ProteinReference>
+
+<bp:ProteinReference rdf:about="http://pid.nci.nih.gov/biopaxpid_108250">
+ <bp:name rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">FOXO1A</bp:name>
+ <bp:xref rdf:resource="urn:biopax:RelationshipXref:NCBI+GENE_2308" />
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">FKHR</bp:displayName>
+ <bp:organism rdf:resource="http://identifiers.org/taxonomy/9606" />
+</bp:ProteinReference>
+
+<bp:ProteinReference rdf:about="http://pid.nci.nih.gov/biopaxpid_108252">
+ <bp:name rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">MLLT7</bp:name>
+ <bp:xref rdf:resource="urn:biopax:RelationshipXref:NCBI+GENE_4303" />
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">AFX</bp:displayName>
+ <bp:organism rdf:resource="http://identifiers.org/taxonomy/9606" />
+</bp:ProteinReference>
+
+<bp:Protein rdf:about="http://pid.nci.nih.gov/biopaxpid_108255">
+ <bp:entityReference rdf:resource="http://pid.nci.nih.gov/biopaxpid_108252" />
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:name rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">MLLT7</bp:name>
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886 </bp:comment>
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">http://pid.nci.nih.gov/biopaxpid_108255@Layout@http://pid.nci.nih.gov/biopaxpid_108233@811@236</bp:comment>
+ <bp:standardName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">AFX</bp:standardName>
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">AFX</bp:displayName>
+</bp:Protein>
+
+<bp:Protein rdf:about="http://pid.nci.nih.gov/biopaxpid_108254">
+ <bp:entityReference rdf:resource="http://pid.nci.nih.gov/biopaxpid_108250" />
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:name rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">FOXO1A</bp:name>
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886 </bp:comment>
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">http://pid.nci.nih.gov/biopaxpid_108254@Layout@http://pid.nci.nih.gov/biopaxpid_108233@984@245</bp:comment>
+ <bp:standardName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">FKHR</bp:standardName>
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">FKHR</bp:displayName>
+</bp:Protein>
+
+<bp:ModificationFeature rdf:about="http://pid.nci.nih.gov/biopaxpid_108257">
+ <bp:modificationType rdf:resource="http://pid.nci.nih.gov/biopaxpid_174" />
+</bp:ModificationFeature>
+
+<bp:Protein rdf:about="http://pid.nci.nih.gov/biopaxpid_108256">
+ <bp:entityReference rdf:resource="http://pid.nci.nih.gov/biopaxpid_108249" />
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_108255" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_74047" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_108254" />
+ <bp:feature rdf:resource="http://pid.nci.nih.gov/biopaxpid_108257" />
+ <bp:cellularLocation rdf:resource="http://identifiers.org/obo.go/GO:0005737" />
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886 </bp:comment>
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">http://pid.nci.nih.gov/biopaxpid_108256@Layout@http://pid.nci.nih.gov/biopaxpid_108233@670@314</bp:comment>
+ <bp:standardName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">Forkhead Transcription Factors</bp:standardName>
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">Forkhead Transcription Factors</bp:displayName>
+</bp:Protein>
+
+<bp:Catalysis rdf:about="http://pid.nci.nih.gov/biopaxpid_1620">
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:catalysisDirection rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">LEFT_TO_RIGHT</bp:catalysisDirection>
+ <bp:controlled rdf:resource="http://pid.nci.nih.gov/biopaxpid_1615" />
+ <bp:controlType rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">ACTIVATION</bp:controlType>
+ <bp:controller rdf:resource="http://pid.nci.nih.gov/biopaxpid_1594" />
+</bp:Catalysis>
+
+<bp:BiochemicalReaction rdf:about="http://pid.nci.nih.gov/biopaxpid_108247">
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:participantStoichiometry rdf:resource="http://pid.nci.nih.gov/biopaxpid_108259" />
+ <bp:participantStoichiometry rdf:resource="http://pid.nci.nih.gov/biopaxpid_108258" />
+ <bp:left rdf:resource="http://pid.nci.nih.gov/biopaxpid_108248" />
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">http://pid.nci.nih.gov/biopaxpid_108247true@Layout@http://pid.nci.nih.gov/biopaxpid_108233@604@384</bp:comment>
+ <bp:right rdf:resource="http://pid.nci.nih.gov/biopaxpid_108256" />
+</bp:BiochemicalReaction>
+
+<bp:Protein rdf:about="http://pid.nci.nih.gov/biopaxpid_108248">
+ <bp:entityReference rdf:resource="http://pid.nci.nih.gov/biopaxpid_108249" />
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_108255" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_74047" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_108254" />
+ <bp:cellularLocation rdf:resource="http://identifiers.org/obo.go/GO:0005737" />
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886 </bp:comment>
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">http://pid.nci.nih.gov/biopaxpid_108248@Layout@http://pid.nci.nih.gov/biopaxpid_108233@752@368</bp:comment>
+ <bp:standardName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">Forkhead Transcription Factors</bp:standardName>
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">Forkhead Transcription Factors</bp:displayName>
+</bp:Protein>
+
+<bp:SequenceInterval rdf:about="http://pid.nci.nih.gov/biopaxpid_1562">
+</bp:SequenceInterval>
+
+<bp:ProteinReference rdf:about="http://pid.nci.nih.gov/biopaxpid_108249">
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">Forkhead Transcription Factors</bp:displayName>
+ <bp:memberEntityReference rdf:resource="http://pid.nci.nih.gov/biopaxpid_108250" />
+ <bp:memberEntityReference rdf:resource="http://pid.nci.nih.gov/biopaxpid_108252" />
+ <bp:memberEntityReference rdf:resource="http://pid.nci.nih.gov/biopaxpid_16801" />
+ <bp:organism rdf:resource="http://identifiers.org/taxonomy/9606" />
+</bp:ProteinReference>
+
+<bp:CellularLocationVocabulary rdf:about="http://identifiers.org/obo.go/GO:0005634">
+ <bp:term rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">nucleus</bp:term>
+ <bp:xref rdf:resource="urn:biopax:UnificationXref:GENE+ONTOLOGY_GO%3A0005634" />
+</bp:CellularLocationVocabulary>
+
+<bp:ProteinReference rdf:about="http://pid.nci.nih.gov/biopaxpid_1560">
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">p50</bp:displayName>
+ <bp:organism rdf:resource="http://identifiers.org/taxonomy/9606" />
+</bp:ProteinReference>
+
+<bp:RelationshipXref rdf:about="urn:biopax:RelationshipXref:NCBI+GENE_842">
+ <bp:id rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">842</bp:id>
+ <bp:db rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">Entrez Gene</bp:db>
+ <bp:relationshipType rdf:resource="urn:biopax:RelationshipTypeVocabulary:GENE" />
+</bp:RelationshipXref>
+
+<bp:FragmentFeature rdf:about="http://pid.nci.nih.gov/biopaxpid_1561">
+ <bp:featureLocation rdf:resource="http://pid.nci.nih.gov/biopaxpid_1562" />
+</bp:FragmentFeature>
+
+<bp:RelationshipXref rdf:about="urn:biopax:RelationshipXref:NCBI+GENE_5970">
+ <bp:id rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">5970</bp:id>
+ <bp:db rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">NCBI Gene</bp:db>
+</bp:RelationshipXref>
+
+<bp:Catalysis rdf:about="http://pid.nci.nih.gov/biopaxpid_108260">
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:catalysisDirection rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">LEFT_TO_RIGHT</bp:catalysisDirection>
+ <bp:controlled rdf:resource="http://pid.nci.nih.gov/biopaxpid_108247" />
+ <bp:controlType rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">ACTIVATION</bp:controlType>
+ <bp:controller rdf:resource="http://pid.nci.nih.gov/biopaxpid_1359" />
+</bp:Catalysis>
+
+<bp:Protein rdf:about="http://pid.nci.nih.gov/biopaxpid_108264">
+ <bp:entityReference rdf:resource="http://pid.nci.nih.gov/biopaxpid_108249" />
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_108255" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_74047" />
+ <bp:memberPhysicalEntity rdf:resource="http://pid.nci.nih.gov/biopaxpid_108254" />
+ <bp:feature rdf:resource="http://pid.nci.nih.gov/biopaxpid_108257" />
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">dataSource ADDED by a reasoner: http://pid.nci.nih.gov/biopaxpid_886 </bp:comment>
+ <bp:comment rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">http://pid.nci.nih.gov/biopaxpid_108264http://pid.nci.nih.gov/biopaxpid_108263@Layout@http://pid.nci.nih.gov/biopaxpid_108233@739@73</bp:comment>
+ <bp:standardName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">Forkhead Transcription Factors</bp:standardName>
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XMLSchema#string">Forkhead Transcription Factors</bp:displayName>
+</bp:Protein>
+
+<bp:Complex rdf:about="http://pid.nci.nih.gov/biopaxpid_108263">
+ <bp:dataSource rdf:resource="urn:biopax:Provenance:pid_20120816" />
+ <bp:dataSource rdf:resource="http://pid.nci.nih.gov/biopaxpid_886" />
+ <bp:componentStoichiometry rdf:resource="http://pid.nci.nih.gov/biopaxpid_108266" />
+ <bp:componentStoichiometry rdf:resource="http://pid.nci.nih.gov/biopaxpid_108265" />
+ <bp:component rdf:resource="http://pid.nci.nih.gov/biopaxpid_6986" />
+ <bp:component rdf:resource="http://pid.nci.nih.gov/biopaxpid_108264" />
+ <bp:displayName rdf:datatype = "http://www.w3.org/2001/XM...
[truncated message content] |