本文整理汇总了Java中org.sbml.jsbml.ModifierSpeciesReference.setSpecies方法的典型用法代码示例。如果您正苦于以下问题:Java ModifierSpeciesReference.setSpecies方法的具体用法?Java ModifierSpeciesReference.setSpecies怎么用?Java ModifierSpeciesReference.setSpecies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sbml.jsbml.ModifierSpeciesReference
的用法示例。
在下文中一共展示了ModifierSpeciesReference.setSpecies方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: completeModifierSpeciesReference
import org.sbml.jsbml.ModifierSpeciesReference; //导入方法依赖的package包/类
/**
* Complete modifier species reference.
*
* @param modifierSpeciesReference
* the modifier species reference
* @return ListOf<ModifierSpeciesReference>
* TODO
*/
public static ListOf<ModifierSpeciesReference> completeModifierSpeciesReference(
ListOf<ModifierSpeciesReference> modifierSpeciesReference) {
for (ModifierSpeciesReference sr : modifierSpeciesReference) {
if (!sr.isSetSpecies()){
Species s = model.getSpecies(sr.getId());
if(s == null) {
sr.setSpecies(model.getSpecies(0));
} else {
sr.setSpecies(s);
}
}
}
return modifierSpeciesReference;
}
示例2: addNoInfluenceToProductionReaction
import org.sbml.jsbml.ModifierSpeciesReference; //导入方法依赖的package包/类
public Reaction addNoInfluenceToProductionReaction(String promoterId,String regulatorId,String productId) {
Reaction r = getProductionReaction(promoterId);
ModifierSpeciesReference modifier = r.getModifierForSpecies(regulatorId);
if (!regulatorId.equals("none") && modifier==null) {
modifier = r.createModifier();
modifier.setSpecies(regulatorId);
modifier.setSBOTerm(GlobalConstants.SBO_NEUTRAL);
} else if (modifier != null) {
return r;
}
if (modifier!=null) {
SBMLutilities.copyDimensionsToEdgeIndex(r, sbml.getModel().getSpecies(regulatorId), modifier, "species");
}
if (!productId.equals("none") && r.getProductForSpecies(productId)==null) {
SpeciesReference product = r.createProduct();
product.setSpecies(productId);
SBMLutilities.copyDimensionsToEdgeIndex(r, sbml.getModel().getSpecies(productId), product, "species");
double np = sbml.getModel().getParameter(GlobalConstants.STOICHIOMETRY_STRING).getValue();
product.setStoichiometry(np);
product.setConstant(true);
if (r.getProductForSpecies(promoterId + "_mRNA")!=null) {
r.removeProduct(promoterId+"_mRNA");
}
if (sbml.getModel().getSpecies(promoterId + "_mRNA")!=null) {
sbml.getModel().removeSpecies(promoterId+"_mRNA");
}
}
r.getKineticLaw().setMath(SBMLutilities.myParseFormula(createProductionKineticLaw(r)));
return r;
}
示例3: addModifierToReaction
import org.sbml.jsbml.ModifierSpeciesReference; //导入方法依赖的package包/类
public void addModifierToReaction(String modifierId,String reactionId) {
Reaction r = sbml.getModel().getReaction(reactionId);
ModifierSpeciesReference s = r.createModifier();
s.setSpecies(modifierId);
SBMLutilities.copyDimensionsToEdgeIndex(r, sbml.getModel().getSpecies(modifierId), s, "species");
}
示例4: ModifierSpeciesReference
import org.sbml.jsbml.ModifierSpeciesReference; //导入方法依赖的package包/类
public static ModifierSpeciesReference ModifierSpeciesReference(String id) {
ModifierSpeciesReference sr = new ModifierSpeciesReference(GlobalConstants.SBML_LEVEL, GlobalConstants.SBML_VERSION);
sr.setSpecies(id);
return sr;
}