Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Statistical-Genetics
RAISS
Commits
5ab52154
Commit
5ab52154
authored
Mar 26, 2018
by
Hanna JULIENNE
Browse files
adding main file
parent
da779b03
Changes
4
Hide whitespace changes
Inline
Side-by-side
impute_jass/impute_jass/imputation_launcher.py
View file @
5ab52154
...
@@ -6,6 +6,18 @@ import glob
...
@@ -6,6 +6,18 @@ import glob
import
pandas
as
pd
import
pandas
as
pd
from
.windows
import
ld_region_centered_window_imputation
,
impg_like_imputation
,
realigned_zfiles_on_panel
from
.windows
import
ld_region_centered_window_imputation
,
impg_like_imputation
,
realigned_zfiles_on_panel
def
chromosome_imputation_entry_point
(
chrom
,
zscore
,
ref_panel
,
ld_folder
,
window_size
=
10000
,
imputation_style
=
"online"
,
buf
=
2500
,
lamb
=
0.01
,
pinv_rcond
=
0.01
):
"""
Function whose only purpose is to allow the calling of the ImputationLauncher.chromosome_imputation method
from an entry point
"""
imputer
=
ImputationLauncher
(
window_size
=
10000
,
imputation_style
=
"online"
,
buf
=
2500
,
lamb
=
0.01
,
pinv_rcond
=
0.01
)
imputer
.
chromosome_imputation
(
chrom
,
zscore
,
ref_panel
,
ld_folder
)
class
ImputationLauncher
(
object
):
class
ImputationLauncher
(
object
):
"""
"""
Class perform imputation of snp from summary statistic
Class perform imputation of snp from summary statistic
...
...
impute_jass/impute_jass/main.py
0 → 100644
View file @
5ab52154
impute_jass/impute_jass/stat_models.py
View file @
5ab52154
...
@@ -28,7 +28,7 @@ def impg_model(zt, sig_t, sig_i_t, lamb=0.01, rcond=0.01, batch=True):
...
@@ -28,7 +28,7 @@ def impg_model(zt, sig_t, sig_i_t, lamb=0.01, rcond=0.01, batch=True):
"""
"""
sig_t
=
sig_t
.
values
sig_t
=
sig_t
.
values
np
.
fill_diagonal
(
sig_t
,
(
1
+
lamb
))
np
.
fill_diagonal
(
sig_t
,
(
1
+
lamb
))
sig_t_inv
=
sc
.
linalg
.
pinv
(
sig_t
)
#
, rcond=rcond)
sig_t_inv
=
sc
.
linalg
.
pinv
(
sig_t
,
rcond
=
rcond
)
if
batch
:
if
batch
:
condition_number
=
np
.
array
([
np
.
linalg
.
cond
(
sig_t
)]
*
sig_i_t
.
shape
[
0
])
condition_number
=
np
.
array
([
np
.
linalg
.
cond
(
sig_t
)]
*
sig_i_t
.
shape
[
0
])
...
...
impute_jass/setup.py
View file @
5ab52154
...
@@ -12,11 +12,11 @@ setup(name='impute_jass',
...
@@ -12,11 +12,11 @@ setup(name='impute_jass',
package_data
=
{
'impute_jass'
:
'./data/*.csv'
},
package_data
=
{
'impute_jass'
:
'./data/*.csv'
},
zip_safe
=
False
zip_safe
=
False
entry_points
=
{
#
entry_points={
'console_scripts'
:
[
#
'console_scripts' : [
'impute_chromosome = '
#
'impute_chromosome =
imputation_launcher:chromosome_imputation_entry_point
'
#
]
#
]
}
#
}
)
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment