getBioBricks() публичный Метод

public getBioBricks ( ) : LinkedList
Результат LinkedList
Пример #1
0
 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;
  }