In [1]:
# significance and P-values
# Monday 2 October 2023
# Bayesian approach
#
# ssfff
#
# H0 f = f0 = 0.2
#
# H1 f > f0 = 0.2
#
import warnings
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats
from scipy.special import logsumexp
#
# integral_{fmin}^{fmax} P(n|f,N) P(f) df
#
# P(n|f,N) = N!/(n!*(N-x)!) f^n (1-f)^{N-n}
#
# prior P(f) = 1/(fmax-fmin)
#
def integral(fmin, fmax, n, N):
not_n = N - n
f_bin = 0.0001
f_nbin = int((fmax-fmin)/f_bin)
f = np.linspace(fmin, fmax, f_nbin) # the probability of contracting disease
# the prior
sigma = fmax - fmin
prior = 1/sigma
logprior = -np.log(sigma)
# I am ignoring the factorial term as it is only dependent on the data
# (N,n) and it will cancel out when I take the ratio of
# the P(H1/D)/p(H0/D)
#
integral = 0
logval_array = []
for b in range(f_nbin):
f = fmin + b*f_bin
not_f = 1.0 - f
logval = n * np.log(f) + not_n * np.log(not_f)
val = np.exp(logval)
logval_array.append(logval)
integral += val
# sum the terms directly
integral *= f_bin * prior
# do the logsumexp of the logvalues
logintegral = logsumexp(logval_array)
logintegral += np.log(f_bin) + logprior
#print(logval_array)
return logintegral, integral
# Data
N = 5
n = 3
#H0 = |f - f0=0.2| < 0.01
#
fmin_H0 = 0.19
fmax_H0 = 0.21
logintegral_H0, integral_H0 = integral(fmin_H0, fmax_H0, n, N)
print ("P(H0| ssfff) = ", integral_H0,
"\nP(H0| ssfff) = exp(", logintegral_H0, ") = ", np.exp(logintegral_H0))
#H1 = f > f0=0.2
#
fmin_H1 = 0.2
fmax_H1 = 0.99999
logintegral_H1, integral_H1 = integral(fmin_H1, fmax_H1, n, N)
print ("\nP(H1| ssfff) = ", integral_H1,
"\nP(H1| ssfff) = exp(", logintegral_H1,") = ", np.exp(logintegral_H1))
# the ratio P(H1/D)/P(H0/D)
ratio = integral_H0/integral_H1
logratio = logintegral_H0 - logintegral_H1
print("\nthe ratio P(H0/D)/P(H1/D)")
print("H0/H1 = ", ratio, "\nexp(", logratio, ") = ", np.exp(logratio))
P(H0| ssfff) = 0.005094601007019979 P(H0| ssfff) = exp( -5.279573926066733 ) = 0.005094601007019973 P(H1| ssfff) = 0.020480575939282885 P(H1| ssfff) = exp( -3.8882783571709485 ) = 0.020480575939282913 the ratio P(H0/D)/P(H1/D) H0/H1 = 0.2487528193603311 exp( -1.3912955688957842 ) = 0.24875281936033047
In [35]:
import scipy.special as special
N = 5
n = 3
# Posterior P(f|data, H)
#
# P(f|data, H) propto P(n|f,N,H) * P(f|H)
#
#where,
#
# P(n|f,N) = N!/(n!*(N-n)!) f^n (1-f)^{N-n}
#
# prior P(f|H) = 1/(fmax-fmin)
#
def posterior(fmin, fmax, f_bin, n, N):
not_n = N - n
f_nbin = int((fmax-fmin)/f_bin)
f_val = np.linspace(fmin, fmax, f_nbin)
# the prior
sigma = fmax - fmin
prior = 1/sigma
logprior = -np.log(sigma)
# I am ignoring the factorial term as it is only dependent on the data
# (N,n) and it will cancel out when I take the ratio of
# the P(H1/D)/p(H0/D)
#
integral = 0
post_array = []
for b in range(f_nbin):
f = fmin + b*f_bin
not_f = 1.0 - f
logpost = n * np.log(f) + not_n * np.log(not_f) + np.log(f_bin) + logprior
integral += np.exp(logpost)
post_array.append(np.exp(logpost))
return integral, post_array, f_val
# Data
N = 5
n = 3
f_bin = 0.0001
fmin_H0 = 0.19
fmax_H0 = 0.21
fmin_H1 = 0.20
fmax_H1 = 0.9999999
# posterior probs as a function of data
int_H0, posterior_H0, f_H0 = posterior(fmin_H0, fmax_H0, f_bin, n, N)
int_H1, posterior_H1, f_H1 = posterior(fmin_H1, fmax_H1, f_bin, n, N)
print("\nH0:", fmin_H0, "< f <", fmax_H0)
print("H1:", fmin_H1, "< f <", fmax_H1)
print("\nthe ratio P(H0/D)/P(H1/D)")
print("H0/H1 = ", int_H0/int_H1)
plt.plot(f_H0, posterior_H0, label = "Posterior(f | H0)")
plt.plot(f_H1, posterior_H1, label = "Posterior(f | H1)")
plt.axvline(x=n/N, color='b', ls=':', label='n/N')
plt.legend(loc="upper right")
plt.show()
H0: 0.19 < f < 0.21 H1: 0.2 < f < 0.9999999 the ratio P(H0/D)/P(H1/D) H0/H1 = 0.2487558977149499
In [34]:
fmin_H0 = 0.00001
fmax_H0 = 0.31
fmin_H1 = 0.20
fmax_H1 = 0.9999999
# posterior probs as a function of data
int_H0, posterior_H0, f_H0 = posterior(fmin_H0, fmax_H0, f_bin, n, N)
int_H1, posterior_H1, f_H1 = posterior(fmin_H1, fmax_H1, f_bin, n, N)
print("\nH0:", fmin_H0, "< f <", fmax_H0)
print("H1:", fmin_H1, "< f <", fmax_H1)
print("\nthe ratio P(H0/D)/P(H1/D)")
print("H0/H1 = ", int_H0/int_H1)
plt.plot(f_H0, posterior_H0, label = "Posterior(f | H0)")
plt.plot(f_H1, posterior_H1, label = "Posterior(f | H1)")
plt.axvline(x=n/N, color='b', ls=':', label='n/N')
plt.legend(loc="upper right")
plt.show()
H0: 1e-05 0.31 H1: 0.2 0.9999999 the ratio P(H0/D)/P(H1/D) H0/H1 = 0.20627371736288505
In [2]:
# SHAPE data for RNaseP
#
import warnings
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import scipy.stats as stats
from mpl_toolkits import mplot3d
from scipy.special import logsumexp
import time
shape_file_u = "data/RNASEP_DMS_0000.rdat.outu"
shape_file_p = "data/RNASEP_DMS_0000.rdat.outp"
datau = pd.read_csv(shape_file_u, sep=" ", header=None)[2]
datap = pd.read_csv(shape_file_p, sep=" ", header=None)[2]
datu = datau.values.tolist()
datp = datap.values.tolist()
dat = datu+datp
Nu = len(datu)
Np = len(datp)
N = len(dat)
print("Np ", Np, "Nu ", Nu, "N ", N)
# Student's T-test
ttest = stats.ttest_ind(datau, datap)
print("ttest ", ttest)
#
# ttest_statistic
#
mean_u = np.mean(datau)
mean_p = np.mean(datap)
err2_u = (Nu-1)*np.var(datau)
err2_p = (Np-1)*np.var(datap)
denom = np.sqrt((err2_u + err2_p)/(Nu+Np-2)) * np.sqrt(1/Nu + 1/Np)
ttest_val = abs(mean_u-mean_p) / denom
print("ttest statistic? ", ttest_val)
Np 160 Nu 105 N 265 ttest Ttest_indResult(statistic=6.06184721029099, pvalue=4.649434300011364e-09) ttest statistic? 6.090552310798687
In [3]:
# P(r|U) P(r|P)
nbin = 10000
datu_h = plt.hist(datu, color="b", histtype="step", bins=nbin, label='Unpaired residues')
plt.ylim(0,7.2)
plt.xlim(0,0.40)
plt.legend()
plt.show()
datp_h = plt.hist(datp, color="orange", histtype="step", bins=nbin, label='Paired residues')
plt.legend()
plt.ylim(0,7.2)
plt.xlim(0,0.40)
plt.show()
dat_h = plt.hist(dat, color="black", histtype="step", bins=nbin, label='All residues')
plt.legend()
plt.ylim(0,7.2)
plt.xlim(0,0.40)
plt.show()
# the CDF for datau is the p-value
datu_cdf, datu_bins, datu_patches = plt.hist(datu, density = True, cumulative=True, histtype="step", bins=nbin, label=" P-values")
plt.legend()
plt.xlim(0,0.40)
plt.show()
pval = datu_cdf
# cumulative count of reactivities for pair/all residues
datp_ucdf, datp_bins, datp_patches = plt.hist(datp, color="orange",density = 0, cumulative=True, histtype="step", bins=nbin, label='Cummulative Paired residues')
dat_ucdf, dat_bins, dat_patches = plt.hist(dat, color="black", density = 0, cumulative=True, histtype="step", bins=nbin, label='Cumulative All residues')
plt.legend()
plt.xlim(0,0.40)
plt.show()
In [5]:
# Wednesday 4 Oct 2023
#
# P-value (r_target) = P(r < r_target | U)
#
nbin = 5000
pval, react, patches = plt.hist(datu, density = True, cumulative=True, bins=nbin, label=" P-values")
# Cumulative
datp_cum, datp_bins, foo = plt.hist(datp, density = 0, cumulative=True, bins=nbin, label='Cummulative Paired residues')
datu_cum, datu_bins, foo = plt.hist(datu, density = 0, cumulative=True, bins=nbin, label='Cumulative All residues')
dat_cum, dat_bins, foo = plt.hist(dat, density = 0, cumulative=True, bins=nbin, label='Cumulative All residues')
P = Np # P = The Trues (basepaired residues)
for i in range(nbin):
# We use the P(r|U) as describing the null hypothesis
pval_target = pval[i]
r_target = react[i]
# do the analysis up to a point.
# max r_target = 0.007
r_target_max = 0.007
if r_target > r_target_max:
break
#
# r <= r_target are going to be assigned P
# r >= r_target are going to be assigend U
#
# F = Found paired = total residues (out of N) with r <= r_target
#
for j in range(nbin):
if dat_bins[j] <= r_target:
F = dat_cum[j] # F = Found
if datp_bins[j] <= r_target:
PF = datp_cum[j] # PF = P and Found
if datu_bins[j] <= r_target:
UF = datu_cum[j] # UF = U and Found
# FP = expected false positives =
# = expected from null to have r < r_target
#
FP = pval_target*N # expected false positives
FDR = FP/F # False Discovery Rate =
# fraction of FP per found
sen = PF/P * 100 # sensitivity = True basepairs found with r < r_target
# print all those numbers
#
# N = 265 = # total residues
# P = 160 = # paired residues
# U = 105 = # unpaired residues
#
# r_target pval_target F(found)/N [#PF #UF] sen(PF/P) exp_FP FDR of F pval of N
#
print("\nr_target", '{:.4f}'.format(r_target), "pval_target", '{:.4f}'.format(pval_target),
"Found", F, "/", N,
"\nexpected FP", '{:.2f}'.format(FP),
"\n= [FDR", '{:.4f}'.format(FDR), "x", F, "]",
"\n= [pval", '{:.4f}'.format(pval_target), "x", N, "]",
"\nfound FP", '{:.2f}'.format(UF),
"\nfound positives", '{:.2f}'.format(PF), "/", '{:.2f}'.format(P),
"sensitivity = ", '{:.2f}'.format(sen), "%"
)
r_target 0.0026 pval_target 0.0190 Found 25.0 / 265 expected FP 5.05 = [FDR 0.2019 x 25.0 ] = [pval 0.0190 x 265 ] found FP 2.00 found positives 23.00 / 160.00 sensitivity = 14.37 % r_target 0.0027 pval_target 0.0190 Found 25.0 / 265 expected FP 5.05 = [FDR 0.2019 x 25.0 ] = [pval 0.0190 x 265 ] found FP 2.00 found positives 23.00 / 160.00 sensitivity = 14.37 % r_target 0.0027 pval_target 0.0190 Found 28.0 / 265 expected FP 5.05 = [FDR 0.1803 x 28.0 ] = [pval 0.0190 x 265 ] found FP 2.00 found positives 26.00 / 160.00 sensitivity = 16.25 % r_target 0.0028 pval_target 0.0190 Found 29.0 / 265 expected FP 5.05 = [FDR 0.1741 x 29.0 ] = [pval 0.0190 x 265 ] found FP 2.00 found positives 27.00 / 160.00 sensitivity = 16.88 % r_target 0.0029 pval_target 0.0286 Found 36.0 / 265 expected FP 7.57 = [FDR 0.2103 x 36.0 ] = [pval 0.0286 x 265 ] found FP 3.00 found positives 33.00 / 160.00 sensitivity = 20.62 % r_target 0.0030 pval_target 0.0286 Found 36.0 / 265 expected FP 7.57 = [FDR 0.2103 x 36.0 ] = [pval 0.0286 x 265 ] found FP 3.00 found positives 33.00 / 160.00 sensitivity = 20.62 % r_target 0.0030 pval_target 0.0286 Found 36.0 / 265 expected FP 7.57 = [FDR 0.2103 x 36.0 ] = [pval 0.0286 x 265 ] found FP 3.00 found positives 33.00 / 160.00 sensitivity = 20.62 % r_target 0.0031 pval_target 0.0286 Found 37.0 / 265 expected FP 7.57 = [FDR 0.2046 x 37.0 ] = [pval 0.0286 x 265 ] found FP 3.00 found positives 34.00 / 160.00 sensitivity = 21.25 % r_target 0.0032 pval_target 0.0381 Found 39.0 / 265 expected FP 10.10 = [FDR 0.2589 x 39.0 ] = [pval 0.0381 x 265 ] found FP 4.00 found positives 35.00 / 160.00 sensitivity = 21.88 % r_target 0.0033 pval_target 0.0476 Found 39.0 / 265 expected FP 12.62 = [FDR 0.3236 x 39.0 ] = [pval 0.0476 x 265 ] found FP 5.00 found positives 35.00 / 160.00 sensitivity = 21.88 % r_target 0.0033 pval_target 0.0571 Found 42.0 / 265 expected FP 15.14 = [FDR 0.3605 x 42.0 ] = [pval 0.0571 x 265 ] found FP 6.00 found positives 37.00 / 160.00 sensitivity = 23.12 % r_target 0.0034 pval_target 0.0571 Found 45.0 / 265 expected FP 15.14 = [FDR 0.3365 x 45.0 ] = [pval 0.0571 x 265 ] found FP 6.00 found positives 39.00 / 160.00 sensitivity = 24.38 % r_target 0.0035 pval_target 0.0571 Found 45.0 / 265 expected FP 15.14 = [FDR 0.3365 x 45.0 ] = [pval 0.0571 x 265 ] found FP 6.00 found positives 40.00 / 160.00 sensitivity = 25.00 % r_target 0.0036 pval_target 0.0571 Found 46.0 / 265 expected FP 15.14 = [FDR 0.3292 x 46.0 ] = [pval 0.0571 x 265 ] found FP 6.00 found positives 40.00 / 160.00 sensitivity = 25.00 % r_target 0.0036 pval_target 0.0857 Found 47.0 / 265 expected FP 22.71 = [FDR 0.4833 x 47.0 ] = [pval 0.0857 x 265 ] found FP 9.00 found positives 41.00 / 160.00 sensitivity = 25.62 % r_target 0.0037 pval_target 0.0857 Found 53.0 / 265 expected FP 22.71 = [FDR 0.4286 x 53.0 ] = [pval 0.0857 x 265 ] found FP 9.00 found positives 44.00 / 160.00 sensitivity = 27.50 % r_target 0.0038 pval_target 0.0857 Found 53.0 / 265 expected FP 22.71 = [FDR 0.4286 x 53.0 ] = [pval 0.0857 x 265 ] found FP 9.00 found positives 45.00 / 160.00 sensitivity = 28.12 % r_target 0.0039 pval_target 0.0952 Found 54.0 / 265 expected FP 25.24 = [FDR 0.4674 x 54.0 ] = [pval 0.0952 x 265 ] found FP 10.00 found positives 45.00 / 160.00 sensitivity = 28.12 % r_target 0.0039 pval_target 0.0952 Found 57.0 / 265 expected FP 25.24 = [FDR 0.4428 x 57.0 ] = [pval 0.0952 x 265 ] found FP 10.00 found positives 47.00 / 160.00 sensitivity = 29.38 % r_target 0.0040 pval_target 0.0952 Found 58.0 / 265 expected FP 25.24 = [FDR 0.4351 x 58.0 ] = [pval 0.0952 x 265 ] found FP 10.00 found positives 48.00 / 160.00 sensitivity = 30.00 % r_target 0.0041 pval_target 0.0952 Found 58.0 / 265 expected FP 25.24 = [FDR 0.4351 x 58.0 ] = [pval 0.0952 x 265 ] found FP 10.00 found positives 48.00 / 160.00 sensitivity = 30.00 % r_target 0.0042 pval_target 0.1048 Found 59.0 / 265 expected FP 27.76 = [FDR 0.4705 x 59.0 ] = [pval 0.1048 x 265 ] found FP 11.00 found positives 49.00 / 160.00 sensitivity = 30.63 % r_target 0.0042 pval_target 0.1048 Found 62.0 / 265 expected FP 27.76 = [FDR 0.4478 x 62.0 ] = [pval 0.1048 x 265 ] found FP 11.00 found positives 51.00 / 160.00 sensitivity = 31.87 % r_target 0.0043 pval_target 0.1048 Found 63.0 / 265 expected FP 27.76 = [FDR 0.4407 x 63.0 ] = [pval 0.1048 x 265 ] found FP 11.00 found positives 52.00 / 160.00 sensitivity = 32.50 % r_target 0.0044 pval_target 0.1048 Found 63.0 / 265 expected FP 27.76 = [FDR 0.4407 x 63.0 ] = [pval 0.1048 x 265 ] found FP 11.00 found positives 52.00 / 160.00 sensitivity = 32.50 % r_target 0.0044 pval_target 0.1333 Found 65.0 / 265 expected FP 35.33 = [FDR 0.5436 x 65.0 ] = [pval 0.1333 x 265 ] found FP 14.00 found positives 54.00 / 160.00 sensitivity = 33.75 % r_target 0.0045 pval_target 0.1333 Found 69.0 / 265 expected FP 35.33 = [FDR 0.5121 x 69.0 ] = [pval 0.1333 x 265 ] found FP 14.00 found positives 55.00 / 160.00 sensitivity = 34.38 % r_target 0.0046 pval_target 0.1333 Found 73.0 / 265 expected FP 35.33 = [FDR 0.4840 x 73.0 ] = [pval 0.1333 x 265 ] found FP 14.00 found positives 55.00 / 160.00 sensitivity = 34.38 % r_target 0.0047 pval_target 0.1524 Found 73.0 / 265 expected FP 40.38 = [FDR 0.5532 x 73.0 ] = [pval 0.1524 x 265 ] found FP 16.00 found positives 59.00 / 160.00 sensitivity = 36.88 % r_target 0.0047 pval_target 0.1619 Found 78.0 / 265 expected FP 42.90 = [FDR 0.5501 x 78.0 ] = [pval 0.1619 x 265 ] found FP 17.00 found positives 62.00 / 160.00 sensitivity = 38.75 % r_target 0.0048 pval_target 0.1619 Found 80.0 / 265 expected FP 42.90 = [FDR 0.5363 x 80.0 ] = [pval 0.1619 x 265 ] found FP 17.00 found positives 63.00 / 160.00 sensitivity = 39.38 % r_target 0.0049 pval_target 0.1619 Found 82.0 / 265 expected FP 42.90 = [FDR 0.5232 x 82.0 ] = [pval 0.1619 x 265 ] found FP 17.00 found positives 63.00 / 160.00 sensitivity = 39.38 % r_target 0.0050 pval_target 0.1714 Found 82.0 / 265 expected FP 45.43 = [FDR 0.5540 x 82.0 ] = [pval 0.1714 x 265 ] found FP 18.00 found positives 65.00 / 160.00 sensitivity = 40.62 % r_target 0.0050 pval_target 0.1714 Found 83.0 / 265 expected FP 45.43 = [FDR 0.5473 x 83.0 ] = [pval 0.1714 x 265 ] found FP 18.00 found positives 65.00 / 160.00 sensitivity = 40.62 % r_target 0.0051 pval_target 0.1714 Found 83.0 / 265 expected FP 45.43 = [FDR 0.5473 x 83.0 ] = [pval 0.1714 x 265 ] found FP 18.00 found positives 65.00 / 160.00 sensitivity = 40.62 % r_target 0.0052 pval_target 0.1714 Found 83.0 / 265 expected FP 45.43 = [FDR 0.5473 x 83.0 ] = [pval 0.1714 x 265 ] found FP 18.00 found positives 65.00 / 160.00 sensitivity = 40.62 % r_target 0.0053 pval_target 0.1714 Found 83.0 / 265 expected FP 45.43 = [FDR 0.5473 x 83.0 ] = [pval 0.1714 x 265 ] found FP 18.00 found positives 65.00 / 160.00 sensitivity = 40.62 % r_target 0.0053 pval_target 0.1810 Found 84.0 / 265 expected FP 47.95 = [FDR 0.5709 x 84.0 ] = [pval 0.1810 x 265 ] found FP 19.00 found positives 66.00 / 160.00 sensitivity = 41.25 % r_target 0.0054 pval_target 0.1810 Found 87.0 / 265 expected FP 47.95 = [FDR 0.5512 x 87.0 ] = [pval 0.1810 x 265 ] found FP 19.00 found positives 68.00 / 160.00 sensitivity = 42.50 % r_target 0.0055 pval_target 0.2000 Found 90.0 / 265 expected FP 53.00 = [FDR 0.5889 x 90.0 ] = [pval 0.2000 x 265 ] found FP 21.00 found positives 68.00 / 160.00 sensitivity = 42.50 % r_target 0.0056 pval_target 0.2095 Found 90.0 / 265 expected FP 55.52 = [FDR 0.6169 x 90.0 ] = [pval 0.2095 x 265 ] found FP 22.00 found positives 69.00 / 160.00 sensitivity = 43.12 % r_target 0.0056 pval_target 0.2286 Found 92.0 / 265 expected FP 60.57 = [FDR 0.6584 x 92.0 ] = [pval 0.2286 x 265 ] found FP 24.00 found positives 70.00 / 160.00 sensitivity = 43.75 % r_target 0.0057 pval_target 0.2286 Found 95.0 / 265 expected FP 60.57 = [FDR 0.6376 x 95.0 ] = [pval 0.2286 x 265 ] found FP 24.00 found positives 71.00 / 160.00 sensitivity = 44.38 % r_target 0.0058 pval_target 0.2476 Found 99.0 / 265 expected FP 65.62 = [FDR 0.6628 x 99.0 ] = [pval 0.2476 x 265 ] found FP 26.00 found positives 71.00 / 160.00 sensitivity = 44.38 % r_target 0.0059 pval_target 0.2667 Found 99.0 / 265 expected FP 70.67 = [FDR 0.7138 x 99.0 ] = [pval 0.2667 x 265 ] found FP 28.00 found positives 73.00 / 160.00 sensitivity = 45.62 % r_target 0.0059 pval_target 0.2667 Found 104.0 / 265 expected FP 70.67 = [FDR 0.6795 x 104.0 ] = [pval 0.2667 x 265 ] found FP 28.00 found positives 76.00 / 160.00 sensitivity = 47.50 % r_target 0.0060 pval_target 0.2667 Found 105.0 / 265 expected FP 70.67 = [FDR 0.6730 x 105.0 ] = [pval 0.2667 x 265 ] found FP 28.00 found positives 77.00 / 160.00 sensitivity = 48.12 % r_target 0.0061 pval_target 0.2667 Found 106.0 / 265 expected FP 70.67 = [FDR 0.6667 x 106.0 ] = [pval 0.2667 x 265 ] found FP 28.00 found positives 77.00 / 160.00 sensitivity = 48.12 % r_target 0.0061 pval_target 0.2762 Found 106.0 / 265 expected FP 73.19 = [FDR 0.6905 x 106.0 ] = [pval 0.2762 x 265 ] found FP 29.00 found positives 78.00 / 160.00 sensitivity = 48.75 % r_target 0.0062 pval_target 0.2762 Found 108.0 / 265 expected FP 73.19 = [FDR 0.6777 x 108.0 ] = [pval 0.2762 x 265 ] found FP 29.00 found positives 79.00 / 160.00 sensitivity = 49.38 % r_target 0.0063 pval_target 0.2762 Found 110.0 / 265 expected FP 73.19 = [FDR 0.6654 x 110.0 ] = [pval 0.2762 x 265 ] found FP 29.00 found positives 81.00 / 160.00 sensitivity = 50.62 % r_target 0.0064 pval_target 0.2857 Found 113.0 / 265 expected FP 75.71 = [FDR 0.6700 x 113.0 ] = [pval 0.2857 x 265 ] found FP 30.00 found positives 81.00 / 160.00 sensitivity = 50.62 % r_target 0.0064 pval_target 0.2857 Found 113.0 / 265 expected FP 75.71 = [FDR 0.6700 x 113.0 ] = [pval 0.2857 x 265 ] found FP 30.00 found positives 83.00 / 160.00 sensitivity = 51.88 % r_target 0.0065 pval_target 0.2857 Found 114.0 / 265 expected FP 75.71 = [FDR 0.6642 x 114.0 ] = [pval 0.2857 x 265 ] found FP 30.00 found positives 84.00 / 160.00 sensitivity = 52.50 % r_target 0.0066 pval_target 0.2857 Found 115.0 / 265 expected FP 75.71 = [FDR 0.6584 x 115.0 ] = [pval 0.2857 x 265 ] found FP 30.00 found positives 85.00 / 160.00 sensitivity = 53.12 % r_target 0.0067 pval_target 0.2952 Found 115.0 / 265 expected FP 78.24 = [FDR 0.6803 x 115.0 ] = [pval 0.2952 x 265 ] found FP 31.00 found positives 85.00 / 160.00 sensitivity = 53.12 % r_target 0.0067 pval_target 0.2952 Found 117.0 / 265 expected FP 78.24 = [FDR 0.6687 x 117.0 ] = [pval 0.2952 x 265 ] found FP 31.00 found positives 86.00 / 160.00 sensitivity = 53.75 % r_target 0.0068 pval_target 0.2952 Found 119.0 / 265 expected FP 78.24 = [FDR 0.6575 x 119.0 ] = [pval 0.2952 x 265 ] found FP 31.00 found positives 88.00 / 160.00 sensitivity = 55.00 % r_target 0.0069 pval_target 0.2952 Found 121.0 / 265 expected FP 78.24 = [FDR 0.6466 x 121.0 ] = [pval 0.2952 x 265 ] found FP 31.00 found positives 90.00 / 160.00 sensitivity = 56.25 % r_target 0.0070 pval_target 0.2952 Found 121.0 / 265 expected FP 78.24 = [FDR 0.6466 x 121.0 ] = [pval 0.2952 x 265 ] found FP 31.00 found positives 90.00 / 160.00 sensitivity = 56.25 %
In [ ]:
In [ ]:
In [ ]: