AstraZeneca-NGS / VarDictJava

VarDict Java port
MIT License
128 stars 57 forks source link

Possible formatting issue in the somatic mode #378

Open amunzur opened 1 year ago

amunzur commented 1 year ago

Dear Vardict developers,

Here is the first variant identified by Vardict:

#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  tumor|normal
chr1    1789227 .       C       T       104     Q10;SN1.5;NM5.25;AMPBIAS        SAMPLE=tumor|normal;TYPE=2;0;DP=1443;END=1789227;VD=5;AF=0.0035;BIAS=2:2;REFBIAS=647:791;VARBIAS=3:2;PMEAN=36.4;PSTD=1;QUAL=45;QSTD=0;SBF=60;ODDRATIO=10;MQ=0.0035;SN=0;HIAF=1.4;ADJAF=0.6627;SHIFT3=0.54554;MSI=2012;MSILEN=0;NM=948;HICNT=1064;HICOV=0;LSEQ=0;RSEQ=C/C;GDAMP=36.2;TLAMP=1;NCAMP=44.9;AMPFLAG=1    GT:DP:VD:AD:AF:RD:ALD   0/1:1443:5:1438,5:0.0035:647,791:3,2

I think TYPE=2;0 might be a formatting issue. When I try to run picard's sortvcf on this vcf file, I get this error:

Exception in thread "main" java.lang.IllegalStateException: Key 0 found in VariantContext field INFO at chr1:1789227 but this key isn't defined in the VCFHeader.  We require all VCFs to have complete VCF headers by default.

It is complaining because it thinks 0 is an undefined key since a semicolon is used as a delimiter in TYPE=2;0.

Here is my code:

        vardict-java \
            -G /path/to/hg38 \
            -b 'tumor.bam|normal.bam' \
            -f 0.001 \
            -N tumor \
            -k 1 \
            -c 1 \
            -S 2 \
            -E 3 \
            -g 4 \
            -r 4 \
            --nosv \
            -th 12 \
            /path/to/bed | \
            testsomatic.R | \
            var2vcf_valid.pl \
        -N 'tumor|normal' -f 0.001 > output.vcf

I would appreciate any insights!