File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ def __repr__(self):
220
220
221
221
def __call__ (self , env ):
222
222
for mutation_set in env :
223
- intersection = mutation_set .mutations & self . mutations .mutations
223
+ intersection = self .mutations . mutations & mutation_set .mutations
224
224
if len (intersection ) > 0 :
225
225
return Score (True , intersection )
226
226
return None
Original file line number Diff line number Diff line change @@ -47,11 +47,18 @@ def test_asi2_compat(self):
47
47
48
48
# noinspection SqlNoDataSourceInspection,SqlDialectInspection
49
49
class TestRuleSemantics (unittest .TestCase ):
50
-
51
50
def test_score_from (self ):
52
51
rule = ASI2 ("SCORE FROM ( 100G => 10, 101D => 20 )" )
53
52
self .assertEqual (rule (VariantCalls ("100G 102G" )), 10 )
54
53
54
+ def test_score_residues (self ):
55
+ rule = ASI2 ("SCORE FROM ( 100G => 10, 101D => 20 )" )
56
+ expected_residue = repr ({Mutation ('S100G' )})
57
+
58
+ result = rule .dtree (VariantCalls ("S100G R102G" ))
59
+
60
+ self .assertEqual (expected_residue , repr (result .residues ))
61
+
55
62
def test_score_from_max (self ):
56
63
rule = ASI2 ("SCORE FROM (MAX (100G => 10, 101D => 20, 102D => 30))" )
57
64
self .assertEqual (rule (VariantCalls ("100G 101D" )), 20 )
You can’t perform that action at this time.
0 commit comments