Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Apollo config file #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
242 changes: 100 additions & 142 deletions docker-files/docker-apollo-config.groovy
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
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 {
}
// sample config to turn on debug logging in development e.g. for apollo run-local
log4j.main = {
debug "grails.app"
}
// sample config to edit apollo specific configs in development mode
apollo {
gff3.source = "testing"
}
dataSource{
dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
username = System.getenv("WEBAPOLLO_DB_USERNAME") ?: "apollo"
password = System.getenv("WEBAPOLLO_DB_PASSWORD") ?: "apollo"
driverClassName = System.getenv("WEBAPOLLO_DB_DRIVER") ?:"org.postgresql.Driver"
dialect = System.getenv("WEBAPOLLO_DB_DIALECT") ?: "org.hibernate.dialect.PostgresPlusDialect"
url = System.getenv("WEBAPOLLO_DB_URI") ?: "jdbc:postgresql://127.0.0.1/apollo"
}
}
production {
dataSource {
dbCreate = "update"
dataSource{
dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
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"}"
driverClassName = System.getenv("WEBAPOLLO_DB_DRIVER") ?:"org.postgresql.Driver"
dialect = System.getenv("WEBAPOLLO_DB_DIALECT") ?: "org.hibernate.dialect.PostgresPlusDialect"
url = System.getenv("WEBAPOLLO_DB_URI") ?: "jdbc:postgresql://127.0.0.1/apollo"

properties {
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
jmxEnabled = false
jmxEnabled = true
initialSize = 5
maxActive = 50
minIdle = 5
Expand All @@ -51,131 +47,93 @@ environments {
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"
}
}


// Uncomment to make changes
//
// not quite default apollo settings
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)
add_merged_commented = checkBooleanEnvironment("WEBAPOLLO_ADD_MERGED_COMMENT",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
admin{
username = System.getenv("APOLLO_ADMIN_EMAIL")?:"[email protected]"
password = System.getenv("APOLLO_ADMIN_PASSWORD")?:"apollo"
firstName = System.getenv("APOLLO_ADMIN_FIRST_NAME")?: "Apollo"
lastName = System.getenv("APOLLO_ADMIN_LAST_NAME")?: "User"
}
default_minimum_intron_size = 1
history_size = 0
overlapper_class = "org.bbop.apollo.sequence.OrfOverlapper"
track_name_comparator = "/config/track_name_comparator.js"
use_cds_for_new_transcripts = true
user_pure_memory_store = true
translation_table = "/config/translation_tables/ncbi_1_translation_table.txt"
is_partial_translation_allowed = false // unused so far
get_translation_code = 1
only_owners_delete = false
google_analytics = ["UA-49907870-1","UA-62921593-1", "UA-27627304-1"]
sequence_search_tools = [
blat_nuc: [
search_exe: "/usr/local/bin/blat",
search_class: "org.bbop.apollo.sequence.search.blat.BlatCommandLineNucleotideToNucleotide",
name: "Blat nucleotide",
params: ""
],
blat_prot: [
search_exe: "/usr/local/bin/blat",
search_class: "org.bbop.apollo.sequence.search.blat.BlatCommandLineProteinToNucleotide",
name: "Blat protein",
params: ""
]
]

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"]
splice_donor_sites = [ "GT" ]
splice_acceptor_sites = [ "AG"]
gff3.source= "Apollo"
bootstrap = false

admin {
username = System.getenv("APOLLO_ADMIN_EMAIL") ?: "[email protected]"
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)
]
]
info_editor = {
feature_types = "default"
attributes = true
dbxrefs = true
pubmed_ids = true
go_ids = true
comments = true
}
}

jbrowse {
git {
url = "https://github.com/GMOD/jbrowse"
branch = "1.16.11-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"
git {
url= "https://github.com/GMOD/jbrowse"
tag = "1.16.11-release"
alwaysRecheck = true

// Warning: We are still testing the performance of NeatFeatures plugins in combination with Apollo.
// We advise caution if enabling these plugins with Apollo until this process is finalized.
}
plugins {
WebApollo{
included = true
}
NeatHTMLFeatures{
included = true
}
FeatureSequence{
git = 'https://github.com/twsaari/FeatureSequence.git'
branch = 'master'
alwaysRecheck = "true"
alwaysPull = "true"
NeatCanvasFeatures{
included = true
}
// WormbaseGlyphs{
// git = 'https://github.com/nathandunn/WormbaseGlyphs.git'
// branch = 'master'
// alwaysRecheck = "true"
// alwaysPull = "true"
// }
}
RegexSequenceSearch{
included = true
}
HideTrackLabels{
included = true
}
NAL_CSS {
git = "https://github.com/NAL-i5K/NAL_CSS"
branch = "supports_1.16.5-release"
alwaysPull = true
alwaysRecheck = true
}
}
}