comparison SAINT_preprocessing.py @ 15:876af85d782c draft

Uploaded
author bornea
date Tue, 12 Apr 2016 15:05:52 -0400
parents c22c1209e65f
children 4b43913630d0
comparison
equal deleted inserted replaced
14:c22c1209e65f 15:876af85d782c
51 if baits[i+2] == "true": 51 if baits[i+2] == "true":
52 T_C = "C" 52 T_C = "C"
53 else: 53 else:
54 T_C = "T" 54 T_C = "T"
55 bait_line = baits[i] + "\t" + baits[i+1] + "\t" + T_C + "\n" 55 bait_line = baits[i] + "\t" + baits[i+1] + "\t" + T_C + "\n"
56 read_infile = open(infile, "r") 56 bait_cach.append(str(bait_line))
57 for input_line in read_infile:
58 input_line = input_line.strip()
59 temp = input_line.split('\t')
60 bait_cache.append((number_bait, str(bait_line)))
61 i = i + 3 57 i = i + 3
62 58
63 bait_cache.sort()
64 for cache_line in bait_cache: 59 for cache_line in bait_cache:
65 bait_file_tmp.write(cache_line[1]) 60 bait_file_tmp.write(cache_line[1])
66 61
67 bait_file_tmp.close() 62 bait_file_tmp.close()
68 63