-
Notifications
You must be signed in to change notification settings - Fork 8
/
pTuneos.py
55 lines (48 loc) · 1.8 KB
/
pTuneos.py
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
import argparse
import os
import sys
from src import ui
import shutil
def main():
str_prog = 'iTuneos'
str_usage = 'python iTuneos.py <command> [options]'
str_desc = r'''
identification of personalized Tumor neoantigens from next-generation sequencing data
'''
p = argparse.ArgumentParser(prog=str_prog,
usage=str_usage,
description=str_desc,
formatter_class=argparse.RawDescriptionHelpFormatter,add_help=True)
p.add_argument('-v', '--version', action='version', version='%(prog)s 1.0.0(dev)')
sp = p.add_subparsers(title='Command', metavar='')
p_PairMatchDna = sp.add_parser('WES',
description='detecting tumor neoantigens using matched pair-end WGS/WES sequencing data',
usage='python iTuneos.py WES [options]',
help='detecting tumor neoantigens using pair-end WGS/WES sequencing data')
ui.ParsePAIRMATCHDNA(p_PairMatchDna)
p_VCF = sp.add_parser('VCF',
description='detecting tumor neoantigens using somatic mutaion data in VCF file format',
usage='python iTuneos.py VCF [options]',
help='detecting tumor neoantigens using somatic mutaion data in VCF file format')
ui.ParseVCF(p_VCF)
if len(sys.argv) == 1:
p.print_help()
sys.exit(1)
elif len(sys.argv) == 2:
if sys.argv[1] == '-h' or sys.argv[1] == '--help':
p.print_help()
if sys.argv[1] == 'WES':
p_PairMatchDna.print_help()
sys.exit(1)
if sys.argv[1] == 'VCF':
p_VCF.print_help()
sys.exit(1)
opts = p.parse_args()
if sys.argv[1] == 'WES':
from src.core import pairendMDNA
pairendMDNA.PEMD(opts)
if sys.argv[1] == 'VCF':
from src.core import VariantCallingFormat
VariantCallingFormat.Vcf(opts)
if __name__ == '__main__':
main()