Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RAISS
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Statistical-Genetics
RAISS
Commits
911021e1
Commit
911021e1
authored
7 years ago
by
hjulienne
Browse files
Options
Downloads
Patches
Plain Diff
testing stats_model
parent
fa8b3139
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
impute_jass/impute_jass/__init__.py
+1
-0
1 addition, 0 deletions
impute_jass/impute_jass/__init__.py
impute_jass/impute_jass/stat_models.py
+22
-0
22 additions, 0 deletions
impute_jass/impute_jass/stat_models.py
impute_jass/impute_jass/windows.py
+0
-0
0 additions, 0 deletions
impute_jass/impute_jass/windows.py
with
23 additions
and
0 deletions
impute_jass/impute_jass/__init__.py
+
1
−
0
View file @
911021e1
import
impute_jass.ld_matrix
as
LD
import
impute_jass.stat_models
as
model
This diff is collapsed.
Click to expand it.
impute_jass/impute_jass/stat_models.py
0 → 100644
+
22
−
0
View file @
911021e1
"""
function for SNP imputation
"""
import
numpy
as
np
def
ImpG_model
(
Zt
,
Sig_t
,
Sig_i_t
):
"""
Argument:
Zt : (vector) the vector of known Z scores
"""
np
.
fill_diagonal
(
Sig_t
.
values
,
1.01
)
Sig_t
.
fillna
(
0
,
inplace
=
True
)
Sig_t_inv
=
np
.
linalg
.
inv
(
Sig_t
)
Var
=
np
.
diag
(
Sig_t
)[
0
]
-
np
.
einsum
(
'
ij,jk,ki->i
'
,
Sig_i_t
,
Sig_t_inv
,
Sig_i_t
.
transpose
())
mu
=
np
.
dot
(
Sig_i_t
,
np
.
dot
(
Sig_t_inv
,
Zt
))
return
({
"
Var
"
:
Var
,
"
mu
"
:
mu
})
This diff is collapsed.
Click to expand it.
impute_jass/impute_jass/windows.py
0 → 100644
+
0
−
0
View file @
911021e1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment