-
Notifications
You must be signed in to change notification settings - Fork 1
/
hawkeye.py
60 lines (54 loc) · 1.94 KB
/
hawkeye.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
#!/usr/bin/env python
import os,sys
from sys import version_info
def _pickle_method(m):
if m.im_self is None:
return getattr, (m.im_class, m.im_func.func_name)
else:
return getattr, (m.im_self, m.im_func.func_name)
if version_info.major == 2:
import copy_reg
import types
copy_reg.pickle(types.MethodType, _pickle_method)
def Help(argv):
print("python %s <command> [option]"%os.path.basename(argv[0]));
command = '''
commands:
sv_browse fast draw Structural variation or snp-inDel as IGV.
snpindel_browse fast draw snp or indel variation as IGV
sv_genotyping recall sv of existing input vcf file.
rna_browse display isoform structure from iso-seq
regiondepth_browse display depth distribution of your region
'''
print(command);
sys.exit(0)
if __name__ == '__main__':
if len(sys.argv) < 2 or (sys.argv[1] != 'sv_browse' and sys.argv[1] != 'sv_genotyping'
and sys.argv[1]!='regiondepth_browse' and sys.argv[1]!="rna_browse" and sys.argv[1]!="snpindel_browse"):
Help(sys.argv)
sys.exit(0);
if sys.argv[1] == 'sv_browse':
from script.svanalysispipe import *
pipe1 = SVToView();
pipe1.GetOpt();
pipe1.runsvbrowser();
if sys.argv[1] == "snpindel_browse":
from script.snpanalysispipe import *
pipe2 = SNPToView();
pipe2.GetOpt();
pipe2.runsnpbrowser();
if sys.argv[1] == 'sv_genotyping':
from script.svanalysispipe import *
pipe3 = SVToView();
pipe3.GetOpt(genotyping=1);
pipe3.runsvgenotyping();
if sys.argv[1] == 'regiondepth_browse':
from script.depthanalysispipe import *
pipe4 = regionToView()
pipe4.GetOpt();
pipe4.run()
if sys.argv[1] == 'rna_browse':
from script.isoformanalysispipe import *
pipe5 = RNAToView();
pipe5.GetOpt();
pipe5.runrnabrowser();