Skip to content
Snippets Groups Projects
Commit 87557454 authored by Brandi Cantarel's avatar Brandi Cantarel
Browse files

update unioncode platypus bug

parent 679cd228
No related merge requests found
......@@ -24,12 +24,16 @@ foreach $vcf (@vcffiles) {
if ($line =~ m/#CHROM/) {
($chromhd, $posd,$idhd,$refhd,$althd,$scorehd,
$filterhd,$annothd,$formathd,@sampleids) = split(/\t/, $line);
foreach $j (0..$#sampleids) {
$sampleids[$j] =~ s/\.final//g;
}
unless (@sampleorder) {
@sampleorder = @sampleids;
print OUT $line,"\n";
}
next;
}
next;
}
my ($chrom, $pos,$id,$ref,$alt,$score,
$filter,$annot,$format,@gts) = split(/\t/, $line);
......@@ -55,7 +59,7 @@ foreach $vcf (@vcffiles) {
foreach my $i (0..$#deschead) {
$gtdata{$deschead[$i]} = $gtinfo[$i];
}
if ($gtdata{DP} == 0 || $gtdata{GT} eq './.') {
if ($gtdata{GT} eq './.') {
$newgts{$sid} = '.:.:.:.:.';
$missingGT ++;
next FG;
......@@ -71,6 +75,7 @@ foreach $vcf (@vcffiles) {
$gtdata{DP} = $gtdata{NR};
$gtdata{AO} = $gtdata{NV};
$gtdata{RO} = $gtdata{DP} - $gtdata{AO};
$gtdata{AD} = join(",",$gtdata{RO},$gtdata{AO})
} elsif (exists $gtdata{AO} && exists $gtdata{RO}) {
$gtdata{AD} = join(',',$gtdata{RO},$gtdata{AO});
$gtdata{DP} = $gtdata{RO};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment