File: mystats.py

package info (click to toggle)
python-seqcluster 1.2.9%2Bds-7
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 113,648 kB
  • sloc: python: 5,308; makefile: 175; sh: 122; javascript: 55
file content (13 lines) | stat: -rw-r--r-- 282 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
try:
    import scipy.stats as stat
except:
    pass

def up_threshold(x, s, p):
    """function to decide if similarity is
    below cutoff"""
    if 1.0 * x/s >= p:
        return True
    elif stat.binomtest(int(x), int(s), p).pvalue > 0.01:
        return True
    return False