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
9fcdbbb9
Commit
9fcdbbb9
authored
Apr 12, 2018
by
Hanna JULIENNE
Browse files
Added ld_score to the output
parent
2ec760e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
impute_jass/impute_jass/windows.py
View file @
9fcdbbb9
...
...
@@ -43,8 +43,9 @@ def prepare_zscore_for_imputation(ref_panel, zscore):
the snps that are not present in the ref panel are filtered
"""
zscore
=
realigned_zfiles_on_panel
(
ref_panel
,
zscore
)
zscore
[
'Var'
]
=
1
zscore
[
'Var'
]
=
-
1
zscore
[
'Nsnp_to_impute'
]
=
-
1
zscore
[
'ld_score'
]
=
-
1
zscore
=
zscore
.
loc
[
zscore
.
index
.
intersection
(
ref_panel
.
index
)]
return
zscore
...
...
@@ -138,8 +139,8 @@ def impg_like_imputation(ld_file, ref_panel, zscore, window_size, buffer, lamb,
in_core_window
=
in_region
(
batch_df
.
pos
,
start_core_window
,
end_core_window
)
# keep only SNP with non negligible explained variance
snp_well_predicted
=
batch_df
.
Var
<
0.
5
batch_df_filt
=
batch_df
_filt
.
loc
[
in_core_window
&
snp_well_predicted
,
zscore_results
.
columns
]
snp_well_predicted
=
(
batch_df
.
Var
<
0.
4
)
batch_df_filt
=
batch_df
.
loc
[
in_core_window
&
snp_well_predicted
,
zscore_results
.
columns
]
zscore_results
=
pd
.
concat
([
zscore_results
,
batch_df_filt
])
i
=
i
+
1
print_progression
(
i
,
Nwindows
)
...
...
Write
Preview
Markdown
is supported
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