-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakeOrthoFinderPostProcessingEntryNextflowConfig.pm
More file actions
89 lines (74 loc) · 4.28 KB
/
MakeOrthoFinderPostProcessingEntryNextflowConfig.pm
File metadata and controls
89 lines (74 loc) · 4.28 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
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
package ApiCommonWorkflow::Main::WorkflowSteps::MakeOrthoFinderPostProcessingEntryNextflowConfig;
@ISA = (ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep);
use strict;
use warnings;
use ApiCommonWorkflow::Main::WorkflowSteps::WorkflowStep;
sub run {
my ($self, $test, $undo) = @_;
my $clusterWorkflowDataDir = $self->getClusterWorkflowDataDir();
my $analysisDir = $self->getParamValue("analysisDir");
my $residualFasta = $self->getParamValue("residualFasta");
my $residualBestRepsFasta = $self->getParamValue("residualBestRepsFasta");
my $coreBestRepsFasta = $self->getParamValue("coreBestRepsFasta");
my $coreAndPeripheralGroups = $self->getParamValue("coreAndPeripheralGroups");
my $coreAndPeripheralProteome = $self->getParamValue("coreAndPeripheralProteome");
my $residualGroups = $self->getParamValue("residualGroups");
my $coreGroupFastas = $self->getParamValue("coreGroupFastas");
my $residualGroupFastas = $self->getParamValue("residualGroupFastas");
my $buildVersion = $self->getSharedConfig("buildVersion");
my $oldGroupsFile = $self->getParamValue("oldGroupsFile");
my $bestRepDiamondOutputFields = $self->getParamValue("bestRepDiamondOutputFields");
my $resultsDirectory = $self->getParamValue("clusterResultDir");
my $configPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $self->getParamValue("configFileName"));
my $workingDirRelativePath = $self->getParamValue("workingDirRelativePath");
my $residualFastaInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualFasta);
my $residualBestRepsFastaInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualBestRepsFasta);
my $coreBestRepsFastaInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreBestRepsFasta);
my $coreAndPeripheralGroupsInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreAndPeripheralGroups);
my $coreAndPeripheralProteomeInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreAndPeripheralProteome);
my $residualGroupsInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualGroups);
my $coreGroupFastasInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $coreGroupFastas);
my $residualGroupFastasInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $residualGroupFastas);
my $oldGroupsFileInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $oldGroupsFile);
my $resultsDirectoryInNextflowWorkingDirOnCluster = $self->relativePathToNextflowClusterPath($workingDirRelativePath, $resultsDirectory);
my $executor = $self->getClusterExecutor();
my $lsfScratch = ($executor eq 'lsf') ? "\n NXF_SCRATCH = '\$LSF_TMPDIR'" : '';
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 {
outputDir = \"$resultsDirectoryInNextflowWorkingDirOnCluster\"
residualFasta = \"$residualFastaInNextflowWorkingDirOnCluster\"
residualBestRepsFasta = \"$residualBestRepsFastaInNextflowWorkingDirOnCluster\"
coreBestRepsFasta = \"$coreBestRepsFastaInNextflowWorkingDirOnCluster\"
coreAndPeripheralGroups = \"$coreAndPeripheralGroupsInNextflowWorkingDirOnCluster\"
coreAndPeripheralProteome = \"$coreAndPeripheralProteomeInNextflowWorkingDirOnCluster\"
residualGroups = \"$residualGroupsInNextflowWorkingDirOnCluster\"
coreGroupFastas = \"$coreGroupFastasInNextflowWorkingDirOnCluster\"
residualGroupFastas = \"$residualGroupFastasInNextflowWorkingDirOnCluster\"
buildVersion = $buildVersion
oldGroupsFile = \"$oldGroupsFileInNextflowWorkingDirOnCluster\"
bestRepDiamondOutputFields = \"$bestRepDiamondOutputFields\"
}
process {
executor = \'$executor\'
queue = \'$queue\'
}
env {
_JAVA_OPTIONS=\"-Xmx8192M\"
NXF_OPTS=\"-Xmx8192M\"
NXF_JVM_ARGS=\"-Xmx8192M\"$lsfScratch
}
singularity {
enabled = true
autoMounts = true
}
";
close(F);
}
}
1;