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
4abc5ace
Commit
4abc5ace
authored
Feb 19, 2021
by
hjulienn
Browse files
update imputation_R2
parent
4b88f317
Pipeline
#48332
passed with stages
in 1 minute and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
raiss/imputation_R2.py
View file @
4abc5ace
...
...
@@ -29,7 +29,7 @@ def generated_test_data(zscore, N_to_mask=5000, condition=None, stratifying_vec
if
isinstance
(
condition
,
pd
.
Series
)
==
True
:
masked
=
np
.
random
.
choice
(
zscore
.
index
[
condition
],
N_to_mask
,
replace
=
False
)
else
:
inter_id
=
zscore
.
index
.
intersection
(
stratifying_vector
.
index
).
drop_duplicates
(
keep
=
'first'
,
inplace
=
True
)
inter_id
=
zscore
.
index
.
intersection
(
stratifying_vector
.
index
).
drop_duplicates
(
keep
=
'first'
)
stratifying_vector
=
stratifying_vector
.
loc
[
inter_id
]
if
isinstance
(
stratifying_vector
,
pd
.
Series
)
==
True
:
masked
=
[]
...
...
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