Closed thienktran closed 2 years ago
Updated riskOfInfection() in SequencePhenotype.java. There are 3 options for crossImmunityFunction
riskOfInfection()
SequencePhenotype.java
crossImmunityFunction
"linear"
"exponential"
"exponentialSimplified"
The function used to calculate the return value of riskOfInfection() can be changed by updating crossImmunityFunction in parameters.yml.
parameters.yml
Closes #3
Added testRiskOfInfection() to TestSequencePhenotype.java, which passes for all the options of crossImmunityFunction.
testRiskOfInfection()
TestSequencePhenotype.java
Edge cases we tested:
We compared sequences that resulted intestRiskOfInfection() returning 0 shared the same base in half the indices hamming distance == 0.5 * this.sequence.length()) were completely different hamming distance == this.sequence.length()
We compared sequences that
hamming distance == 0.5 * this.sequence.length()
hamming distance == this.sequence.length()
The main use was tested as well.
#278
(Sorry about all the whitespace. I'm trying to work it out, but IntelliJ isn't cooperating right now)
Regarding whitespace, you can hide these changes in the GitHub diffs now:
Description
Updated
riskOfInfection()
inSequencePhenotype.java
. There are 3 options forcrossImmunityFunction
"linear"
"exponential"
"exponentialSimplified"
The function used to calculate the return value of
riskOfInfection()
can be changed by updatingcrossImmunityFunction
inparameters.yml
.Closes #3
Tests
Added
testRiskOfInfection()
toTestSequencePhenotype.java
, which passes for all the options ofcrossImmunityFunction
.Edge cases we tested:
The main use was tested as well.
Checklist:
#278
) has been searched for in the code to find relevant notes(Sorry about all the whitespace. I'm trying to work it out, but IntelliJ isn't cooperating right now)