Skip to content

Commit 5bd7262

Browse files
added get_copy_call.py to utils
1 parent c35ec76 commit 5bd7262

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

build/utils/get_copy_call.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
def get_copy_call(a):
2+
"""
3+
Heler Function - Determine copy call for a value.
4+
"""
5+
6+
if a is None:
7+
return float('nan')
8+
9+
if math.isnan(a):
10+
return float('nan')
11+
12+
a_val = math.log2(float(a)+0.000001)
13+
if a_val < 0.5210507:
14+
return 'deep del'
15+
elif a_val < 0.7311832:
16+
return 'het loss'
17+
elif a_val < 1.214125:
18+
return 'diploid'
19+
elif a_val < 1.422233:
20+
return 'gain'
21+
else:
22+
return 'amp'

0 commit comments

Comments
 (0)