Skip to content

Commit

Permalink
Handle data that may appear silent for rearrangments
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Mar 8, 2017
1 parent 845e98e commit d86a38f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Binary file modified perl/docs.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion perl/lib/Bio/Brass.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ our @EXPORT = qw(find_breakpoints find_dusty_vertices
is_dusty get_isolated_bp_alignment get_isolated_bp_surrounding_region
$VERSION);

our $VERSION = '5.3.1';
our $VERSION = '5.3.2';

=head1 NAME
Expand Down
7 changes: 4 additions & 3 deletions perl/lib/Sanger/CGP/Brass/Implement.pm
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ sub filter {
sleep 5;
}

my $r4_lines = count_lines($abs_bkp_file);
my $r5scr_lines = count_lines($score_file);
my $r4_lines = count_lines($abs_bkp_file, 1);
my $r5scr_lines = count_lines($score_file, 1);

die "Line count mismatch: $abs_bkp_file ($r4_lines) vs $score_file ($r5scr_lines)\n" if($r4_lines != $r5scr_lines);

Expand Down Expand Up @@ -483,7 +483,8 @@ sub filter {
}

sub count_lines {
my ($file) = @_;
my ($file, $allow_no_file) = @_;
return 0 if($allow_no_file && ! -e $file);
open my $FH, '<', $file or die $!;
while(<$FH>){}
my $lines = $.;
Expand Down
3 changes: 1 addition & 2 deletions perl/lib/Sanger/CGP/BrassFilter/BrassMarkedGroups.pm
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,7 @@ sub process {
close $self->{bedpe_out_fh} if ($self->{bedpe_out_fh});

unless ($count || ($chunk > 1)) {
print "NO ENTRIES PRINTED. EXITING\n";
exit;
warn "NO ENTRIES PRINTED.\n";
}

return($count);
Expand Down
2 changes: 2 additions & 0 deletions perl/lib/Sanger/CGP/BrassFilter/Cleanup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ sub process {
$end_occ_count++;
}

$counts{'Groups Total'} ||= 0;

$counts{'Discard - EndOcc'} = $counts{'Groups Total'} - $end_occ_count;

my $col_max = (scalar (keys %name_by_loc))-1;
Expand Down

0 comments on commit d86a38f

Please sign in to comment.