Added Java AutoDocs
CelloModeling removed unnecessary code
This commit is contained in:
parent
412c01c44a
commit
507aa6f3f7
3 changed files with 68 additions and 23 deletions
|
|
@ -106,20 +106,20 @@ public class CelloModeling {
|
|||
removeSensorInteractios(resultMD, sensorMolecules);
|
||||
|
||||
HashMap<FunctionalComponent, HashMap<String, String>> celloParameters = new HashMap<FunctionalComponent, HashMap<String, String>>();
|
||||
boolean CelloModel = false;
|
||||
boolean CelloModel = true;
|
||||
// TODO there has to be a better way to determine if we are in a Cello model generation or not
|
||||
for (FunctionalComponent promoter : resultMD.getFunctionalComponents()) {
|
||||
if (SBOL2SBML.isPromoterComponent(resultMD, promoter, sbolDoc)) {
|
||||
//retrieve Cello Parameters, if the TU (promoter) has them. If this is true, then we are in the Cello Model Generation
|
||||
//and both Degradation reactions and Production reactions will be modeled using Hamid's paper for dynamic modeling
|
||||
//using Cello Parameters.
|
||||
celloParameters.put(promoter, hasCelloParameters(promoter));
|
||||
//Check if the TU has Cello Parameters "n", "K", "ymax" and "ymin". If yes, we are in a Cello Model generation case
|
||||
if (!celloParameters.get(promoter).get("n").isEmpty() && !celloParameters.get(promoter).get("K").isEmpty() && !celloParameters.get(promoter).get("ymax").isEmpty() && !celloParameters.get(promoter).get("ymin").isEmpty()) {
|
||||
CelloModel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (FunctionalComponent promoter : resultMD.getFunctionalComponents()) {
|
||||
// if (SBOL2SBML.isPromoterComponent(resultMD, promoter, sbolDoc)) {
|
||||
// //retrieve Cello Parameters, if the TU (promoter) has them. If this is true, then we are in the Cello Model Generation
|
||||
// //and both Degradation reactions and Production reactions will be modeled using Hamid's paper for dynamic modeling
|
||||
// //using Cello Parameters.
|
||||
// celloParameters.put(promoter, hasCelloParameters(promoter));
|
||||
// //Check if the TU has Cello Parameters "n", "K", "ymax" and "ymin". If yes, we are in a Cello Model generation case
|
||||
// if (!celloParameters.get(promoter).get("n").isEmpty() && !celloParameters.get(promoter).get("K").isEmpty() && !celloParameters.get(promoter).get("ymax").isEmpty() && !celloParameters.get(promoter).get("ymin").isEmpty()) {
|
||||
// CelloModel = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// Generate SBML Species for each part in the model
|
||||
|
|
@ -670,6 +670,9 @@ public class CelloModeling {
|
|||
*/
|
||||
private static HashMap<String, List<String>> productionInteractions(SBOLDocument sbolDoc){
|
||||
|
||||
//Since it is not possible to determine in which production reactions each Engineered Region participates in, then we first have to look through all the ER, then through
|
||||
//all production reactions, and match them
|
||||
|
||||
HashMap<String, List<String>> Prot_2_Param = new HashMap <String, List<String>>();
|
||||
for (ComponentDefinition CD : sbolDoc.getComponentDefinitions()) {
|
||||
if (CD.containsRole(SequenceOntology.ENGINEERED_REGION)) {
|
||||
|
|
|
|||
|
|
@ -537,8 +537,8 @@ public class Converter {
|
|||
SBOLDocument newSbolDoc = sbolDoc.createRecursiveCopy(top);
|
||||
|
||||
try {
|
||||
newSbolDoc = VPRModelGenerator.generateModel(urlVPR, newSbolDoc, vpr_output);
|
||||
//newSbolDoc = VPRModelGenerator.generateModel(urlVPR, newSbolDoc, "topModule");
|
||||
//newSbolDoc = VPRModelGenerator.generateModel(urlVPR, newSbolDoc, vpr_output);
|
||||
newSbolDoc = VPRModelGenerator.generateModel(urlVPR, newSbolDoc, "topModule");
|
||||
} catch (VPRException e) {
|
||||
System.err.println("ERROR: VPR generation fails");
|
||||
e.printStackTrace();
|
||||
|
|
@ -566,8 +566,8 @@ public class Converter {
|
|||
//TODO PEDRO calling VPR
|
||||
if (doVPR) {
|
||||
try {
|
||||
sbolDoc = VPRModelGenerator.generateModel(urlVPR, sbolDoc, vpr_output);
|
||||
//sbolDoc = VPRModelGenerator.generateModel(urlVPR, sbolDoc, "topModule");
|
||||
//sbolDoc = VPRModelGenerator.generateModel(urlVPR, sbolDoc, vpr_output);
|
||||
sbolDoc = VPRModelGenerator.generateModel(urlVPR, sbolDoc, "topModule");
|
||||
} catch (VPRException e) {
|
||||
System.err.println("ERROR: VPR generation fails");
|
||||
e.printStackTrace();
|
||||
|
|
@ -590,15 +590,15 @@ public class Converter {
|
|||
|
||||
CompSBMLDocumentPlugin docPlugin = (CompSBMLDocumentPlugin) topEnvironment.getPlugin("comp");
|
||||
ExternalModelDefinition exte = docPlugin.getExternalModelDefinition("TopModel");
|
||||
exte.setId(vpr_output);
|
||||
exte.setSource(vpr_output + ".xml");
|
||||
//exte.setId("topModule");
|
||||
//exte.setSource("topModule.xml");
|
||||
//exte.setId(vpr_output);
|
||||
//exte.setSource(vpr_output + ".xml");
|
||||
exte.setId("topModule");
|
||||
exte.setSource("topModule.xml");
|
||||
|
||||
CompModelPlugin SBMLplugin = (CompModelPlugin) topEnvironment.getModel().getPlugin("comp");
|
||||
Submodel top = SBMLplugin.getSubmodel("C1");
|
||||
top.setModelRef(vpr_output);
|
||||
//top.setModelRef("topModule");
|
||||
//top.setModelRef(vpr_output);
|
||||
top.setModelRef("topModule");
|
||||
|
||||
SBMLWriter writing = new SBMLWriter();
|
||||
|
||||
|
|
|
|||
|
|
@ -2019,6 +2019,21 @@ public class BioModel extends CoreObservable{
|
|||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the cello SD production reactions.
|
||||
*
|
||||
* @author Pedro Fontanarrosa
|
||||
* @param mRNA the m RNA
|
||||
* @param reactionID the reaction ID
|
||||
* @param TU the tu
|
||||
* @param kSDdegrad the k S ddegrad
|
||||
* @param onPort the on port
|
||||
* @param dimensions the dimensions
|
||||
* @param targetModel the target model
|
||||
* @param promoters the promoters
|
||||
* @param promoterInteractions the promoter interactions
|
||||
* @return the reaction
|
||||
*/
|
||||
//TODO PEDRO createCelloSDProductionReaction
|
||||
public Reaction createCelloSDProductionReactions(Species mRNA, String reactionID, String TU, String kSDdegrad, boolean onPort, String[] dimensions, BioModel targetModel, Set <String> promoters, HashMap<String, HashMap <String, String>> promoterInteractions) {
|
||||
|
||||
|
|
@ -2135,6 +2150,23 @@ public class BioModel extends CoreObservable{
|
|||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the cello TF production reactions.
|
||||
*
|
||||
* @author Pedro Fontanarrosa
|
||||
* @param mRNA the m RNA
|
||||
* @param rxnID the rxn ID
|
||||
* @param products the products
|
||||
* @param celloParameters the cello parameters
|
||||
* @param kTFdegrad the k T fdegrad
|
||||
* @param ko the ko
|
||||
* @param kb the kb
|
||||
* @param KoStr the ko str
|
||||
* @param KaoStr the kao str
|
||||
* @param onPort the on port
|
||||
* @param dimensions the dimensions
|
||||
* @return the reaction
|
||||
*/
|
||||
//TODO PEDRO createCelloTFProductionReaction
|
||||
public Reaction createCelloTFProductionReactions(Species mRNA, String rxnID, List<Participation> products, HashMap<String, List<String>> celloParameters, String kTFdegrad, String ko,
|
||||
String kb, String KoStr, String KaoStr, boolean onPort, String[] dimensions) {
|
||||
|
|
@ -2264,6 +2296,16 @@ public class BioModel extends CoreObservable{
|
|||
return reaction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the cello production kinetic law.
|
||||
*
|
||||
* @author Pedro Fontanarrosa
|
||||
* @param reaction the reaction
|
||||
* @param celloParameters the cello parameters
|
||||
* @param promoterInteractions the promoter interactions
|
||||
* @param promoters the promoters
|
||||
* @return the string
|
||||
*/
|
||||
//TODO PEDRO createCelloProductionKineticLaw
|
||||
public static String createCelloProductionKineticLaw(Reaction reaction, HashMap<String, List<String>> celloParameters, HashMap<String, HashMap <String, String>> promoterInteractions, Set<String> promoters) {
|
||||
String kineticLaw = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue