matsengrp / antigen

Simulating virus evolution and epidemiology
http://bedford.io/projects/antigen/
1 stars 0 forks source link

At the beginning of the simulation, make sure that viruses are initiated with the input sequence instead of a random sequence #23

Open Haddox opened 2 years ago

Haddox commented 2 years ago

I think there is a bug in the way that we initialize the simulation. Specifically, when we initialize a virus object at the start of the simulation:

https://github.com/matsengrp/antigen/blob/9add8384258d5078e44b60c58a6e72b63097d420/Parameters.java#L121

... we create a new GeometricSeqPhenotype object without providing an input sequence:

https://github.com/matsengrp/antigen/blob/9add8384258d5078e44b60c58a6e72b63097d420/PhenotypeFactory.java#L19

The result is that the code generates a random sequence that is the same length as the input sequence:

https://github.com/matsengrp/antigen/blob/9add8384258d5078e44b60c58a6e72b63097d420/GeometricSeqPhenotype.java#L72

I think that we need to make the following two changes:

  1. update the code so that line 71 of GeometricSeqPhenotype.java sets this.nucleotideSequence to be equal to Paramters.startingSequence.
  2. remove line 72, so that we don't call startingSequenceGenerator, which generates a random sequence that is the same length as the input sequence.