Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
trio-whole-exome
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
igmmbioinformatics
trio-whole-exome
Commits
889f393c
Commit
889f393c
authored
3 years ago
by
ameyner2
Browse files
Options
Downloads
Patches
Plain Diff
Updated generating IGV scripts
parent
06a48fb1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NHS_WES_generate_DEC_IGV_aff_probands.py
+12
-8
12 additions, 8 deletions
NHS_WES_generate_DEC_IGV_aff_probands.py
NHS_WES_generate_DEC_IGV_sib_from_quad.py
+12
-8
12 additions, 8 deletions
NHS_WES_generate_DEC_IGV_sib_from_quad.py
with
24 additions
and
16 deletions
NHS_WES_generate_DEC_IGV_aff_probands.py
+
12
−
8
View file @
889f393c
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# all G2P variants found in the individual VCF
# all G2P variants found in the individual VCF
#
#
# Author: MH
# Author: MH
# last modified:
MAR 23
, 202
0
# last modified:
AUG 04
, 202
1
...
@@ -420,6 +420,7 @@ def read_G2P(in_file):
...
@@ -420,6 +420,7 @@ def read_G2P(in_file):
# go thru all of their variants
# go thru all of their variants
pro_vars
=
KIDS_G2P_DICT
[
pro_id
]
# a dict with keys: chr,start,end,ref,alt and values: (GT,gene_name,transcript)
pro_vars
=
KIDS_G2P_DICT
[
pro_id
]
# a dict with keys: chr,start,end,ref,alt and values: (GT,gene_name,transcript)
for
var_loc
,
var_info
in
pro_vars
.
iteritems
():
for
var_loc
,
var_info
in
pro_vars
.
iteritems
():
var_chr
,
var_start
,
var_end
,
var_ref
,
var_alt
=
var_loc
.
split
(
'
:
'
)
#~#
found_in_all
=
True
found_in_all
=
True
# check if seen in all probands excl this one
# check if seen in all probands excl this one
...
@@ -429,13 +430,16 @@ def read_G2P(in_file):
...
@@ -429,13 +430,16 @@ def read_G2P(in_file):
found_in_all
=
False
found_in_all
=
False
break
break
# if variant found, check if GT matches
# if variant found, check if GT matches
(excl GT match requirement on chrX)
else
:
else
:
o_info
=
KIDS_G2P_DICT
[
o_id
][
var_loc
]
if
var_chr
==
'
chrX
'
:
#~#
if
var_info
[
0
]
!=
o_info
[
0
]:
pass
#~#
print
"
Excluding variant %s in %s (GT = %s); it is seen in %s but GT does not match (ST = %s)
"
%
(
var_loc
,
pro_id
,
var_info
[
0
],
o_id
,
o_info
[
0
])
else
:
#~#
found_in_all
=
False
o_info
=
KIDS_G2P_DICT
[
o_id
][
var_loc
]
break
if
var_info
[
0
]
!=
o_info
[
0
]:
print
"
Excluding variant %s in %s (GT = %s); it is seen in %s but GT does not match (ST = %s)
"
%
(
var_loc
,
pro_id
,
var_info
[
0
],
o_id
,
o_info
[
0
])
found_in_all
=
False
break
if
found_in_all
:
# this variant has been found in all affected probands with matching GT, keep it
if
found_in_all
:
# this variant has been found in all affected probands with matching GT, keep it
if
var_loc
not
in
SHARED_DICT
:
# it has not been recorded previously when considering another proband
if
var_loc
not
in
SHARED_DICT
:
# it has not been recorded previously when considering another proband
...
@@ -459,7 +463,7 @@ def read_G2P(in_file):
...
@@ -459,7 +463,7 @@ def read_G2P(in_file):
new_key
=
'
%s:%s:%s:%s
'
%
(
chr
,
start
,
ref
,
alt
)
new_key
=
'
%s:%s:%s:%s
'
%
(
chr
,
start
,
ref
,
alt
)
SHARED_DICT
[
new_key
]
=
var_info
SHARED_DICT
[
new_key
]
=
var_info
print
"
Keeping %s found in all affected probands, same GT
"
%
(
new_key
)
print
"
Keeping %s found in all affected probands, same GT
(no check of GT match on chrX)
"
%
(
new_key
)
print
"
---------------------
"
print
"
---------------------
"
...
...
This diff is collapsed.
Click to expand it.
NHS_WES_generate_DEC_IGV_sib_from_quad.py
+
12
−
8
View file @
889f393c
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# all G2P variants found in the individual VCF
# all G2P variants found in the individual VCF
#
#
# Author: MH
# Author: MH
# last modified:
SEPT 16
, 202
0
# last modified:
AUG 04
, 202
1
...
@@ -426,6 +426,7 @@ def read_G2P(in_file):
...
@@ -426,6 +426,7 @@ def read_G2P(in_file):
# go thru all of their variants
# go thru all of their variants
pro_vars
=
KIDS_G2P_DICT
[
pro_id
]
# a dict with keys: chr,start,end,ref,alt and values: (GT,gene_name,transcript)
pro_vars
=
KIDS_G2P_DICT
[
pro_id
]
# a dict with keys: chr,start,end,ref,alt and values: (GT,gene_name,transcript)
for
var_loc
,
var_info
in
pro_vars
.
iteritems
():
for
var_loc
,
var_info
in
pro_vars
.
iteritems
():
var_chr
,
var_start
,
var_end
,
var_ref
,
var_alt
=
var_loc
.
split
(
'
:
'
)
#~#
found_in_all
=
True
found_in_all
=
True
# check if seen in all probands excl this one
# check if seen in all probands excl this one
...
@@ -435,13 +436,16 @@ def read_G2P(in_file):
...
@@ -435,13 +436,16 @@ def read_G2P(in_file):
found_in_all
=
False
found_in_all
=
False
break
break
# if variant found, check if GT matches
# if variant found, check if GT matches
(excl GT match requirement on chrX)
else
:
else
:
o_info
=
KIDS_G2P_DICT
[
o_id
][
var_loc
]
if
var_chr
==
'
chrX
'
:
#~#
if
var_info
[
0
]
!=
o_info
[
0
]:
pass
#~#
print
"
Excluding variant %s in %s (GT = %s); it is seen in %s but GT does not match (ST = %s)
"
%
(
var_loc
,
pro_id
,
var_info
[
0
],
o_id
,
o_info
[
0
])
else
:
#~#
found_in_all
=
False
o_info
=
KIDS_G2P_DICT
[
o_id
][
var_loc
]
break
if
var_info
[
0
]
!=
o_info
[
0
]:
print
"
Excluding variant %s in %s (GT = %s); it is seen in %s but GT does not match (ST = %s)
"
%
(
var_loc
,
pro_id
,
var_info
[
0
],
o_id
,
o_info
[
0
])
found_in_all
=
False
break
if
found_in_all
:
# this variant has been found in all affected probands with matching GT, keep it
if
found_in_all
:
# this variant has been found in all affected probands with matching GT, keep it
if
var_loc
not
in
SHARED_DICT
:
# it has not been recorded previously when considering another proband
if
var_loc
not
in
SHARED_DICT
:
# it has not been recorded previously when considering another proband
...
@@ -465,7 +469,7 @@ def read_G2P(in_file):
...
@@ -465,7 +469,7 @@ def read_G2P(in_file):
new_key
=
'
%s:%s:%s:%s
'
%
(
chr
,
start
,
ref
,
alt
)
new_key
=
'
%s:%s:%s:%s
'
%
(
chr
,
start
,
ref
,
alt
)
SHARED_DICT
[
new_key
]
=
var_info
SHARED_DICT
[
new_key
]
=
var_info
print
"
Keeping %s found in all affected probands, same GT
"
%
(
new_key
)
print
"
Keeping %s found in all affected probands, same GT
(no check of GT match on chrX)
"
%
(
new_key
)
print
"
---------------------
"
print
"
---------------------
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment