createCelloSDProductionReactions create smallMolecule species

Added support to create species for input small sensor molecules
This commit is contained in:
Pedro Fontanarrosa 2018-12-14 15:03:24 -07:00
parent ebf7418573
commit fe6de14d66
2 changed files with 23 additions and 2 deletions

View file

@ -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);
}
}
}
}