createCelloSDProductionReactions create smallMolecule species
Added support to create species for input small sensor molecules
This commit is contained in:
parent
ebf7418573
commit
fe6de14d66
2 changed files with 23 additions and 2 deletions
|
|
@ -358,7 +358,7 @@ public class SBOL2SBML {
|
|||
ModuleDefinition resultMD = MDFlattener(sbolDoc, moduleDef);
|
||||
|
||||
//Remove Complex formation and sensor promoters from ModuleDefinition, so that no species is created for these
|
||||
removeSensorPromotersAndComplexes(resultMD, sensorMolecules);
|
||||
removeSensorInteractios(resultMD, sensorMolecules);
|
||||
|
||||
HashMap<FunctionalComponent, HashMap<String, String>> celloParameters = new HashMap<FunctionalComponent, HashMap<String, String>>();
|
||||
boolean CelloModel = false;
|
||||
|
|
@ -948,7 +948,7 @@ public class SBOL2SBML {
|
|||
return CelloParameters2;
|
||||
}
|
||||
|
||||
private static void removeSensorPromotersAndComplexes(ModuleDefinition moduleDef, HashMap<String, String> sensorMolecules) throws SBOLValidationException{
|
||||
private static void removeSensorInteractios(ModuleDefinition moduleDef, HashMap<String, String> sensorMolecules) throws SBOLValidationException{
|
||||
|
||||
for (Interaction interact : moduleDef.getInteractions()) {
|
||||
for (Participation part :interact.getParticipations()){
|
||||
|
|
|
|||
|
|
@ -2058,8 +2058,29 @@ public class BioModel extends CoreObservable{
|
|||
for (String modifi : promoterInteractions.get(promoter).keySet()) {
|
||||
if (modifi.equals("sensor")) {
|
||||
ModifierSpeciesReference input = r.createModifier();
|
||||
if (sbml.getModel().getSpecies(promoterInteractions.get(promoter).get(modifi)) == null) {
|
||||
Species smallMolecule = targetModel.getSBMLDocument().getModel().createSpecies();
|
||||
smallMolecule.setId(promoterInteractions.get(promoter).get(modifi));
|
||||
smallMolecule.setSBOTerm(GlobalConstants.SBO_SIMPLE_CHEMICAL);
|
||||
|
||||
smallMolecule.setConstant(false);
|
||||
//smallMolecule.setBoundaryCondition(true);
|
||||
|
||||
createDirPort(smallMolecule.getId(), GlobalConstants.INPUT);
|
||||
|
||||
/*mRNA.setInitialAmount(0.0);
|
||||
mRNA.setBoundaryCondition(false);
|
||||
mRNA.setConstant(false);
|
||||
mRNA.setHasOnlySubstanceUnits(true);
|
||||
mRNA.setSBOTerm(GlobalConstants.SBO_MRNA);*/
|
||||
|
||||
input.setSpecies(smallMolecule);
|
||||
input.setSBOTerm(GlobalConstants.SBO_ACTIVATION);
|
||||
} else {
|
||||
//input.setSpecies(targetModel.getSBMLDocument().getModel().getSpecies(promoterInteractions.get(promoter).get(modifi)));
|
||||
input.setSpecies(sbml.getModel().getSpecies(promoterInteractions.get(promoter).get(modifi)));
|
||||
input.setSBOTerm(GlobalConstants.SBO_ACTIVATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue