git-svn-id: http://svn.tuebingen.mpg.de/ag-raetsch/projects/QPalma@8646 e1793c9e...
[qpalma.git] / scripts / evaluateVmatch.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 import sys
5 import pdb
6 import os
7 import os.path
8
9
10 def compare_alignments(aln1,aln2):
11 return
12
13
14 def compare_all_alignments(reads_fn,vmatch_result_dir):
15 read_positions = {}
16
17 vmatch_correct_ctr = 0
18
19 for line in open(reads_fn):
20 line = line.strip()
21 slist = line.split()
22 id = int(slist[0])
23 start_pos = int(slist[10])
24 end_pos = int(slist[13])
25
26 read_positions[id] = (start_pos,end_pos)
27
28 for line in open(vmatch_result_dir):
29 line = line.strip()
30 slist = line.split()
31
32 id = int(slist[0])
33 vmatch_start_pos = int(slist[2])
34
35 start_pos,end_pos = read_positions[id]
36
37 if vmatch_start_pos == start_pos:
38 vmatch_correct_ctr += 1
39
40
41 if __name__ == '__main__':
42 reads_fn = ''
43 vmatch_result_dir = ''
44