Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Statistical-Genetics
RAISS
Commits
187af22c
Commit
187af22c
authored
Jan 12, 2021
by
Hanna JULIENNE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
broad error handling
parent
a8b212a9
Pipeline
#45166
passed with stages
in 1 minute and 13 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
raiss/windows.py
raiss/windows.py
+3
-2
No files found.
raiss/windows.py
View file @
187af22c
...
...
@@ -177,6 +177,7 @@ def impg_like_imputation(ld_file, ref_panel, zscore, window_size, buffer, lamb,
zt
=
zscore
.
loc
[
known
,
'Z'
]
if
(
len
(
known
)
>
0
):
print
(
"Imputation for window {0} - {1}"
.
format
(
start_windows
,
end_windows
))
imp
=
raiss_model
(
zt
,
sig_t
,
sig_i_t
,
lamb
=
lamb
,
rcond
=
rcond
,
batch
=
True
)
try
:
batch_df
=
format_result_df
(
imp
,
ref_panel
,
known
,
unknowns
)
...
...
@@ -191,8 +192,8 @@ def impg_like_imputation(ld_file, ref_panel, zscore, window_size, buffer, lamb,
print
(
batch_df
)
batch_df_filt
=
batch_df
.
loc
[(
in_core_window
&
snp_well_predicted
),
zscore_results
.
columns
]
zscore_results
=
pd
.
concat
([
zscore_results
,
batch_df_filt
])
except
(
ValueError
,
KeyError
)
as
e
:
print
(
"Inversion failed for window {0} - {1}"
.
format
())
except
(
ValueError
,
KeyError
,
TypeError
)
as
e
:
print
(
"Inversion failed for window {0} - {1}"
.
format
(
start_windows
,
end_windows
))
print
(
"With error : {}"
.
format
(
e
))
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