Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RAISS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Statistical-Genetics
RAISS
Commits
b3826dc8
Commit
b3826dc8
authored
Jan 05, 2021
by
Hanna JULIENNE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a ld_score to ensure that imputed SNPs have been imputed from enough typed SNPs
parent
24b766b9
Pipeline
#44654
passed with stages
in 1 minute and 10 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
doc/source/index.rst
doc/source/index.rst
+0
-1
raiss/filter_format_output.py
raiss/filter_format_output.py
+4
-3
raiss/pipes.py
raiss/pipes.py
+1
-0
raiss/stat_models.py
raiss/stat_models.py
+1
-2
No files found.
doc/source/index.rst
View file @
b3826dc8
...
...
@@ -88,7 +88,6 @@ Output
======
The raiss package outputs imputed GWAS files in the tabular format:
..TODO suppress complementary columns
+-------------+----------+------------+------------+---------+-------+----------+
| snp_ids | position | Ref_allele | Alt_allele | z_score | Var | ld_score |
...
...
raiss/filter_format_output.py
View file @
b3826dc8
...
...
@@ -4,7 +4,7 @@
"""
def
filter_output
(
zscores
,
fout
,
R2_threshold
=
0.6
):
def
filter_output
(
zscores
,
fout
,
R2_threshold
=
0.6
,
minimum_ld
=
20
):
"""
procedure that format output for JASS
...
...
@@ -18,6 +18,7 @@ def filter_output(zscores, fout, R2_threshold = 0.6):
zscores
.
reset_index
(
inplace
=
True
)
chr_fo
=
zscores
[[
'index'
,
'pos'
,
'A0'
,
'A1'
,
'Z'
,
'Var'
,
"ld_score"
]]
chr_fo
.
columns
=
[
'rsID'
,
'pos'
,
'A0'
,
'A1'
,
'Z'
,
'Var'
,
"ld_score"
]
chr_fo
[
"imputation_R2"
]
=
1
-
chr_fo
[
"Var"
]
chr_fo
.
columns
=
[
'rsID'
,
'pos'
,
'A0'
,
'A1'
,
'Z'
,
'Var'
,
"ld_score"
,
"imputation_R2"
]
chr_fo
.
loc
[
chr_fo
.
Var
<
(
1
-
R2_thresho
ld
)].
to_csv
(
fout
,
sep
=
"
\t
"
,
index
=
False
)
chr_fo
.
loc
[
(
chr_fo
.
Var
<
(
1
-
R2_threshold
))
&
(
chr_fo
.
ld_score
>
minimum_
ld
)].
to_csv
(
fout
,
sep
=
"
\t
"
,
index
=
False
)
raiss/pipes.py
View file @
b3826dc8
...
...
@@ -41,6 +41,7 @@ def save_chromosome_imputation(gwas, chrom, window_size, buffer_size,
# Formatting and filtering
# and Saving results
minimum_ld
=
20
z_fo
=
"{0}/z_{1}_{2}{3}.txt"
.
format
(
output_folder
,
gwas
,
chrom
,
tag
)
filter_output
(
imputed_zscore
,
z_fo
,
float
(
R2_threshold
))
print
(
"Save imputation done at {0}"
.
format
(
z_fo
))
raiss/stat_models.py
View file @
b3826dc8
...
...
@@ -53,8 +53,7 @@ def compute_var(sig_i_t, sig_t_inv, lamb, batch=True):
return
var
,
ld_score
def
check_inversion
(
sig_t
,
sig_t_inv
):
print
(
sig_t
)
print
(
sig_t_inv
)
return
np
.
allclose
(
sig_t
,
np
.
dot
(
sig_t
,
np
.
dot
(
sig_t_inv
,
sig_t
)))
def
var_in_boundaries
(
var
,
lamb
):
...
...
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