Skip to content

Commit

Permalink
Merge branch 'hotfix/5.3.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
sb43 committed May 15, 2018
2 parents 41875ed + e7bfa18 commit d532dfb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGES

## v5.3.6
* Correct query_full to ensure `undef` return is caught.
* vaf output precison raised from two to four decimal places.

## v5.3.5
* Update `samtols` and `hstlib` to v1.7
* Update `Bio::DB::HTS` to v2.10
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/Sanger/CGP/Vaf.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package Sanger::CGP::Vaf;
use strict;
use Const::Fast qw(const);

our $VERSION = '5.3.5';
our $VERSION = '5.3.6';

const my $LICENSE =>
"#################
Expand Down
22 changes: 12 additions & 10 deletions perl/lib/Sanger/CGP/Vaf/Process/Variant.pm
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ sub storeResults {
my $WTR = $g_pu->{'ref_p'} + $g_pu->{'ref_n'};
my $VAF;
eval {$VAF = $MTR/($MTR+$WTR);};
$VAF=defined $VAF?sprintf("%.2f",$VAF):'0.0';
$VAF=defined $VAF?sprintf("%.4f",$VAF):'0.0';
if ($self->getVarLine=~/BEDFILE/) {
my $bed_line=$g_pu->{'chr'}."\t".
$g_pu->{'start'}."\t".
Expand Down Expand Up @@ -391,13 +391,15 @@ sub _check_hdr_overlap {
###
my $i=0;
my $res = $tabix->query_full($chr,$zero_start,$one_end);
while(my $record=$res->next) {
if($record) {
$i=1;
return $i;
}
}
$i;
if(defined($res)){
while(my $record=$res->next) {
if($record) {
$i=1;
return $i;
}
}
}
$i;
}


Expand Down Expand Up @@ -934,7 +936,7 @@ sub addNormalCount {
$g_pu->{'normal_MTR'}=$g_pu->{'alt_p'} + $g_pu->{'alt_n'};
$g_pu->{'normal_WTR'}=$g_pu->{'ref_p'} + $g_pu->{'ref_n'};
eval{$VAF=$g_pu->{'normal_MTR'}/($g_pu->{'normal_WTR'}+$g_pu->{'normal_MTR'}); };
$g_pu->{'normal_VAF'}=defined $VAF?sprintf("%.2f",$VAF):'0.00';
$g_pu->{'normal_VAF'}=defined $VAF?sprintf("%.4f",$VAF):'0.00';
$g_pu->{'normal_UNK'}=$g_pu->{'unk'};
$g_pu->{'normal_AMB'}=$g_pu->{'amb'};

Expand Down Expand Up @@ -1061,7 +1063,7 @@ sub formatResults {

my $VAF;
eval {$VAF = $MTR/($MTR+$WTR);};
$VAF=defined $VAF?sprintf("%.2f",$VAF):'0.0';
$VAF=defined $VAF?sprintf("%.4f",$VAF):'0.0';

if($self->getVarType ne 'indel') {
$pileup_results={
Expand Down
8 changes: 4 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ perlmods=( "File::ShareDir" "File::ShareDir::Install" "Bio::Root::Version@1.0069
(
set -e
for i in "${perlmods[@]}" ; do
echo -n "Installing build prerequisite $i..."
echo "Installing build prerequisite $i..."

set -x
$INIT_DIR/perl/bin/cpanm -v --mirror http://cpan.metacpan.org -l $INST_PATH $i
Expand Down Expand Up @@ -166,7 +166,7 @@ else
) >>$INIT_DIR/setup.log 2>&1


echo -n "Building htslib ..."
echo "Building htslib ..."
(
if [ -e $SETUP_DIR/htslib.success ]; then
echo " previously installed ...";
Expand All @@ -188,7 +188,7 @@ else

(
if [[ ",$COMPILE," == *,samtools,* ]] ; then
echo -n "Building samtools ..."
echo "Building samtools ..."
if [ -e $SETUP_DIR/samtools.success ]; then
echo " previously installed ...";
else
Expand All @@ -210,7 +210,7 @@ else
fi
) >>$INIT_DIR/setup.log 2>&1

echo -n "Building Bio::DB::HTS ..."
echo "Building Bio::DB::HTS ..."
(
if [ -e $SETUP_DIR/biohts.success ]; then
echo " previously installed ...";
Expand Down

0 comments on commit d532dfb

Please sign in to comment.