File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 99 run_tomtom ,
1010 scan_sequences ,
1111 trim_pwm ,
12+ compare_motifs
1213)
1314from grelu .interpret .score import ISM_predict , get_attention_scores , get_attributions
1415from grelu .interpret .simulate import (
@@ -268,6 +269,28 @@ def test_scan_sequences():
268269 assert out .equals (expected )
269270
270271
272+ def test_compare_motifs ():
273+ out = compare_motifs (
274+ ref_seq = "CACGTGACGCATGA" ,
275+ motifs = meme_file ,
276+ alt_seq = "TAAGTGACGCGTGA" ,
277+ pthresh = 5e-4 ,
278+ rc = False
279+ )
280+ expected = pd .DataFrame ({
281+ 'motif' : ['MA0004.1 Arnt' , 'MA0006.1 Ahr::Arnt' ],
282+ 'start' : [0 , 7 ],
283+ 'end' : [6 , 13 ],
284+ 'strand' : ['+' , '+' ],
285+ 'p-value_alt' : [0.015625 , 0.000244140625 ],
286+ 'p-value_ref' : [0.000244140625 , 0.010009765624999995 ],
287+ 'score_alt' : [- 14.648840188980103 , 10.232005834579468 ],
288+ 'score_ref' : [11.60498046875 , - 2.9944558143615723 ],
289+ 'score_diff' : [- 26.253820657730103 , 13.22646164894104 ]
290+ })
291+ assert out .equals (expected )
292+
293+
271294def test_run_tomtom ():
272295
273296 motifs = {
You can’t perform that action at this time.
0 commit comments