-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpaplot
106 lines (96 loc) · 6.2 KB
/
paplot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 02 17:43:52 2015
@author: okada
$Id: paplot 212 2017-09-25 03:06:17Z aokada $
"""
def main():
import paplot.run
from paplot import __version__
import argparse
prog = "paplot"
parser = argparse.ArgumentParser(prog = prog)
parser.add_argument("--version", action = "version", version = prog + "-" + __version__)
subparsers = parser.add_subparsers()
##########
# conf
conf_parser = subparsers.add_parser("conf", help = "view config file")
conf_parser.add_argument("-c", "--config_file", help = "config file", type = str, default = "")
conf_parser.set_defaults(func = paplot.run.conf_main)
##########
# index
index_parser = subparsers.add_parser("index", help = "re-create index file")
index_parser.add_argument("output_dir", help = "output file path", type = str)
index_parser.add_argument("-c", "--config_file", help = "config file", type = str, default = "")
index_parser.add_argument("-r", "--remarks", help = "optional text", type = str, default = "")
index_parser.set_defaults(func = paplot.run.index_main)
##########
# qc
qc_parser = subparsers.add_parser("qc", help = "plot QC Report")
qc_parser.add_argument("input", help = "input files path", type = str)
qc_parser.add_argument("output_dir", help = "output file path", type = str)
qc_parser.add_argument("project_name", help = "project name", type = str)
qc_parser.add_argument("-c", "--config_file", help = "config file", type = str, default = "")
qc_parser.add_argument("-t", "--title", help = "report's title", type = str, default = "QC graphs")
qc_parser.add_argument("-e", "--ellipsis", help = "report file's ID", type = str, default = "qc")
qc_parser.add_argument("-o", "--overview", help = "overview about report file", type = str, default = "Quality Control of bam.")
qc_parser.add_argument("-r", "--remarks", help = "optional text", type = str, default = "")
qc_parser.set_defaults(func = paplot.run.qc_main)
##########
# ca
ca_parser = subparsers.add_parser("ca", help = "plot Chromosomal Aberration Report")
ca_parser.add_argument("input", help = "input files path", type = str)
ca_parser.add_argument("output_dir", help = "output file path", type = str)
ca_parser.add_argument("project_name", help = "project name", type = str)
ca_parser.add_argument("-c", "--config_file", help = "config file", type = str, default = "")
ca_parser.add_argument("-t", "--title", help = "report's title", type = str, default = "CA graphs")
ca_parser.add_argument("-e", "--ellipsis", help = "report file's ID", type = str, default = "ca")
ca_parser.add_argument("-o", "--overview", help = "overview about report file", type = str, default = "Chromosomal Aberration.")
ca_parser.add_argument("-r", "--remarks", help = "optional text", type = str, default = "")
ca_parser.set_defaults(func = paplot.run.ca_main)
##########
# mutation
mutation_parser = subparsers.add_parser("mutation", help = "plot Mutation Matrix Report")
mutation_parser.add_argument("input", help = "input files path", type = str)
mutation_parser.add_argument("output_dir", help = "output file path", type = str)
mutation_parser.add_argument("project_name", help = "project name", type = str)
mutation_parser.add_argument("-c", "--config_file", help = "config file", type = str, default = "")
mutation_parser.add_argument("-t", "--title", help = "report's title", type = str, default = "Mutation matrix")
mutation_parser.add_argument("-e", "--ellipsis", help = "report file's ID", type = str, default = "mutation")
mutation_parser.add_argument("-o", "--overview", help = "overview about report file", type = str, default = "Gene-sample mutational profiles.")
mutation_parser.add_argument("-r", "--remarks", help = "optional text", type = str, default = "")
mutation_parser.set_defaults(func = paplot.run.mutation_main)
##########
# signature
signature_parser = subparsers.add_parser("signature", help = "plot Mutational Signature Report")
signature_parser.add_argument("input", help = "input files path", type = str)
signature_parser.add_argument("output_dir", help = "output file path", type = str)
signature_parser.add_argument("project_name", help = "project name", type = str)
signature_parser.add_argument("-c", "--config_file", help = "config file", type = str, default = "")
signature_parser.add_argument("-t", "--title", help = "report's title", type = str, default = "Signature")
signature_parser.add_argument("-e", "--ellipsis", help = "report file's ID", type = str, default = "signature")
signature_parser.add_argument("-o", "--overview", help = "overview about report file", type = str, default = "Mutational signatures.")
signature_parser.add_argument("-r", "--remarks", help = "optional text", type = str, default = "")
signature_parser.set_defaults(func = paplot.run.signature_main)
##########
# pmsignature
pmsignature_parser = subparsers.add_parser("pmsignature", help = "plot pmsignature Report")
pmsignature_parser.add_argument("input", help = "input files path", type = str)
pmsignature_parser.add_argument("output_dir", help = "output file path", type = str)
pmsignature_parser.add_argument("project_name", help = "project name", type = str)
pmsignature_parser.add_argument("-c", "--config_file", help = "config file", type = str, default = "")
pmsignature_parser.add_argument("-t", "--title", help = "report's title", type = str, default = "PMSignature")
pmsignature_parser.add_argument("-e", "--ellipsis", help = "report file's ID", type = str, default = "pmsignature")
pmsignature_parser.add_argument("-o", "--overview", help = "overview about report file", type = str, default = "Express mutational signatures in pmsignature.")
pmsignature_parser.add_argument("-r", "--remarks", help = "optional text", type = str, default = "")
pmsignature_parser.set_defaults(func = paplot.run.pmsignature_main)
##########
import sys
argv = sys.argv[1:]
if len(argv) < 1:
argv = [""]
args = parser.parse_args(argv)
args.func(args)
if __name__ == "__main__":
main()