-
Notifications
You must be signed in to change notification settings - Fork 1
/
wil_chicken.py
executable file
·27 lines (26 loc) · 1.12 KB
/
wil_chicken.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import utils_stats
elm_ls = [[1, 'YIIK'], [1, 'YIVK'], [1, 'YLDK'], [1, 'YTIR'], [2, 'YLMA'], [3, 'YLLV'], [5, 'YIEG'], [10, 'YVNT'], [15, 'YTID'], [28, 'YVSM'], [129, 'YLLA'], [143, 'YLLT'], [260, 'YTLD'], [266, 'YINT'], [271, 'YVRT'], [273, 'YCVL'], [274, 'YLEK'], [275, 'YFTA'], [275, 'YIMK'], [277, 'YVDG']]
cut = 200
virus = []
nonvirus = []
found_seqs = {}
with open('results/elmdict_Gallus_gallus.txt') as f:
for line in f:
elm, seq, count, frac_st = line.strip().split('\t')
if elm == 'LIG_SH2_STAT5':
appended = False
for elm_count, elm_seq in elm_ls:
if seq == elm_seq:
found_seqs[seq] = True
if elm_count > cut:
virus.append(float(frac_st))
else:
nonvirus.append(float(frac_st))
appended = True
break
if not appended:
nonvirus.append(float(frac_st))
for count, seq in elm_ls:
if not seq in found_seqs and count > cut:
virus.append(float(0))
print utils_stats.wilcox_gtr(virus, nonvirus)