getBioBricks() public method

public getBioBricks ( ) : LinkedList
return LinkedList
 public ExpressionModule(ExpressionModule m)
 {
     _name = m._name;
     _bioBricks = new LinkedList<BioBrick>();
     foreach (BioBrick b in m.getBioBricks())
       _bioBricks.AddLast(b);
 }
示例#2
0
    private PromoterProperties getPromoterReaction(ExpressionModule em, int id)
    {
        Logger.Log("Device::getPromoterReaction(" + em.ToString() + ", " + id + ")", Logger.Level.TRACE);
        PromoterProperties prom = new PromoterProperties();

        prom.energyCost = _energyPerBasePair * em.getSize();
        //promoter only
        //prom.energyCost = _energyPerBasePair*em.getBioBricks().First.Value.getSize();

        LinkedList <BioBrick> bricks = em.getBioBricks();

        //TODO fix this: create good properties' name
        prom.name = _internalName + id;
        PromoterBrick p = bricks.First.Value as PromoterBrick;

        prom.formula = p.getFormula();
        prom.beta    = p.getBeta();
        bricks.RemoveFirst();

        prom.products = getProductsFromBiobricks(bricks);

        TerminatorBrick tb = bricks.First.Value as TerminatorBrick;

        prom.terminatorFactor = tb.getTerminatorFactor();
        bricks.RemoveFirst();

        if (bricks.Count != 0)
        {
            Logger.Log("Device::getPromoterReaction Warning: bricks.Count =" + bricks.Count, Logger.Level.TRACE);
        }
        return(prom);
    }
示例#3
0
 //copy constructor
 public ExpressionModule(ExpressionModule m)
 {
     Logger.Log("ExpressionModule::ExpressionModule(" + m + ")", Logger.Level.DEBUG);
     _name      = m._name;
     _bioBricks = new LinkedList <BioBrick>();
     foreach (BioBrick b in m.getBioBricks())
     {
         _bioBricks.AddLast(b.copy());
     }
 }
示例#4
0
   //copy constructor
   public ExpressionModule(ExpressionModule m)
   {
       Logger.Log("ExpressionModule::ExpressionModule("+m+")", Logger.Level.DEBUG);
       _name = m._name;
       _bioBricks = new LinkedList<BioBrick>();
       foreach (BioBrick b in m.getBioBricks())
   {
     _bioBricks.AddLast(b.copy());
   }
 }
示例#5
0
    public PromoterProprieties getPromoterReaction(ExpressionModule em, int id)
    {
        PromoterProprieties prom = new PromoterProprieties();
        LinkedList<BioBrick> bricks = em.getBioBricks();

        prom.name = _name + id;
        PromoterBrick p = bricks.First.Value as PromoterBrick;
        prom.formula = p.getFormula();
        prom.beta = p.getBeta();
        bricks.RemoveFirst();

        prom.products = getProductsFromBiobricks(bricks);

        TerminatorBrick tb = bricks.First.Value as TerminatorBrick;
        prom.terminatorFactor = tb.getTerminatorFactor();
        bricks.RemoveFirst();

        prom.energyCost = getSize();
        return prom;
    }
示例#6
0
    private static bool checkModuleValidity(ExpressionModule module)
    {
        if (module == null)
          return false;

        LinkedList<BioBrick> bricks = new LinkedList<BioBrick>(module.getBioBricks());
        if (bricks == null)
          return false;
        if (bricks.Count == 0 || bricks.First.Value == null)
          return false;
        if (checkPromoter(bricks.First.Value) == false)
          return false;
        bricks.RemoveFirst();

        if (checkOperon(bricks) == false)
          return false;

        if (bricks.Count == 0 || bricks.First.Value != null || checkTerminator(bricks.First.Value) == false)
          return false;
        bricks.RemoveFirst();
        if (bricks.Count != 0)
          return false;
        return true;
    }
示例#7
0
  private PromoterProperties getPromoterReaction(ExpressionModule em, int id)
  {
    Logger.Log("Device::getPromoterReaction("+em.ToString()+", "+id+")", Logger.Level.TRACE);
    PromoterProperties prom = new PromoterProperties();

    prom.energyCost = _energyPerBasePair*em.getSize();
    //promoter only
    //prom.energyCost = _energyPerBasePair*em.getBioBricks().First.Value.getSize();

    LinkedList<BioBrick> bricks = em.getBioBricks();

        //TODO fix this: create good properties' name
    prom.name = _internalName + id;
    PromoterBrick p = bricks.First.Value as PromoterBrick;
    prom.formula = p.getFormula();
    prom.beta = p.getBeta();
    bricks.RemoveFirst();

    prom.products = getProductsFromBiobricks(bricks);

    TerminatorBrick tb = bricks.First.Value as TerminatorBrick;
    prom.terminatorFactor = tb.getTerminatorFactor();
    bricks.RemoveFirst();

    if(bricks.Count != 0) {
      Logger.Log("Device::getPromoterReaction Warning: bricks.Count ="+bricks.Count, Logger.Level.TRACE);
    }
    return prom;
  }