-
Notifications
You must be signed in to change notification settings - Fork 0
/
processDB.py
65 lines (46 loc) · 1.68 KB
/
processDB.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
#!/usr/bin/python
############################################################################################################
#
# Description : Generic script to process CLINVAR related VCF files: nstd45, nstd51,
# nstd101 for both GRCh37, GRCh38 reference genome built
#
#
# Usage: python processCLINVAR.py -i <input-file> -o <output-file-string>
#
#
#
#############################################################################################################
import re,sys,os,getopt
from vcf_parser import VCFParser
script_path = os.path.dirname(os.path.abspath(__file__))
sys.path.append(script_path+"/CONFIG/")
sys.path.append(script_path+"/DB/")
from CONFIG import *
from DB import *
if __name__=="__main__":
#manifest_file,xml_file,db_type,ref_genome,lift_ov_flag,
#proj_date = processArgs(sys.argv[1:])
objC = CONFIG()
cmd_dict = objC.parseDBCommandArgs()
try:
manifest_file = cmd_dict['manifest'][0];
except:
manifest_file = None
xml_file = cmd_dict['analysis']
ref_genome = cmd_dict['ref'];db_name = cmd_dict['db']
try:
lift_ov_flag = cmd_dict['lov']
except:
lift_ov_flag = None
try:
proj_date = cmd_dict['project'][0]
except:
proj_date = None
objC = CONFIG()
objD = dbSV()
configDict = objC.getConfigDict(xml_file)
# Assign boolean True/False to family overlap fraction option
a1 = configDict['overlapMerge']['famOverlapFrac']
configDict['overlapMerge']['famOverlapFrac'] = objC.str2bool(a1)
objD.displayArguments(configDict,db_name,ref_genome,manifest_file,
proj_date,lift_ov_flag)