/
docker-apollo-config.groovy
198 lines (182 loc) · 8.36 KB
/
docker-apollo-config.groovy
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
println "WEBAPOLLO environment"
System.getenv().each {
if (it.key.contains("APOLLO") || it.key.contains("CHADO")) {
println it.key + " " + it.value
}
}
Boolean checkBooleanEnvironment(String environment,Boolean defaultValue ){
if(System.getenv(environment)==null || System.getenv(environment).trim().replaceAll(/"/,"").replaceAll(/'/,"").size()==0){
println "'${environment}' not specified '${System.getenv(environment)}' so returning default '${defaultValue}'."
return defaultValue
}
boolean returnValue = Boolean.valueOf(System.getenv(environment))
println "Setting '${environment}' as '${System.getenv(environment)}' to '${returnValue}'."
return returnValue
}
environments {
development {
}
test {
}
production {
dataSource {
dbCreate = "update"
username = System.getenv("WEBAPOLLO_DB_USERNAME") ?: "apollo"
password = System.getenv("WEBAPOLLO_DB_PASSWORD") ?: "apollo"
driverClassName = "org.postgresql.Driver"
dialect = "org.hibernate.dialect.PostgresPlusDialect"
url = "jdbc:postgresql://${System.getenv("WEBAPOLLO_DB_HOST") ?: "127.0.0.1"}/${System.getenv("WEBAPOLLO_DB_NAME") ?: "apollo"}"
properties {
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
jmxEnabled = false
initialSize = 5
maxActive = 50
minIdle = 5
maxIdle = 25
maxWait = 10000
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
validationQuery = "SELECT 1"
validationQueryTimeout = 3
validationInterval = 15000
testOnBorrow = true
testWhileIdle = true
testOnReturn = false
jdbcInterceptors = "ConnectionState"
defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
}
}
if (System.getenv("WEBAPOLLO_USE_CHADO") == "true") {
dataSource_chado {
dbCreate = "update"
username = System.getenv("CHADO_DB_USERNAME") ?: "apollo"
password = System.getenv("CHADO_DB_PASSWORD") ?: "apollo"
driverClassName = "org.postgresql.Driver"
dialect = "org.hibernate.dialect.PostgresPlusDialect"
url = "jdbc:postgresql://${System.getenv("CHADO_DB_HOST") ?: "127.0.0.1"}/${System.getenv("CHADO_DB_NAME") ?: "chado"}"
properties {
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
jmxEnabled = false
initialSize = 5
maxActive = 50
minIdle = 5
maxIdle = 25
maxWait = 10000
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
validationQuery = "SELECT 1"
validationQueryTimeout = 3
validationInterval = 15000
testOnBorrow = true
testWhileIdle = true
testOnReturn = false
jdbcInterceptors = "ConnectionState"
defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
}
}
}
}
}
if (checkBooleanEnvironment("WEBAPOLLO_DEBUG",false)) {
log4j.main = {
debug "grails.app"
}
}
apollo {
common_data_directory = System.getenv("WEBAPOLLO_COMMON_DATA") ? System.getenv("WEBAPOLLO_COMMON_DATA") : "/data/temporary/apollo_data"
default_minimum_intron_size = System.getenv("WEBAPOLLO_MINIMUM_INTRON_SIZE") ? System.getenv("WEBAPOLLO_MINIMUM_INTRON_SIZE").toInteger() : 1
history_size = System.getenv("WEBAPOLLO_HISTORY_SIZE") ? System.getenv("WEBAPOLLO_HISTORY_SIZE").toInteger() : 0
overlapper_class = System.getenv("WEBAPOLLO_OVERLAPPER_CLASS") ?: "org.bbop.apollo.sequence.OrfOverlapper"
use_cds_for_new_transcripts = checkBooleanEnvironment("WEBAPOLLO_CDS_FOR_NEW_TRANSCRIPTS",false)
count_annotations = checkBooleanEnvironment("WEBAPOLLO_COUNT_ANNOTATIONS",true)
phone.phoneHome = checkBooleanEnvironment("WEBAPOLLO_PHONE_HOME",true)
feature_has_dbxrefs = checkBooleanEnvironment("WEBAPOLLO_FEATURE_HAS_DBXREFS",true)
feature_has_attributes = checkBooleanEnvironment("WEBAPOLLO_FEATURE_HAS_ATTRS",true)
feature_has_pubmed_ids = checkBooleanEnvironment("WEBAPOLLO_FEATURE_HAS_PUBMED",true)
feature_has_go_ids =checkBooleanEnvironment("WEBAPOLLO_FEATURE_HAS_GO",true)
calculate_non_canonical_splice_sites = checkBooleanEnvironment("WEBAPOLLO_CALCULATE_NON_CANONICAL_SPLICE_SITES",true)
feature_has_comments = checkBooleanEnvironment("WEBAPOLLO_FEATURE_HAS_COMMENTS",true)
feature_has_status = checkBooleanEnvironment("WEBAPOLLO_FEATURE_HAS_STATUS",true)
translation_table = "/config/translation_tables/ncbi_" + (System.getenv("WEBAPOLLO_TRANSLATION_TABLE") ?: "1") + "_translation_table.txt"
get_translation_code = System.getenv("WEBAPOLLO_TRANSLATION_TABLE") ? System.getenv("WEBAPOLLO_TRANSLATION_TABLE").toInteger() : 1
fa_to_twobit_exe = "/usr/local/bin/faToTwoBit" // automatically loaded // https://genome.ucsc.edu/goldenPath/help/blatSpec.html
// TODO: should come from config or via preferences database
splice_donor_sites = System.getenv("WEBAPOLLO_SPLICE_DONOR_SITES") ? System.getenv("WEBAPOLLO_SPLICE_DONOR_SITES").split(",") : ["GT"]
splice_acceptor_sites = System.getenv("WEBAPOLLO_SPLICE_ACCEPTOR_SITES") ? System.getenv("WEBAPOLLO_SPLICE_ACCEPTOR_SITES").split(",") : ["AG"]
gff3.source = System.getenv("WEBAPOLLO_GFF3_SOURCE") ?: "."
google_analytics = System.getenv("WEBAPOLLO_GOOGLE_ANALYTICS_ID") ?: ["UA-62921593-1"]
admin {
username = System.getenv("APOLLO_ADMIN_EMAIL") ?: "admin@local.host"
password = System.getenv("APOLLO_ADMIN_PASSWORD") ?: "password"
firstName = System.getenv("APOLLO_ADMIN_FIRST_NAME") ?: "Ad"
lastName = System.getenv("APOLLO_ADMIN_LAST_NAME") ?: "min"
}
authentications = [
[
"name":"Remote User Authenticator",
"className":"remoteUserAuthenticatorService",
"active": checkBooleanEnvironment("WEBAPOLLO_REMOTE_USER_AUTH",false)
],
[
"name":"Username Password Authenticator",
"className":"usernamePasswordAuthenticatorService",
"active": checkBooleanEnvironment("WEBAPOLLO_USER_PASSWORD_AUTH",true)
]
]
sequence_search_tools {
blat_nuc {
search_exe = "/usr/bin/blastn"
search_class = "org.bbop.apollo.sequence.search.blast.BlastCommandLine"
name = "Blast nucleotide"
params = "-num_threads 2"
//tmp_dir = "/efs/apollo/tmp"
}
blat_prot {
search_exe = "/usr/bin/tblastn"
search_class = "org.bbop.apollo.sequence.search.blast.BlastCommandLine"
name = "Blast protein to translated nucleotide"
params = "-num_threads 2"
//tmp_dir = "/efs/apollo/tmp"
}
}
}
jbrowse {
git {
url = "https://github.com/GMOD/jbrowse"
branch = "1.16.10-release"
}
plugins {
ScreenShotPlugin{
git = 'https://github.com/bhofmei/jbplugin-screenshot.git'
branch = 'master'
alwaysRecheck = "true"
alwaysPull = "true"
}
ColorByCDS{
git = 'https://github.com/scottcain/colorbycds.git'
branch = 'master'
alwaysRecheck = "true"
alwaysPull = "true"
}
MAFViewer{
git = 'https://github.com/cmdcolin/mafviewer.git'
branch = 'master'
alwaysRecheck = "true"
alwaysPull = "true"
}
FeatureSequence{
git = 'https://github.com/twsaari/FeatureSequence.git'
branch = 'master'
alwaysRecheck = "true"
alwaysPull = "true"
}
// WormbaseGlyphs{
// git = 'https://github.com/nathandunn/WormbaseGlyphs.git'
// branch = 'master'
// alwaysRecheck = "true"
// alwaysPull = "true"
// }
}
}