Skip to content

Commit

Permalink
Merge branch 'hotfix/2.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Nov 29, 2017
2 parents d947852 + 1412901 commit 1535249
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGES

## 2.2.1

* Handle files not being written by tophat-fusion-post when no events generated.

## 2.2.0

* RSeqQC - Updated to 2.6.4, fixes known issues with low levels of mapped data.
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/Sanger/CGP/CgpRna.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use strict;
use Const::Fast qw(const);
use base 'Exporter';

our $VERSION = '2.2.0';
our $VERSION = '2.2.1';
our @EXPORT = qw($VERSION);

1;
10 changes: 9 additions & 1 deletion perl/lib/Sanger/CGP/Tophat/Implement.pm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ sub add_strand {
my $potential_fusions = File::Spec->catfile($post_outdir, 'potential_fusion.txt');
die "Please run the filter_fusions step prior to filter\n" unless(-e $fusions_file && -e $potential_fusions);

if(-s $potential_fusions == 0) {
system("echo '##EOF##' > $potential_fusions") && die "An error occurred: $!";
}

my $command = "$^X ";
$command .= _which('tophat_add_strand.pl');
$command .= sprintf $ADD_STRAND, $fusions_file,
Expand Down Expand Up @@ -228,6 +232,10 @@ sub filter_fusions {
die "Please run tophatfusion_post step prior to filter\n" unless(-d $post_outdir);
die "Please run tophatfusion_post step prior to filter\n" unless(-e $fusions_file);

if(-s $fusions_file == 0) {
system("echo '##EOF##' > $fusions_file") && die "An error occurred: $!";
}

my $normals_file = File::Spec->catfile($options->{'refdataloc'},$options->{'species'},$options->{'referencebuild'},'cgpRna',$options->{'normalfusionslist'});

my $command = "$^X ";
Expand Down Expand Up @@ -537,7 +545,7 @@ sub tophatfusion_post {

#If the output is empty, ensure that it passes further checks by adding ##EOF## to the file.
my $output_post = $post_rundir.'/result.txt';
if(-s $output_post == 0){
if(!-e $output_post || -s $output_post == 0){
system("echo '##EOF##' > $output_post") && die "An error occurred: $!";
}

Expand Down

0 comments on commit 1535249

Please sign in to comment.