示例#1
0
    private float _terminatorFactor; //! Determine the fiability of the terminator (0-1 wich correspond to 0% to 100%)

    #endregion Fields

    #region Methods

    public static IReaction buildPromoterFromProps(PromoterProprieties props)
    {
        PromoterParser parser = new PromoterParser();
        Promoter reaction = new Promoter();

        reaction.setName(props.name);
        reaction.setBeta(props.beta);
        reaction.setTerminatorFactor(props.terminatorFactor);
        TreeNode<PromoterNodeData> formula = parser.Parse(props.formula);
        reaction.setFormula(formula);
        Product newProd;
        foreach (Product p in props.products)
          {
        newProd = new Product(p);
        reaction.addProduct(newProd);
          }
        return reaction;
    }
示例#2
0
 /*!
 \brief Load promoter name by checking the validity of the given string
 \param value The given name
 \param prom The Promoter reaction
 \return Return true if succed and false if value parameter is invalid.
    */
 private bool loadPromoterName(string value, Promoter prom)
 {
     if (String.IsNullOrEmpty(value))
       {
     Debug.Log("Error: Empty name field");
     return false;
       }
     prom.setName(value);
     return true;
 }