Commit 5ab52154 authored by Hanna  JULIENNE's avatar Hanna JULIENNE

adding main file

parent da779b03
......@@ -6,6 +6,18 @@ import glob
import pandas as pd
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 perform imputation of snp from summary statistic
......
......@@ -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
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:
condition_number = np.array([np.linalg.cond(sig_t)]*sig_i_t.shape[0])
......
......@@ -12,11 +12,11 @@ setup(name='impute_jass',
package_data = {'impute_jass':'./data/*.csv'},
zip_safe=False
entry_points={
'console_scripts' : [
'impute_chromosome = '
]
}
# entry_points={
# 'console_scripts' : [
# 'impute_chromosome = imputation_launcher:chromosome_imputation_entry_point'
#
# ]
# }
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment