-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocations.py
86 lines (81 loc) · 3.6 KB
/
locations.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
83
84
85
86
#################################################################
# These global variables have to do with executable locations.
MacLocations = {'build_lmer_table':'/usr/local/RepeatScout/build_lmer_table',
'RptScout':'/usr/local/RepeatScout/RepeatScout',
'filter_stage-1':'/usr/local/RepeatScout/filter-stage-1.prl',
'filter_stage-2':'/usr/local/RepeatScout/filter-stage-2.prl',
'RAIDER':'./raider',
'raider_pre':'./raider_pre',
'bigfoot':'./bigfoot',
'python':'python3.4',
'araider':'./araider',
'phRAIDER': './phRAIDER',
'pre-phRAIDER':'./pre-phRAIDER',
'rm_modules': None,
'RepeatMasker' : 'RepeatMasker',
'proc_per_node' : 1,
'basic_arch_type' : None,
'high_mem_arch' : None,
'blast' : 'blastn',
'blast_modules' : [],
'time_cmd' : "/usr/bin/time -f \"User: %U\\nM: %M\\nK: %K\"",
'CompositeDiscover' : './CompositeDiscover'}
RedhawkLocations = {'build_lmer_table':'./build_lmer_table',
'RptScout':'./RepeatScout',
'filter_stage-1':'./filter-stage-1.prl',
'filter_stage-2':'./filter-stage-2.prl',
'RAIDER':'./raider',
'raider_pre':'./raider_pre',
'bigfoot':'./bigfoot',
'python':'python3.3',
'araider':'./araider',
'phRAIDER': './phRAIDER',
'pre-phRAIDER':'./pre-phRAIDER',
'rm_modules' : ['RepeatMasker', 'python-3.3.3'],
'RepeatMasker' : 'RepeatMasker',
'proc_per_node' : 8,
'basic_arch_type' : ["n09","bigmem"],
'high_mem_arch' : 'redhawk',
'blast' : 'blastn',
'blast_modules' : ['blast+'],
'time_cmd' : '/usr/bin/time -v',
'CompositeDiscover' : './CompositeDiscover'}
OakleyLocations = {'build_lmer_table':'./build_lmer_table',
'RptScout':'./RepeatScout',
'filter_stage-1':'./filter-stage-1.prl',
'filter_stage-2':'./filter-stage-2.prl',
'RAIDER':'./raider',
'raider_pre':'./raider_pre',
'bigfoot':'./bigfoot',
'python':'python',
'araider':'./araider',
'phRAIDER': './phRAIDER',
'pre-phRAIDER':'./pre-phRAIDER',
'rm_modules' : None,
'RepeatMasker' : 'RepeatMasker',
'proc_per_node' : 12,
'basic_arch_type' : None,
'high_mem_arch' : 'oakley',
'blast' : 'blastn',
'blast_modules' : None,
'time_cmd' : '/usr/bin/time',
'CompositeDiscover' : './CompositeDiscover'}
try:
fp = open("locations.txt")
except:
sys.stderr.println("locations.txt file not present.")
exit(1);
location = fp.readline().strip()
if not (location.lower() in {'redhawk', 'oakley', 'osx'}):
sys.stderr.println("location.txt: Bad content")
exit(1)
Locations = None
if location.lower() == "oakley":
Locations = OakleyLocations;
elif location.lower() == "osx":
Locations = MacLocations
elif location.lower() == "redhawk":
Locations = RedhawkLocations
else:
sys.stderr.println("locations.txt file: bad content")
exit(1);