-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakeArbaNextflowConfig.pm
More file actions
60 lines (49 loc) · 1.92 KB
/
MakeArbaNextflowConfig.pm
File metadata and controls
60 lines (49 loc) · 1.92 KB
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
package ApiCommonWorkflow::Main::WorkflowSteps::MakeArbaNextflowConfig;
@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep);
use strict;
use warnings;
use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep;
sub run {
my ($self, $test, $undo) = @_;
my $workflowDataDir = $self->getWorkflowDataDir();
my $clusterWorkflowDataDir = $self->getClusterWorkflowDataDir();
my $configFileName = $self->getParamValue("configFileName");
my $configPath = join("/", $workflowDataDir, $self->getParamValue("analysisDir"), $self->getParamValue("configFileName"));
my $clusterServer = $self->getSharedConfig("clusterServer");
my $arbaRulesheet = join("/", $self->getSharedConfig("$clusterServer.softwareDatabasesDirectory"),$self->getSharedConfig("arbaRulesheet"));
my $interproResults = $self->getParamValue("interproResults");
my $outputDir = $self->getParamValue("outputDir");
my $workingDirRelativePath = $self->getParamValue("workingDirRelativePath");
my $taxonId = $self->getParamValue("taxonId");
my $abbrev = $self->getParamValue("abbrev");
my $digestedInterproResults = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $interproResults);
my $digestedOutputDir = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $outputDir);
my $executor = $self->getClusterExecutor();
my $lsfEnv = $self->getNextflowLsfScratchEnvBlock();
my $queue = $self->getClusterQueue();
if ($undo) {
$self->runCmd(0,"rm -rf $configPath");
} else {
open(F, ">", $configPath) or die "$! :Can't open config file '$configPath' for writing";
print F
"
params {
interproResults = \"$digestedInterproResults\"
outputDir = \"$digestedOutputDir\"
taxonId = $taxonId
abbrev = \"$abbrev\"
rulesheet = \"$arbaRulesheet\"
}
process{
executor = \'$executor\'
queue = \'$queue\'
}
singularity {
enabled = true
autoMounts = true
}
$lsfEnv";
close(F);
}
}
1;