-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakeBowtieMappingNextflowConfig.pm
More file actions
75 lines (62 loc) · 2.51 KB
/
MakeBowtieMappingNextflowConfig.pm
File metadata and controls
75 lines (62 loc) · 2.51 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
package ApiCommonWorkflow::Main::WorkflowSteps::MakeBowtieMappingNextflowConfig;
@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 $clusterResultDir = join("/", $clusterWorkflowDataDir, $self->getParamValue("clusterResultDir"));
my $analysisDir = $self->getParamValue("analysisDir");
my $configFileName = $self->getParamValue("configFileName");
my $configPath = join("/", $self->getWorkflowDataDir(), $self->getParamValue("analysisDir"), $configFileName);
my $input = join("/", $clusterWorkflowDataDir, $analysisDir, $self->getParamValue("input"));
my $mateA = join("/", $clusterWorkflowDataDir, $self->getParamValue("readsFile"));
my $mateB = join("/", $clusterWorkflowDataDir, $self->getParamValue("pairedReadsFile"));
my $databaseFileDir = join("/", $clusterWorkflowDataDir, $self->getParamValue("indexDir"));
my $databaseFasta = join("/", $clusterWorkflowDataDir, $self->getParamValue("databaseFasta"));
my $sampleName= $self->getParamValue("sampleName");
my $extraBowtieParams = $self->getParamValue("extraBowtieParams");
my $downloadMethod = $self->getParamValue("downloadMethod");
my $preconfiguredDatabase = $self->getParamValue("preconfiguredDatabase");
my $removePCRDuplicates = $self->getParamValue("removePCRDuplicates");
my $writeBedFile = $self->getParamValue("writeBedFile");
my $hasPairedReads = $self->getParamValue("hasPairedEnds");
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 {
preconfiguredDatabase = $preconfiguredDatabase
writeBedFile = $writeBedFile
hasPairedReads = $hasPairedReads
removePCRDuplicates = $removePCRDuplicates
input = \"$input\"
downloadMethod = \'$downloadMethod\'
databaseFasta = \"$databaseFasta\"
databaseFileDir = \"$databaseFileDir\"
indexFileBasename = \"genomicIndexes\"
outputDir = \"$clusterResultDir\"
sampleName = \"$sampleName\"
mateA = \"$mateA\"
mateB = \"$mateB\"
extraBowtieParams = \"$extraBowtieParams\"
}
process {
executor = \'$executor\'
queue = \'$queue\'
}
singularity {
enabled = true
autoMounts = true
}
$lsfEnv";
close(F);
}
}
1;