示例#1
0
    private bool loadGene(Promoter prom, string name, string RBSf)
    {
        Product gene = new Product();

        if (String.IsNullOrEmpty(name) || String.IsNullOrEmpty(RBSf))
          {
        Debug.Log("Error: Empty Gene name field");
        return false;
          }
        gene.setName(name);
        gene.setQuantityFactor(float.Parse(RBSf.Replace(",", ".")));
        prom.addProduct(gene);
        return true;
    }
示例#2
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;
    }