Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Refactor and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kduyvesteyn committed May 29, 2018
1 parent e1b3b91 commit 0c3ce1d
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 15 deletions.
12 changes: 6 additions & 6 deletions lib/HMF/Pipeline/Functions/Bam.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sub sorted {

my $sorted_bam_name = fileparse($sorted_bam_path);
return fromTemplate(
"SortBam",
"BamSort",
$sorted_bam_name,
0,
qsubTemplate($opt, "MAPPING"),
Expand All @@ -48,7 +48,7 @@ sub slice {

my $slice_name = fileparse($sliced_bam);
return fromTemplate(
"SliceBam",
"BamSlice",
$slice_name,
0,
qsubTemplate($opt, "FLAGSTAT"),
Expand All @@ -69,7 +69,7 @@ sub indexed {

my $bai_name = fileparse($bai_path);
return fromTemplate(
"IndexBam",
"BamIndex",
$bai_name,
0,
qsubTemplate($opt, "MAPPING"),
Expand All @@ -87,7 +87,7 @@ sub flagstat {

my $flagstat_name = fileparse($flagstat_path);
return fromTemplate(
"Flagstat",
"BamFlagstat",
$flagstat_name,
0,
qsubTemplate($opt, "FLAGSTAT"),
Expand All @@ -106,7 +106,7 @@ sub readCountCheck {

my $post_flagstat_name = fileparse($post_flagstat_path);
return fromTemplate(
"ReadCountCheck",
"BamReadCountCheck",
$post_flagstat_name,
0,
qsubTemplate($opt, "FLAGSTAT"),
Expand All @@ -126,7 +126,7 @@ sub diff {
my ($step, $input_bam1, $input_bam2, $diff_name, $hold_jids, $dirs, $opt) = @_;

return fromTemplate(
"DiffBams",
"BamDiff",
$diff_name,
0,
qsubTemplate($opt, "FLAGSTAT"),
Expand Down
2 changes: 1 addition & 1 deletion lib/HMF/Pipeline/Mapping.pm
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ sub runBamPrepOnSample {
my $index_job_id = indexed($sample, $sample_bam, $sample_bai, [], $dirs, $opt);
my $flagstat_job_id = flagstat($sample, $sample_bam, $sample_flagstat, [$index_job_id], $dirs, $opt);
my $check_job_id = fromTemplate(
"ContigCheck",
"BamContigCheck",
$sample,
0,
qsubSimple($opt),
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Cython==0.25.2
PyVCF==0.6.8
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- TT -*-

[% INCLUDE ErrorHandling.tt %]
[% INCLUDE Logging.tt job_name="ContigCheck" main_step=bam_path log_name="${step}.log" %]
[% INCLUDE Logging.tt job_name="BamContigCheck" main_step=bam_path log_name="${step}.log" %]

assert_not_empty "[% bam_path %]" "[% bam_path %].bai"

Expand Down
2 changes: 1 addition & 1 deletion templates/DiffBams.sh.tt → templates/BamDiff.sh.tt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- TT -*-

[% INCLUDE ErrorHandling.tt %]
[% INCLUDE Logging.tt job_name="DiffBams" main_step=diff_name log_name="${step}.log" %]
[% INCLUDE Logging.tt job_name="BamDiff" main_step=diff_name log_name="${step}.log" %]

assert_not_empty "[% input_bam1 %]" "[% input_bam2 %]"

Expand Down
2 changes: 1 addition & 1 deletion templates/Flagstat.sh.tt → templates/BamFlagstat.sh.tt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- TT -*-

[% INCLUDE ErrorHandling.tt %]
[% INCLUDE Logging.tt job_name="Flagstat" main_step=flagstat_name log_name="${step}.log" %]
[% INCLUDE Logging.tt job_name="BamFlagstat" main_step=flagstat_name log_name="${step}.log" %]

assert_not_empty "[% bam_path %]"

Expand Down
2 changes: 1 addition & 1 deletion templates/IndexBam.sh.tt → templates/BamIndex.sh.tt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- TT -*-

[% INCLUDE ErrorHandling.tt %]
[% INCLUDE Logging.tt job_name="IndexBam" main_step=bam_path log_name="${step}.log" %]
[% INCLUDE Logging.tt job_name="BamIndex" main_step=bam_path log_name="${step}.log" %]

assert_not_empty "[% bam_path %]"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- TT -*-

[% INCLUDE ErrorHandling.tt %]
[% INCLUDE Logging.tt job_name="ReadCountCheck" main_step=post_flagstat_name log_name="${step}.log" %]
[% INCLUDE Logging.tt job_name="BamReadCountCheck" main_step=post_flagstat_name log_name="${step}.log" %]

assert_not_empty "[% pre_flagstat_paths.join('" "') %]" "[% post_flagstat_path %]"

Expand Down
2 changes: 1 addition & 1 deletion templates/SliceBam.sh.tt → templates/BamSlice.sh.tt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- TT -*-

[% INCLUDE ErrorHandling.tt %]
[% INCLUDE Logging.tt job_name="SliceBam" main_step=slice_name log_name="${step}.log" %]
[% INCLUDE Logging.tt job_name="BamSlice" main_step=slice_name log_name="${step}.log" %]

assert_not_empty "[% input_bam %]"

Expand Down
2 changes: 1 addition & 1 deletion templates/SortBam.sh.tt → templates/BamSort.sh.tt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- TT -*-

[% INCLUDE ErrorHandling.tt %]
[% INCLUDE Logging.tt job_name="SortBam" main_step=sorted_bam_name log_name="${step}.log" %]
[% INCLUDE Logging.tt job_name="BamSort" main_step=sorted_bam_name log_name="${step}.log" %]

assert_not_empty "[% bam_path %]"

Expand Down

0 comments on commit 0c3ce1d

Please sign in to comment.