forked from UMCUGenetics/guix-additions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0002-Adapt-Cobalt-command-line-options.patch
103 lines (91 loc) · 3.31 KB
/
0002-Adapt-Cobalt-command-line-options.patch
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
90
91
92
93
94
95
96
97
98
99
100
101
102
From 50684a580b47a33623d275725e2374edc7e31052 Mon Sep 17 00:00:00 2001
From: Roel Janssen <[email protected]>
Date: Mon, 5 Feb 2018 11:27:14 +0100
Subject: [PATCH 2/2] Adapt Cobalt command-line options.
* lib/HMF/Pipeline/Cobalt.pm: Adjust Cobalt's run function to run for pairs.
* templates/Cobalt.sh.tt: Adjust command-line arguments.
---
lib/HMF/Pipeline/Cobalt.pm | 43 ++++++++++++++++++++-----------------------
templates/Cobalt.sh.tt | 11 +++++++----
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/lib/HMF/Pipeline/Cobalt.pm b/lib/HMF/Pipeline/Cobalt.pm
index 4b09d3d..40d3085 100644
--- a/lib/perl5/site_perl/5.26.1/HMF/Pipeline/Cobalt.pm
+++ b/lib/perl5/site_perl/5.26.1/HMF/Pipeline/Cobalt.pm
@@ -5,7 +5,7 @@ use discipline;
use File::Spec::Functions;
-use HMF::Pipeline::Config qw(createDirs sampleBamAndJobs);
+use HMF::Pipeline::Config qw(createDirs sampleControlBamsAndJobs);
use HMF::Pipeline::Job qw(fromTemplate);
use HMF::Pipeline::Sge qw(qsubJava);
@@ -17,28 +17,25 @@ sub run {
say "\n### SCHEDULING COBALT ANALYSIS ###";
- my @cobalt_jobs;
- foreach my $sample (keys %{$opt->{SAMPLES}}) {
- my ($sample_bam, $running_jobs) = sampleBamAndJobs($sample, $opt);
- my $dirs = createDirs($opt->{OUTPUT_DIR}, cobalt => "cobalt");
-
- my $job_id = fromTemplate(
- "Cobalt",
- $sample,
- 1,
- qsubJava($opt, "COBALT"),
- $running_jobs,
- $dirs,
- $opt,
- sample => $sample,
- sample_bam => $sample_bam,
- );
- next unless $job_id;
-
- push @cobalt_jobs, $job_id;
- }
- $opt->{RUNNING_JOBS}->{'cobalt'} = \@cobalt_jobs;
- return;
+ my ($ref_sample, $tumor_sample, $ref_bam_path, $tumor_bam_path, $joint_name, $running_jobs) = sampleControlBamsAndJobs($opt);
+ my $dirs = createDirs($opt->{OUTPUT_DIR}, cobalt => "cobalt");
+
+ my $job_id = fromTemplate(
+ "Cobalt",
+ undef,
+ 1,
+ qsubJava($opt, "COBALT"),
+ $running_jobs,
+ $dirs,
+ $opt,
+ ref_sample => $ref_sample,
+ ref_bam_path => $ref_bam_path,
+ tumor_sample => $tumor_sample,
+ tumor_bam_path => $tumor_bam_path,
+ );
+
+ push @{$opt->{RUNNING_JOBS}->{'cobalt'}}, $job_id;
+ return $job_id;
}
1;
\ No newline at end of file
diff --git a/templates/Cobalt.sh.tt b/templates/Cobalt.sh.tt
index c63e4c8..ba4e4d7 100644
--- a/share/hmf-pipeline/templates/Cobalt.sh.tt
+++ b/share/hmf-pipeline/templates/Cobalt.sh.tt
@@ -2,13 +2,16 @@
# -*- TT -*-
[% INCLUDE ErrorHandling.tt %]
-[% INCLUDE Logging.tt job_name="Cobalt" main_step=sample log_name="${opt.RUN_NAME}.log" %]
+[% INCLUDE Logging.tt job_name="Cobalt" main_step=tumor_sample log_name="${opt.RUN_NAME}.log" %]
java -Xmx[% opt.COBALT_MEM %]G \
-cp "[% opt.COBALT_PATH %]/cobalt.jar" com.hartwig.hmftools.cobalt.CountBamLinesApplication \
- -input [% sample_bam %] \
- -sample [% sample %] \
- -output_dir [% dirs.cobalt %] \
+ -gc_profile "[% opt.GC_PROFILE %]" \
+ -reference "[% ref_sample %]" \
+ -reference_bam "[% ref_bam_path %]" \
+ -tumor "[% tumor_sample %]" \
+ -tumor_bam "[% tumor_bam_path %]" \
+ -output_dir "[% dirs.cobalt %]" \
-threads [% opt.COBALT_THREADS %]
success
\ No newline at end of file
--
2.15.0