public ExpressionModule(ExpressionModule m) { _name = m._name; _bioBricks = new LinkedList<BioBrick>(); foreach (BioBrick b in m.getBioBricks()) _bioBricks.AddLast(b); }
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); }
//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()); } }
//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()); } }
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; }
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; }
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; }