Commit 9138e16a authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

Merge branch 'bug_fix' into 'master'

Bug fix

See merge request !5
parents 01ecc3b2 af3d8532
Pipeline #50938 passed with stages
in 1 minute and 35 seconds
......@@ -37,7 +37,7 @@ def add_chromosome_imputation_argument():
parser.add_argument('--R2-threshold', help= "R square (imputation quality) threshold bellow which SNPs are filtered from the output", default = 0.6)
parser.add_argument("--ld-type", help= "Ld can be supplied as plink command --ld-snp-list output files (see raiss.ld_matrix.launch_plink_ld to compute these data using plink) or as a couple of a scipy sparse matrix (.npz )and an .csv containing SNPs index", default="plink")
parser.add_argument('--ref-panel-suffix', help= "end of the suffix for the reference panel files", default = ".eur.1pct.bim")
parser.add_argument('--ref-panel-suffix', help= "end of the suffix for the reference panel files", default = ".bim")
parser.set_defaults(func=launch_chromosome_imputation)
return(parser)
......
......@@ -82,7 +82,8 @@ def load_plink_ld(plink_ld, ref_chr_df):
mat_ld = pd.DataFrame(sym, index=mat_ld.index, columns=mat_ld.columns)
int_index = ref_chr_df.index.intersection(mat_ld.index)
re_index = ref_chr_df.loc[int_index.index].sort_values(by="pos").index
print(int_index)
re_index = ref_chr_df.loc[int_index].sort_values(by="pos").index
mat_ld = mat_ld.loc[re_index, re_index]
return mat_ld
......
Supports Markdown
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