2011-03-11 03:54:14 +08:00
/*
* Copyright ( c ) 2011 , The Broad Institute
*
* Permission is hereby granted , free of charge , to any person
* obtaining a copy of this software and associated documentation
* files ( the "Software" ) , to deal in the Software without
* restriction , including without limitation the rights to use ,
* copy , modify , merge , publish , distribute , sublicense , and / or sell
* copies of the Software , and to permit persons to whom the
* Software is furnished to do so , subject to the following
* conditions :
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software .
* THE SOFTWARE IS PROVIDED "AS IS" , WITHOUT WARRANTY OF ANY KIND ,
* EXPRESS OR IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY , FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY ,
* WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING
* FROM , OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE .
*/
2010-08-12 05:58:26 +08:00
package org.broadinstitute.sting.queue
import java.io.File
2010-10-14 23:58:52 +08:00
import org.broadinstitute.sting.commandline. { ArgumentCollection , Argument }
import org.broadinstitute.sting.queue.util. { SystemUtils , EmailSettings }
2010-08-12 05:58:26 +08:00
/* *
* Default settings settable on the command line and passed to CommandLineFunctions .
*/
class QSettings {
@Argument ( fullName = "job_name_prefix" , shortName = "jobPrefix" , doc = "Default name prefix for compute farm jobs." , required = false )
var jobNamePrefix : String = QSettings . processNamePrefix
@Argument ( fullName = "job_project" , shortName = "jobProject" , doc = "Default project for compute farm jobs." , required = false )
2011-05-11 21:21:45 +08:00
var jobProject : String = _
2010-08-12 05:58:26 +08:00
2011-03-11 03:54:14 +08:00
@Argument ( fullName = "job_queue" , shortName = "jobQueue" , doc = "Default queue for compute farm jobs." , required = false )
var jobQueue : String = _
2011-08-23 03:12:55 +08:00
@Argument ( fullName = "job_priority" , shortName = "jobPriority" , doc = "Default priority for jobs. Min = 0, Max = 100" , required = false )
2011-02-16 02:26:14 +08:00
var jobPriority : Option [ Int ] = None
2011-08-23 03:12:55 +08:00
@Argument ( fullName = "job_native_arg" , shortName = "jobNative" , doc = "Native arguments to pass to the job runner." , required = false )
var jobNativeArgs : List [ String ] = Nil
@Argument ( fullName = "job_resource_request" , shortName = "jobResReq" , doc = "Resource requests to pass to the job runner." , required = false )
var jobResourceRequests : List [ String ] = Nil
@Argument ( fullName = "job_environment_name" , shortName = "jobEnv" , doc = "Environment names for the job runner." , required = false )
var jobEnvironmentNames : List [ String ] = Nil
@Argument ( fullName = "memory_limit" , shortName = "memLimit" , doc = "Default memory limit for jobs, in gigabytes." , required = false )
2011-07-22 10:57:18 +08:00
var memoryLimit : Option [ Double ] = None
2010-10-14 23:58:52 +08:00
2011-08-23 03:12:55 +08:00
@Argument ( fullName = "resident_memory_limit" , shortName = "resMemLimit" , doc = "Default resident memory limit for jobs, in gigabytes." , required = false )
var residentLimit : Option [ Double ] = None
@Argument ( fullName = "resident_memory_request" , shortName = "resMemReq" , doc = "Default resident memory request for jobs, in gigabytes." , required = false )
var residentRequest : Option [ Double ] = None
2010-11-13 04:14:28 +08:00
@Argument ( fullName = "run_directory" , shortName = "runDir" , doc = "Root directory to run functions from." , required = false )
var runDirectory = new File ( "." )
@Argument ( fullName = "temp_directory" , shortName = "tempDir" , doc = "Temp directory to pass to functions." , required = false )
var tempDirectory = new File ( System . getProperty ( "java.io.tmpdir" ) )
2011-03-11 03:54:14 +08:00
@Argument ( fullName = "job_scatter_gather_directory" , shortName = "jobSGDir" , doc = "Default directory to place scatter gather output for compute farm jobs." , required = false )
var jobScatterGatherDirectory : File = _
2010-10-14 23:58:52 +08:00
@ArgumentCollection
val emailSettings = new EmailSettings
2010-08-12 05:58:26 +08:00
}
/* *
* Default settings settable on the command line and passed to CommandLineFunctions .
*/
object QSettings {
2010-10-14 23:58:52 +08:00
/* * A semi-unique job prefix using the host name and the process id. */
2011-03-26 02:18:22 +08:00
private val processNamePrefix = "Q-" + SystemUtils . pidAtHost
2010-08-12 05:58:26 +08:00
}