Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pharmAnnot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
gad-public
pharmAnnot
Commits
eeb9a1cf
Commit
eeb9a1cf
authored
Jun 22, 2018
by
Simon Verdez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajout profondeur et CNV
parent
6bc7cbaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
create_html_v2.py
create_html_v2.py
+22
-1
No files found.
create_html_v2.py
View file @
eeb9a1cf
import
sys
import
sys
import
subprocess
from
pyexcel_ods
import
*
from
pyexcel_ods
import
*
from
pysam
import
VariantFile
from
pysam
import
VariantFile
import
htmltag
import
htmltag
...
@@ -57,6 +57,7 @@ for record in vcf_reader_CNV.fetch():
...
@@ -57,6 +57,7 @@ for record in vcf_reader_CNV.fetch():
for
elm
in
record
.
alts
:
for
elm
in
record
.
alts
:
if
elm
==
"<DEL>"
:
if
elm
==
"<DEL>"
:
ListeM
=
[]
ListeM
=
[]
ListeD
=
[]
body
=
body
.
append
(
htmltag
.
P
(
"Deletion detectee par xHMM sur le gene "
+
record
.
info
[
"GENE"
]))
body
=
body
.
append
(
htmltag
.
P
(
"Deletion detectee par xHMM sur le gene "
+
record
.
info
[
"GENE"
]))
for
i
in
range
(
len
(
data
[
"hg19"
])
-
1
):
for
i
in
range
(
len
(
data
[
"hg19"
])
-
1
):
if
not
data
[
"hg19"
][
i
]:
if
not
data
[
"hg19"
][
i
]:
...
@@ -68,6 +69,26 @@ for record in vcf_reader_CNV.fetch():
...
@@ -68,6 +69,26 @@ for record in vcf_reader_CNV.fetch():
ListeM
.
append
(
data
[
"hg19"
][
i
][
0
])
ListeM
.
append
(
data
[
"hg19"
][
i
][
0
])
for
Mol
in
ListeM
:
for
Mol
in
ListeM
:
body
=
body
.
append
(
htmltag
.
P
(
"######Gene ayant une relation avec :"
+
Mol
))
body
=
body
.
append
(
htmltag
.
P
(
"######Gene ayant une relation avec :"
+
Mol
))
depth_ave
=
0.0
pos_len
=
0
depth_new
=
0
p
=
subprocess
.
Popen
([
"samtools"
,
'depth'
,
BAM_FILE
,
'-r'
,
record
.
chrom
+
':'
+
str
(
record
.
pos
)
+
'-'
\
+
str
(
record
.
stop
)],
stdout
=
subprocess
.
PIPE
)
for
line
in
p
.
stdout
.
readlines
():
item
=
line
.
split
()
if
len
(
item
)
==
3
:
ListeD
.
append
(
item
[
2
])
for
elm
in
ListeD
:
depth_new
=
depth_new
+
int
(
elm
)
depth_ave
=
depth_ave
+
float
(
item
[
2
])
pos_len
=
pos_len
+
(
int
(
record
.
stop
)
-
int
(
record
.
pos
)
+
1
)
depth_ave
=
depth_new
/
float
(
pos_len
)
if
depth_ave
>
40
:
body
=
body
.
append
(
htmltag
.
P
(
"######Detecte heterozygote, profondeur moyenne :"
+
depth_ave
))
if
depth_ave
<
10
:
body
=
body
.
append
(
htmltag
.
P
(
"######Detecte homozygote, profondeur moyenne :"
+
depth_ave
))
else
:
body
=
body
.
append
(
htmltag
.
P
(
"######Detecte probablement heterozygote, profondeur moyenne :"
+
depth_ave
))
if
elm
==
"<DUP>"
:
if
elm
==
"<DUP>"
:
ListeM
=
[]
ListeM
=
[]
body
=
body
.
append
(
htmltag
.
P
(
"Duplication detectee par xHMM sur le gene "
+
record
.
info
[
"GENE"
]))
body
=
body
.
append
(
htmltag
.
P
(
"Duplication detectee par xHMM sur le gene "
+
record
.
info
[
"GENE"
]))
...
...
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