Skip to content

Commit a7b7ffa

Browse files
committed
Fix a bug that have scores at same position counted multiple times
1 parent d167a29 commit a7b7ffa

File tree

8 files changed

+17
-11
lines changed

8 files changed

+17
-11
lines changed
-53.4 KB
Binary file not shown.

NGS/gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 6 deletions
This file was deleted.

asi_interpreter

Submodule asi_interpreter updated 202 files
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

hivfacts

sierra-tests/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ test {
7474
}
7575

7676
jacocoTestReport {
77-
classDirectories = files(jacocoReportClasses)
77+
classDirectories.from = files(jacocoReportClasses)
7878
reports {
7979
xml.enabled = true
8080
html.enabled = true

sierra-tests/src/test/java/edu/stanford/hivdb/drugresistance/GeneDRTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
//import static org.mockito.Mockito.*;
2323

2424
import java.util.Collections;
25+
import java.util.HashMap;
2526
import java.util.List;
27+
import java.util.Map;
2628
import java.util.Set;
2729
import java.util.TreeSet;
2830

@@ -278,6 +280,16 @@ public void testGetDrugSuscsCase1() {
278280
assertFalse(geneDR.getMutScores(hiv.getDrug("NVP")).isEmpty());
279281
}
280282

283+
@Test
284+
public void testGetMutScores$UseMaxScore() {
285+
MutationSet<HIV> mutations = MutationSet.parseString(hiv.getGene("HIV1RT"), "RT184IV");
286+
DrugResistanceAlgorithm<HIV> algorithm = hiv.getDrugResistAlgorithm("HIVDB_8.9");
287+
GeneDR<HIV> geneDR = new GeneDR<HIV>(hiv.getGene("HIV1RT"), mutations, algorithm);
288+
Map<MutationSet<HIV>, Double> expects = new HashMap<>();
289+
expects.put(mutations, -10.0);
290+
assertEquals(expects, geneDR.getDrugSusc(hiv.getDrug("AZT")).getPartialScores());
291+
}
292+
281293
@Test
282294
public void testGetComboMutScores$Drug() {
283295
MutationSet<HIV> mutations = MutationSet.parseString(hiv.getGene("HIV1RT"), "RT101E, RT181C");

0 commit comments

Comments
 (0)