Skip to content
Permalink
Browse files

fix region configured for cloud executor overriding region specified …

…with -L
  • Loading branch information...
ssadedin committed Apr 23, 2019
1 parent f8b085b commit d95c87713e77245b671a4651b76cc2267ad0cc66
@@ -74,6 +74,11 @@ class Config {
// to a particular branches
branchFilter: []
]

/**
* Global region that may have been set for the pipeline (possibly using -L flag on command line)
*/
static RegionValue region = null

/**
* Configured plugins
@@ -451,14 +451,14 @@ public class Pipeline implements ResourceRequestor {

// If a region was specified on the command line or in config,
// check for overlap
if(Config.userConfig.region) {
if(result.any { it.name == Config.userConfig.region.value }) {
log.info "Overriding pipeline regions with region specified on command line: ${Config.userConfig.region}"
if(Config.region) {
if(result.any { it.name == Config.region.value }) {
log.info "Overriding pipeline regions with region specified on command line: ${Config.region}"
result.clear()
result.add(new Chr(Config.userConfig.region.value, cfg))
result.add(new Chr(Config.region.value, cfg))
}
else {
println "WARNING: region specified on command line or configuration (${Config.userConfig.region}) does not overlap regions specified in pipeline: $objs"
println "WARNING: region specified on command line or configuration (${Config.region}) does not overlap regions specified in pipeline: $objs"
println "WARNING: region will be ignored for this portion of the pipeline"
}
}
@@ -539,8 +539,8 @@ public class Pipeline implements ResourceRequestor {

Pipeline pipeline = new Pipeline()

if(Config.userConfig.containsKey('region')) {
String regionValue = Config.userConfig.region
if(Config.region != null) {
String regionValue = Config.region
pipeline.branch.region = new RegionValue(regionValue)
}
else {
@@ -1377,6 +1377,7 @@ public class Pipeline implements ResourceRequestor {
Files.copy(stream,outStream)
}
}
Pipeline.genomes[name] = loadCachedGenome(cachedGenome, options.contig?true:false)
}


@@ -427,7 +427,7 @@ class Runner {
}

if(opts.L) {
Config.userConfig.region = new RegionValue(opts.L)
Config.region = new RegionValue(opts.L)
}

initThreads*.join(20000)

0 comments on commit d95c877

Please sign in to comment.
You can’t perform that action at this time.