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
5531345a
Commit
5531345a
authored
Dec 01, 2021
by
simon verdez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change output in create html
parent
f13b5639
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
create_html.py
create_html.py
+14
-2
No files found.
create_html.py
View file @
5531345a
...
@@ -202,7 +202,7 @@ def main():
...
@@ -202,7 +202,7 @@ def main():
if
opt
in
(
"-t"
):
if
opt
in
(
"-t"
):
tsvfile
=
arg
tsvfile
=
arg
elif
opt
in
(
"-o"
):
elif
opt
in
(
"-o"
):
sys
.
stdout
=
open
(
arg
,
'w'
)
outputfile
=
arg
except
getopt
.
GetoptError
:
except
getopt
.
GetoptError
:
print
(
"please use this command as follow: "
)
print
(
"please use this command as follow: "
)
print
(
'usage : python2.7 create_html.py -v <vcf/file> -h <report/from/HLAscan> -t tableau_pharmgkb.tsv -o <path/to/file/results>'
)
print
(
'usage : python2.7 create_html.py -v <vcf/file> -h <report/from/HLAscan> -t tableau_pharmgkb.tsv -o <path/to/file/results>'
)
...
@@ -222,6 +222,10 @@ def main():
...
@@ -222,6 +222,10 @@ def main():
print
(
'No tsv file given'
)
print
(
'No tsv file given'
)
print
(
'usage : python2.7 create_html.py -v <vcf/file> -h <report/from/HLAscan> -t tableau_pharmgkb.tsv -o <path/to/file/results>'
)
print
(
'usage : python2.7 create_html.py -v <vcf/file> -h <report/from/HLAscan> -t tableau_pharmgkb.tsv -o <path/to/file/results>'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
not
vars
()
.
has_key
(
'outputfile'
):
print
(
'No output file given'
)
print
(
'usage : python2.7 create_html.py -v <vcf/file> -h <report/from/HLAscan> -t tableau_pharmgkb.tsv -o <path/to/file/results>'
)
sys
.
exit
(
1
)
# Check files
# Check files
try
:
try
:
...
@@ -242,6 +246,12 @@ def main():
...
@@ -242,6 +246,12 @@ def main():
except
IOError
:
except
IOError
:
print
(
'PharmGKB tsv file does not exist'
)
print
(
'PharmGKB tsv file does not exist'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
try
:
f
=
open
(
outputfile
,
'w'
)
f
.
close
()
except
IOError
:
print
(
"Can't open output file"
)
sys
.
exit
(
1
)
#execute
#execute
...
@@ -251,7 +261,8 @@ def main():
...
@@ -251,7 +261,8 @@ def main():
body
=
extract_rs
(
tsvfile
,
vcfSNP
,
DictRs
,
body
)
body
=
extract_rs
(
tsvfile
,
vcfSNP
,
DictRs
,
body
)
body
=
extract_HLA
(
report
,
DictHLA
,
body
)
body
=
extract_HLA
(
report
,
DictHLA
,
body
)
print
(
htmltag
.
HTML
(
head
+
body
))
with
open
(
outputfile
,
'w'
)
as
output
:
output
.
write
(
htmltag
.
HTML
(
head
+
body
))
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
main
()
main
()
\ No newline at end of file
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