annotate bismark2report_wrapper.py @ 38:b2d0e92f81c2 draft default tip

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
author bgruening
date Thu, 22 Apr 2021 17:05:07 +0000
parents a5faad9e4138
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
1 #!/usr/bin/python
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
2
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
3 import argparse
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
4 import logging
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
5 import subprocess
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
6 import sys
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
7
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
8
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
9 def stop_err(logger, msg):
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
10 logger.critical(msg)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
11 sys.exit()
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
12
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
13
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
14 def log_subprocess_output(logger, pipe):
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
15 for line in iter(pipe.readline, b""):
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
16 logger.debug(line.decode().rstrip())
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
17
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
18
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
19 def get_arg():
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
20 parser = argparse.ArgumentParser()
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
21 parser.add_argument(
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
22 "--alignment_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
23 dest="alignment_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
24 action="store",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
25 metavar="alignment_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
26 type=str,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
27 )
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
28 parser.add_argument(
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
29 "--dedup_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
30 dest="dedup_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
31 action="store",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
32 metavar="dedup_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
33 type=str,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
34 )
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
35 parser.add_argument(
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
36 "--splitting_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
37 dest="splitting_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
38 action="store",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
39 metavar="splitting_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
40 type=str,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
41 )
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
42 parser.add_argument(
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
43 "--mbias_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
44 dest="mbias_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
45 action="store",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
46 metavar="mbias_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
47 type=str,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
48 )
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
49 parser.add_argument(
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
50 "--nucleotide_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
51 dest="nucleotide_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
52 action="store",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
53 metavar="nucleotide_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
54 type=str,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
55 )
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
56 parser.add_argument(
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
57 "--output_html_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
58 dest="output_html_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
59 action="store",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
60 metavar="output_html_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
61 type=str,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
62 )
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
63 parser.add_argument(
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
64 "--log_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
65 dest="log_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
66 action="store",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
67 metavar="log_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
68 type=str,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
69 )
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
70 args = parser.parse_args()
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
71 return args
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
72
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
73
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
74 def __main__():
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
75 args = get_arg()
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
76 logger = logging.getLogger("bismark_deduplicate_wrapper")
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
77 logger.setLevel(logging.DEBUG)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
78 ch = logging.StreamHandler(sys.stdout)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
79 if args.log_report:
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
80 ch.setLevel(logging.WARNING)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
81 handler = logging.FileHandler(args.log_report)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
82 handler.setLevel(logging.DEBUG)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
83 logger.addHandler(handler)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
84 else:
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
85 ch.setLevel(logging.DEBUG)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
86 logger.addHandler(ch)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
87
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
88 cmd = [
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
89 "bismark2report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
90 "--verbose",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
91 "--alignment_report",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
92 args.alignment_report,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
93 "--output",
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
94 args.output_html_report,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
95 ]
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
96
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
97 if args.dedup_report:
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
98 cmd.extend(["--dedup_report", args.dedup_report])
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
99 if args.splitting_report:
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
100 cmd.extend(["--splitting_report", args.splitting_report])
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
101 if args.mbias_report:
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
102 cmd.extend(["--mbias_report", args.mbias_report])
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
103 if args.nucleotide_report:
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
104 cmd.extend(["--nucleotide_report", args.nucleotide_report])
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
105
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
106 logger.info("Generating report with: '%s'", " ".join(cmd))
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
107 process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
108 with process.stdout:
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
109 log_subprocess_output(logger, process.stdout)
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
110 exitcode = process.wait()
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
111 if exitcode != 0:
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
112 stop_err(
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
113 logger,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
114 "Bismark pretty report error (also check the log file if any)!\n%s"
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
115 % process.stderr,
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
116 )
25
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
117
a5faad9e4138 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 51299fa62f0566a4a897b1c149db564631282fff
bgruening
parents:
diff changeset
118
38
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
119 if __name__ == "__main__":
b2d0e92f81c2 "planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/bismark commit 8fdc76a99a9dcf34549898a208317607afd18798"
bgruening
parents: 25
diff changeset
120 __main__()