Beispiel #1
0
 /**
  * Called during the division of an EpiBac ; apply the segregation of plasmids, modify the number
  * for the plasmid calling the method and sends the number for the other one.
  *
  * @param aPlasmid Episome
  */
 public void segregation(Episome aPlasmid) {
   if (ExtraMath.getUniRandDbl() > getSpeciesParam().lossProbability) {
     _nCopy = 1;
     aPlasmid._nCopy = 1;
   } else {
     _nCopy =
         0; // jan: this introduces a bias, the 'old' cell always looses the plasmid. If the two
            // daughter cells are not equal, then this is poor
     aPlasmid._nCopy = 1;
   }
 }
Beispiel #2
0
 @Override
 public void makeKid() throws CloneNotSupportedException {
   /*
    * Clone the plasmid.
    */
   Episome baby = this.sendNewAgent();
   /*
    * Register the plasmid (species population).
    */
   baby.registerBirth();
 }
Beispiel #3
0
 @Override
 public void createNewAgent() {
   try {
     // Clone the plasmid
     Episome baby = this.sendNewAgent();
     // Register the plasmid (species population)
     baby.registerBirth();
   } catch (CloneNotSupportedException e) {
     LogFile.writeError(e, "Episome.createNewAgent()");
   }
 }
Beispiel #4
0
  @Override
  @SuppressWarnings("unchecked")
  public Object clone() throws CloneNotSupportedException {
    Episome o = (Episome) super.clone();
    o._host = this._host;
    o._speciesParam = _speciesParam;

    o.reactionActive = (ArrayList<Integer>) this.reactionActive.clone();
    o.lastExchange = this.lastExchange;
    o.lastReception = this.lastReception;

    return o;
  }
Beispiel #5
0
 public Boolean isCompatible(Episome aPlasmid) {
   return aPlasmid.getSpeciesParam().compatibilityMarker
       != this.getSpeciesParam().compatibilityMarker;
 }
Beispiel #6
0
 /** You are doing a conjugation! Update your lag variables. */
 public void updateConjugationTime(Episome baby) {
   lastExchange = SimTimer.getCurrentTime();
   baby.lastReception = SimTimer.getCurrentTime();
 }
Beispiel #7
0
 @Override
 public Episome sendNewAgent() throws CloneNotSupportedException {
   Episome baby = (Episome) this.clone();
   baby.init();
   return baby;
 }