-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun_snpeff.py
executable file
·82 lines (72 loc) · 2.94 KB
/
run_snpeff.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
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
#!/usr/bin/env python3
import os
import sys
import argparse
from funpipe import *
def main(arguments):
parser = argparse.ArgumentParser(
description='Run snpeff')
# required arguments
required = parser.add_argument_group('required arguments')
required.add_argument(
'-i', '--input_vcf', required=True, help='input vcf')
required.add_argument(
'-o', '--output_vcf', required=True, help='Output vcf')
required.add_argument(
'--genome_name', required=True,
help='genome name in snpeff config file')
required.add_argument(
'-c', '--config', help='config file for snpeff', required=True)
# optional arguments
parser.add_argument('-m', '--ram', type=int, default=4, help='RAM usage')
parser.add_argument('--snpeff_jar', help='jar file of snpeff',
default='/gsap/garage-fungal/Crypto_neoformans_seroD_B454/annotation/snpeff_db/snpEff.jar')
parser.add_argument('--gff3', help='gff3 file')
parser.add_argument('--genome', help='tag of reference genome')
parser.add_argument('--ref_fa', help="Reference fasta file")
args = parser.parse_args(arguments)
if args.snpeff_db:
snpeff_db(
args.gff3, args.dir, args.genome. args.config, args.prefix,
args.ram, args.jar, args.ref_fa)
snpeff(args.input_vcf, args.output_vcf, args.snpeff_jar, args.config,
args.genome_name, args.ram)
print(args)
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))
#!/usr/bin/env python3
import os
import sys
import argparse
from funpipe import *
def main(arguments):
parser = argparse.ArgumentParser(
description='Run snpeff')
# required arguments
required = parser.add_argument_group('required arguments')
required.add_argument(
'-i', '--input_vcf', required=True, help='input vcf')
required.add_argument(
'-o', '--output_vcf', required=True, help='Output vcf')
required.add_argument(
'--genome_name', required=True,
help='genome name in snpeff config file')
required.add_argument(
'-c', '--config', help='config file for snpeff', required=True)
# optional arguments
parser.add_argument('-m', '--ram', type=int, default=4, help='RAM usage')
parser.add_argument('--snpeff_jar', help='jar file of snpeff',
default='/gsap/garage-fungal/Crypto_neoformans_seroD_B454/annotation/snpeff_db/snpEff.jar')
parser.add_argument('--gff3', help='gff3 file')
parser.add_argument('--genome', help='tag of reference genome')
parser.add_argument('--ref_fa', help="Reference fasta file")
args = parser.parse_args(arguments)
if args.snpeff_db:
snpeff_db(
args.gff3, args.dir, args.genome. args.config, args.prefix,
args.ram, args.jar, args.ref_fa)
snpeff(args.input_vcf, args.output_vcf, args.snpeff_jar, args.config,
args.genome_name, args.ram)
print(args)
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))