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); }
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; }