Skip to content

Commit

Permalink
Merge tag 'v5.3.1' into dev
Browse files Browse the repository at this point in the history
Fix a couple of bugs
  • Loading branch information
keiranmraine committed Mar 1, 2017
2 parents eb53a68 + 845e98e commit 2e7b74c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
15 changes: 8 additions & 7 deletions perl/bin/brass.pl
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,12 @@ sub setup {
}

if(!defined $opts{'process'} || first { $opts{'process'} eq $_ } (qw(normcn filter grass))) {
Sanger::CGP::Brass::Implement::get_ascat_summary(\%opts);
die "Failed to find 'rho' in $opts{ascat_summary}\n" unless(exists $opts{'Acf'});
die "Failed to find 'Ploidy' in $opts{ascat_summary}\n" unless(exists $opts{'Ploidy'});
die "Failed to find 'GenderChr' in $opts{ascat_summary}\n" unless(exists $opts{'GenderChr'});
die "Failed to find 'GenderChrFound' in $opts{ascat_summary}\n" unless(exists $opts{'GenderChrFound'});
if(Sanger::CGP::Brass::Implement::get_ascat_summary(\%opts)) {
die "Failed to find 'rho' in $opts{ascat_summary}\n" unless(exists $opts{'Acf'});
die "Failed to find 'Ploidy' in $opts{ascat_summary}\n" unless(exists $opts{'Ploidy'});
die "Failed to find 'GenderChr' in $opts{ascat_summary}\n" unless(exists $opts{'GenderChr'});
die "Failed to find 'GenderChrFound' in $opts{ascat_summary}\n" unless(exists $opts{'GenderChrFound'});
}
}


Expand Down Expand Up @@ -383,10 +384,10 @@ =head1 SYNOPSIS
-mincn -cn Minimum CN change for copynumber_flag [0.3].
-repeats -r Repeat file, see 'make-repeat-file' (legacy)
-sampstat -ss ASCAT sample statistics file or file containing
rho 0.XXXXX [0.75]
rho 0.XXXXX [0.75] (~ 1-normalContamination)
Ploidy X.XXX [2.0]
GenderChr Y [Y]
GenderChrFound Y\N
GenderChrFound Y/N [Y]
-platform -pl Sequencing platform (when not defined in BAM header)
-tum_name -tn Tumour sample name (when not defined in BAM header)
-norm_name -nn Normal sample name (when not defined in BAM header)
Expand Down
Binary file modified perl/docs.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions perl/lib/Bio/Brass.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Bio::Brass;

########## LICENCE ##########
# Copyright (c) 2014-2016 Genome Research Ltd.
# Copyright (c) 2014-2017 Genome Research Ltd.
#
# Author: Cancer Genome Project <cgpit@sanger.ac.uk>
#
Expand Down 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.0';
our $VERSION = '5.3.1';

=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/Bio/Brass/Merge.pm
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ sub merge_headers {
my $sample_counter = 0;
for my $sample(@samples) {
$sample_counter++;
$new_header .= sprintf "#SAMPLE\t%s\t%s\n", $sample_counter++, $sample;
$new_header .= sprintf "#SAMPLE\t%s\t%s\n", $sample_counter, $sample;
}
return $new_header;
}
Expand Down
7 changes: 6 additions & 1 deletion perl/lib/Sanger/CGP/Brass/Implement.pm
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,10 @@ sub _Rpath {

sub get_ascat_summary {
my ($options) = @_;
my $ret_val = 0;
$options->{'PloidyAcfState'} = q{};
if(defined $options->{'ascat_summary'}) {
$ret_val = 1;
open my $SUMM, '<', $options->{'ascat_summary'};
while(my $line = <$SUMM>) {
chomp $line;
Expand All @@ -770,8 +772,11 @@ sub get_ascat_summary {
if($options->{'PloidyAcfState'} ne 'REAL') {
$options->{'Ploidy'} = 2;
$options->{'Acf'} = 0.75;
$options->{'PloidyAcfState'} = 'DEFAULT'
$options->{'PloidyAcfState'} = 'DEFAULT';
$options->{'GenderChr'} = 'Y' unless(defined $options->{'GenderChr'});
$options->{'GenderChrFound'} = 'Y' unless(defined $options->{'GenderChrFound'});
}
return $ret_val;
}

sub sanitised_sample_from_bam {
Expand Down

0 comments on commit 2e7b74c

Please sign in to comment.