Skip to content

Commit

Permalink
output of delta2vcf now passes vcf-validate
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Zimin committed Oct 2, 2020
1 parent cf3f7ac commit 4fa9aee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/delta2vcf.pl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
printf("##fileDate=20%02d%02d%02d\n",$year-100,$mon+1,$mday);
print "##source=delta2vcf\n";
print "##reference=file:/$ref\n";
foreach $c(keys %rseq){
print "##contig=<ID=$c,length=",length($rseq{$c}),">\n";
}
print "##FORMAT=<ID=GT,Number=1,Type=Integer,Description=\"Genotype\">\n";
print "##FORMAT=<ID=DP,Number=1,Type=Integer,Description=\"Coverage Depth, 1 by default\">\n";
print "##FORMAT=<ID=AD,Number=R,Type=Integer,Description=\"Number of observations for each allele, 1,2 by default\">\n";
print "##FORMAT=<ID=RO,Number=1,Type=Integer,Description=\"Reference allele observation count, 1 by default\">\n";
Expand Down Expand Up @@ -161,7 +165,7 @@
$last_refname="";
$last_pos="";
foreach $l(@outarray_sorted){
print $l->{'refname'},"\t",$l->{'refpos'},"\t\.\t",$l->{'ref'},"\t",$l->{'qry'},"\t40\tPASS\t*\tGT:DP:AD:RO:QR:AO:QA\t0:1:1,2:1:40:2:40\n" if(not($last_refname eq $l->{'refname'}) || not($last_pos==$l->{'refpos'}));
print $l->{'refname'},"\t",$l->{'refpos'},"\t\.\t",$l->{'ref'},"\t",$l->{'qry'},"\t40\tPASS\t.\tGT:DP:AD:RO:QR:AO:QA\t0:1:1,2:1:40:2:40\n" if(not($last_refname eq $l->{'refname'}) || not($last_pos==$l->{'refpos'}));
$last_refname=$l->{'refname'};
$last_pos=$l->{'refpos'};
}
Expand Down

0 comments on commit 4fa9aee

Please sign in to comment.