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 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
|
import os , os.path
# this a python module the syntax used is the python syntax
############################################
# #
# Mandatory values #
# #
############################################
# the root url of mobyle
# warning: do NOT include the port number if it is 80, it is useless
# and creates problems on the server
ROOT_URL = "http://localhost"
#base project url for mobyle cgis = ROOT_URL + CGI_PREFIX
CGI_PREFIX = 'cgi-bin/mobyle'
#base project url for mobyle htdocs = ROOT_URL + HTDOCS_PREFIX
HTDOCS_PREFIX = 'mobyle'
#########
# #
# mails #
# #
#########
#a list of email addresses who will received messages when problems occur
MAINTAINER = [ "name@mydommain.fr" ]
#a list of email addresses where the users could have help on this Mobyle portal
HELP= [ "name2@mydommain.fr" , "name3@mydommain.fr" ]
# local mailhost
MAILHOST= "mailhost.mydommain.fr"
##################
# #
# queuing system #
# #
##################
from Execution import *
#EXECUTION_SYSTEM_ALIAS = {
# 'DRMAA_sge' : SgeDRMAAConfig( '/path/to/sge/libdrmaa.so' ,
# root = 'path to sge root',
# cell = 'cell name' ) ,
# 'DRMAA_torque': PbsDRMAAConfig( '/path/to/torque-pbs/libdrmaa.so' ,
# 'marygay.sis.pasteur.fr' ),
# 'SGE' : SGEConfig( root = '/path/to/sge_root',
# cell= 'cell name' ) ,
# 'SYS' : SYSConfig() ,
# 'LSF' : LsfDRMAAConfig( '/path/to/LSF/libdrmaa.so' ,
# lsf_envdir = 'the contained of LSF_ENVDIR' ,
# lsf_serverdir = 'the contained of LSF_SERVERDIR')
# }
EXECUTION_SYSTEM_ALIAS = { 'SYS' : SYSConfig() }
from Mobyle.Dispatcher import DefaultDispatcher
#DISPATCHER = DefaultDispatcher( {
# 'service1' : ( EXECUTION_SYSTEM_ALIAS[ 'DRMAA_sge' ] , 'queue name' ),
# 'service2' : ( EXECUTION_SYSTEM_ALIAS[ 'DRMAA_torque' ] , 'queue name' ),
# 'service3' : ( EXECUTION_SYSTEM_ALIAS[ 'LSF' ] , 'queue name' ),
# 'service4' : ( EXECUTION_SYSTEM_ALIAS[ 'SGE' ] , 'queue name' ),
# 'service5' : ( EXECUTION_SYSTEM_ALIAS[ 'DRMAA_sge' ] , 'queue name' ),
# 'DEFAULT' : ( EXECUTION_SYSTEM_ALIAS[ 'SYS' ] , '' )
# } )
DISPATCHER = DefaultDispatcher( { 'DEFAULT' : ( EXECUTION_SYSTEM_ALIAS[ 'SYS' ] , '' ) } )
#######################
# #
# logging #
# #
#######################
#the directory were will stored the log files
LOGDIR = '/var/log/mobyle/'
####################################################
# #
# data format detection and conversion #
# #
####################################################
# for Sequence and Alignment, the HIGHLY recommended squizz converters
# are available
#DATA_CONVERTER={
# 'Datatype1': [converter_class1(path_to_the_corresponding_converter_program), converter_class2(path)],
# 'Datatype2': [converter_class1(path_to_the_corresponding_converter_program), converter_class2(path)]
# }
from Mobyle.Converter import *
DATA_CONVERTER={
'Sequence': [ squizz_sequence('/usr/bin/squizz') ] ,
'Alignment': [ squizz_alignment('/usr/bin/squizz'),
fasta_phyml(None),
phylipi_phyml(None),
phylips_phyml(None),
clustal_phyml(None),
nexus_phyml(None),
stockholm_phyml(None)]
}
########################################################################
########################################################################
## ##
## Optionals Values ##
## ##
########################################################################
########################################################################
#########
# #
# Debug #
# #
#########
#used in production
# 0 - the command line is build
# - the build log is NOT fill
# - the job is executed
#to test a xml ( python syntax in code , precond ... )
# 1 - the command line is build
# - the build log is NOT fill
# - the job is NOT executed
#to know what's wrong in the xml I wrote.
# 2 - the command line is build
# - the build log is fill
# - the job is NOT executed
#to test the xml and the job execution and the results retrieving
# 3 - the command line is build
# - the build log is fill
# - the job is executed
DEBUG = 3
#to set a different debug level for a particular service
#PARTICULAR_DEBUG = { 'serviceName' : 3 }
###############
# #
# Directories #
# #
###############
## were are the binary corresponding to the services
## a list of string
## each element must be a valid path
## the element order is kept to build the final PATH ( the binary path is add before the canonical PATH )
BINARY_PATH = ["/usr/local/bin","/usr/lib/phylip/bin"]
#DATABANKS_CONFIG = {
# 'wgs':{
# 'dataType' : 'Sequence',
# 'bioTypes' : ['Nucleic'],
# 'label' : 'Genbank - Whole Genome Shotgun',
# 'command': ['golden', '%(db)s:%(id)s']
# },
# 'pdb':{
# 'dataType':'3DStructure',
# 'bioTypes':['Protein'],
# 'label': 'Protein Data Bank',
# 'command': [ "/path/to/PDBGet.py", "%(id)s" ]
# }
# }
DATABANKS_CONFIG = {}
#####################
#
# Statistics
#
#####################
## Google Analytics code - set to use GA
#GACODE = 'XXXXXXXXXX'
######################
# #
# Authentication #
# #
######################
## Enable OpenID
# default value = False
# OPENID = True
#####################
#
# Welcome page configuration
#
#####################
## news_ex illustrating example feed is in Example/Local directory.
#WELCOME_CONFIG = {'url':'http://localhost:85/portal/news_ex.atom',
# 'format':'atom'}
#####################
#
# Portal custom content for header and footer
#
#####################
#
#CUSTOM_PORTAL_HEADER="<h1>myOwnPortalName</h1>"
#
#CUSTOM_PORTAL_FOOTER="<div>insert the name of your sponsors or your legal disclaimers</div>
## to make email optional for all programs, set this to True
## default value = False
#OPT_EMAIL = False
## to have a more control on the mandatory email
## it able to have the general option but
## it could be set to another value for particular service
## example :
## OPT_EMAIL could be set at False ( the email is mandatory )
## but set a True for some very short services.
# the key is the portal id of a service and value is a boolean
# for local services the portal id the server name can be ommited
# eg 'local.golden' == 'golden'
#PARTICULAR_OPT_EMAIL = {'portal_id' : True }
#if a job is longer than EMAIL_DELAY Mobyle send the results by email (if user give it's email)
#its express in second, 0 mean no email (default = 60)
#EMAIL_DELAY = 60
## anonymous session there is 3 available values
## 'no' : the anonymous sessions are not allowed
## 'yes' : the anonymous sessions are allowed, without any verification
## 'captcha' : the anonymous sessions are allowed, but with a captcha challenge ( default )
#ANONYMOUS_SESSION = "captcha"
## authenticated session there is 3 available values
## 'no' : the authenticated session are not allowed.
## 'yes' : the authenticated session are allowed and activated without any restriction.
## 'email' : the authenticated session are allowed but an email confirmation is needed to activate it (default).
#AUTHENTICATED_SESSION = "email"
##############
# #
# misc #
# #
##############
## the time to consider that a job is long ( in sec default = 60 , min = 10 )
#TIMEOUT = 60
## refresh frequency for user data in the web portal, in seconds
## default: 240
#REFRESH_FREQUENCY = 240
## max size for any file (2 Go )
#this limit is honored only if the EXECUTION_SYSTEM_ALIAS is set to Sys (SYSConfig)
#if SGE, PBS, ... is used this must be set directly in the drm configuration.
#FILELIMIT = 2147483648
## max size for a session in bytes ( default = 50Mo = 52428800 )
#SESSIONLIMIT = 52428800
##max size to preview the results
##if the results size exceed this limit the results appear as a link ( default value = 1048576 = 1Mib )
#PREVIEW_DATA_LIMIT = 1048576
#the number of "similar" jobs a user is allowed to submit at a given time.
#similar means same email, same command line. ( default = 1 )
#0 disable this control, then the user may submit as many "same" jobs he wants.
#if the email is not provided (depend of the configuration) this control is disabled.
# !! this new directive replace SIMULTANEOUS_JOBS !!
#MAX_SIMILAR_JOB_PER_USER =1
#the number of jobs than a user can submit at a given time
#0 disable this control, then the user may submit as many "same" jobs he wants (default).
#if the email is not provided (depend of the configuration) this control is disabled.
#MAX_JOB_PER_USER = 0
##########
# #
# Mail #
# #
##########
##from: sender email address ( default = HELP )
#SENDER = "myname-noreply@mydomain.fr"
##set this True if you don't want results to be sent by email.
##This does not make email optional
#DONT_EMAIL_RESULTS = False
## max size for results by email ( in bytes default 2 Mib )
#MAXMAILSIZE = 2097152
## how long should results be available on the server ( in days default = 10)?
#RESULT_REMAIN = 10
## if you want to resolve the domain name of the user email
## and if it has a mail exchanger field
## (to avoid fake user email address)
## by default DNS_RESOLVER = False
## if DNS_RESOLVER = True dnspython must be installed
#DNS_RESOLVER = False
################
# #
# logging #
# #
################
## to monitored the elapsed time per job ( default = False )
#ACCOUNTING = True
#######################
# #
# disabling services #
# #
#######################
## some times you need to disable the portal for maintaining operation etc...
## if DISABLE_ALL is True no new job could be submit, but the running job keep running
#DISABLE_ALL = False
## To disable specifically one service (program or workflow) from any portal, you can append it in DISABLED_SERVICES.
## joker can be used, so it's easy to disable all services from a given portal.
## this portal is call 'local'
## to re-enable services just toggle DISABLE_ALL to False or remove it from
## the DISABLED_SERVICES list
## example:
##DISABLED_SERVICES = [ 'portal1.service1' , # disable the service1 from the imported portal1 (as defined in PORTALS )
## 'portal2.*' , # disable all services from the imported portal2
## 'local.clustalw*' # disable all services begining by clustalw (clutalw-multialign ,clustalw-sequence , clustalw-profile ) from this server.
## ]
## By default all services are enabled
#DISABLED_SERVICES = []
################################
# #
# restriction services access #
# #
################################
## by default all the programs available are usable by all
## users who can access your web server. but sometimes,due to
## some license restrictions etc... , you need to restrict the
## accessibility of some programs to some users.
## to do that use the AUTHORIZED_SERVICES
## The filtering is based on the ip of the requester.
## AUTHORIZED_SERVICES is a dictionary with the service names of
## programs to restrict as keys and the list of ip which can
## access these programs as values
##
## AUTHORIZED_SERVICES = { serviceURL :[ ip , ip mask ] }
##
## the ip address which can use the service
##
## AUTHORIZED_SERVICES = 'http://myMobyle.mydomain.fr/data/programs/toppred.xml' : [ '125.234.60.18' , # only the machine with this ip could access to toppred
## '125.234.60.*' , # all the machines in subnet could access to toppred
## '125.234.*.15 , # all the machine
## ]
##
## if there is no entry for a service it's mean that
## every body can access to this service
#AUTHORIZED_SERVICES = {}
################################
# #
# Services Management #
# #
################################
##################################################################################
# #
# Local program publishing section #
# #
# This configuration file is used to deploy the xml services descriptions on #
# the Mobyle web part from the Local/Services/* and /Srevices/* directories. #
# all the xml from Local/Services/*/* are deployed #
# the xml from Services/*/* are filtered following the rules below #
# (for more explanations see INSTALL notes and Tools/README) #
# #
# (if this file doesn't exist all the programs from Programs will be published) #
# #
##################################################################################
#the list of programs to deploy is established by filtering the Local/Services/ repository and Services repository
#with the LOCAL_DEPLOY_INCLUDE following the LOCAL_DEPLOY_EXCLUDE.
#each value corresponds to a unix mask to filter a directory, so the unix joker * can be used.
#LOCAL_DEPLOY_INCLUDE = { 'programs' : [ 'blast*' ] , #all programs definitions begining by blast will be deployed
# 'workflows': [ '*' ] , #all workflows will be deployed
# 'viewers' : [ 'jalview' , 'varna' ] , #only jalview and varna will be deployed
# }
#LOCAL_DEPLOY_EXCLUDE = { 'programs' : [ 'blast2mydb' ] , #blast2mydb will be removed from the list of programs to deploy
# 'workflows': [ '' ] ,
# 'viewers' : [ '' ] ,
# }
LOCAL_DEPLOY_INCLUDE = { 'programs' : [ '*' ] ,
'workflows': [ '*' ] ,
'viewers' : [ '*' ] ,
}
LOCAL_DEPLOY_EXCLUDE = { 'programs' : [ '' ] ,
'workflows': [ '' ] ,
'viewers' : [ '' ] ,
}
######################
# #
# Grid aspects #
# #
######################
# PORTAL_NAME is the name of the portal as it is known to others in a MobyleNet network
#PORTAL_NAME = "my_server"
# SIMPLE_FORMS activates the display of simple forms by default
# inactive by default
#SIMPLE_FORMS = False
#PORTALS={'portal1': {
# 'url': 'http://otherdomain.fr:port/cgi-bin/MobylePortal',
# 'help' : 'help@otherdomain.fr',
# 'repository': 'http://otherdomain.fr:port/',
# 'services': { 'programs' : ['clustalw-multialign'],
# 'workflows': [ 'wokflow1_of_portal1']
# }
# }
PORTALS={}
#EXPORTED_SERVICES = [ 'golden', 'abiview' ]
|