-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbhmodel.pxd
35 lines (23 loc) · 998 Bytes
/
bhmodel.pxd
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
28
29
30
31
32
33
34
35
import numpy as np
cimport numpy as np
from cpython cimport bool
cdef class Datum:
cdef public long V
cdef public str name
cdef public list snps
cdef public np.ndarray logBF
cdef compute_bayes_factors(self, np.ndarray[np.float64_t, ndim=1] beta, np.ndarray[np.float64_t, ndim=1] stderr, prior_var)
cdef class Posterior:
cdef public double gene
cdef public np.ndarray snp
cdef update(self, Datum datum, Annotation annotation)
cdef class Annotation:
cdef public long N
cdef public double log_prior_odds
cdef public np.ndarray weights
cdef public np.ndarray stderr
cdef public dict annot_labels
cdef public dict annotvalues
cdef tuple compute_func_grad(np.ndarray[np.float64_t, ndim=1] xx, list data, dict annotvalues, list posteriors)
cdef tuple compute_func_grad_hess(np.ndarray[np.float64_t, ndim=1] xx, list data, dict annotvalues, list posteriors)
cdef public double likelihood(list data, list posterior, Annotation annotation)