Skip to content

Commit

Permalink
Handle various formats used by VCF to show no data for sample, also c…
Browse files Browse the repository at this point in the history
…aught potential bug, see WIP, PR for more
  • Loading branch information
keiranmraine committed Jun 4, 2019
1 parent 71396da commit f7f6908
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bin/cgpFlagCaVEMan.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

##########LICENCE##########
# Copyright (c) 2014-2018 Genome Research Ltd.
# Copyright (c) 2014-2019 Genome Research Ltd.
#
# Author: CASM/Cancer IT <cgphelp@sanger.ac.uk>
#
Expand Down Expand Up @@ -572,8 +572,8 @@ sub runFlagger{
my $sampleHitCount = 0;
my $totalSampleCnt = 0;
foreach my $sampData(@samples){
next if($sampData eq ".");
$totalSampleCnt++;
next if($sampData eq q{0:.:.:.:.} || $sampData eq q{-} || $sampData eq q{.});
#GT:GF:CF:TF:AF 0|0:41:0:0:0
my ($gentype,@data) = split(':',$sampData);
my $totalCvg = 0;
Expand Down
4 changes: 2 additions & 2 deletions bin/convertVCFUnmatchedToBed.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/perl

############## LICENSE ##############
# Copyright (c) 2014-2018 Genome Research Ltd.
# Copyright (c) 2014-2019 Genome Research Ltd.
#
# Author: CASM/Cancer IT <cgphelp@sanger.ac.uk>
#
Expand Down Expand Up @@ -106,7 +106,7 @@

for my $i(9..$max_col) {
$sample_count++;
next if($x[$i] =~m/^[.\-]$/);
next if($x[$i] eq '0:.:.:.:.' || $x[$i] =~m/^[.\-]$/);
my @gts = split /:/, $x[$i];
for my $j(1..$max_allele) {
next if($base_list[$j-1] eq $refb);
Expand Down
2 changes: 1 addition & 1 deletion lib/Sanger/CGP/CavemanPostProcessing.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use Attribute::Abstract;
use Data::Dumper;
use base 'Exporter';

our $VERSION = '1.8.7';
our $VERSION = '1.8.8';
our @EXPORT = qw($VERSION);

const my $MATCH_CIG => 'M';
Expand Down
4 changes: 2 additions & 2 deletions lib/Sanger/CGP/CavemanPostProcessing/Flagger.pm
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ sub getVCFUnmatchedFlag{
my $sampleHitCount = 0;
my $totalSampleCnt = 0;
foreach my $sampData(@samples){
next if($sampData eq ".");
$totalSampleCnt++;
next if($sampData eq q{0:.:.:.:.} || $sampData eq q{-} || $sampData eq q{.});
#GT:GF:CF:TF:AF 0|0:41:0:0:0
my ($gentype,@data) = split(':',$sampData);
my $totalCvg = 0;
Expand Down Expand Up @@ -769,4 +769,4 @@ sub sameReadPosFlag{
return 0;
}

1;
1;
2 changes: 1 addition & 1 deletion lib/Sanger/CGP/CavemanPostProcessor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use Attribute::Abstract;
use Data::Dumper;
use base 'Exporter';

our $VERSION = '1.8.7';
our $VERSION = '1.8.8';
our @EXPORT = qw($VERSION);

const my $MATCH_CIG => 'M';
Expand Down

0 comments on commit f7f6908

Please sign in to comment.