Skip to content

maf2vcf.pl: multiple FILTER tags should be semicolon separated #209

Description

@soccin

The VCF spec (https://github.com/samtools/hts-specs/blob/master/VCFv4.3.tex) says:

FILTER - filter status: PASS if this position has passed all filters, i.e. a call is made at this position. Otherwise, if the site has not passed all filters, a semicolon-separated list of codes for filters that fail. e.g. “q10;s50”

Some VCF parsers are fussy about this; simple fix:

@@ -196,6 +196,9 @@ while( my $line = $maf_fh->getline ) {
     $qual = "." if( !defined $qual or $qual eq "" );
     $filter = "." if( !defined $filter or $filter eq "" );
 
+    # VCF Spec says multiple FILTER tags should be _semicolon_ separated
+    $filter =~ s/,/;/g;
+
     # If normal alleles are unset in the MAF (quite common), assume homozygous reference
     $n_al1 = $ref if( $n_al1 eq "" );
     $n_al2 = $ref if( $n_al2 eq "" );

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions