brentp / slivar

genetic variant expressions, annotation, and filtering for great good.
MIT License
249 stars 23 forks source link

vcf.nim(911) error for some genotypes #55

Closed mark-welsh closed 4 years ago

mark-welsh commented 4 years ago

Hi Brent,

I am using slivar 0.1.10 for filtering tumor/normal somatic variants. The VCF files having been decomposed and normalized with vt using the proper VCF header that you mentioned here.

It looks like vt decompose -s changes some multi-alleic sites GT fields to 0/1/. which raises the following error after I normalize and run slivar:

> slivar version: 0.1.10 917aa1a61bd0c0ba50521ea4146a3a4dc45b8b64
[slivar] 2 samples matched in VCF and PED to be evaluated
[slivar] message for gnomad.hg38.v2.zip:
   > created on:2019-05-10
vcf.nim(911)             alts
Error: unhandled exception: not implemented for:0/1/. [OSError]

Do you know of a way to fix this, or what exactly in slivar is causing this error? I must include these variants in the analysis and am trying to avoid writing a script to change these genotypes

brentp commented 4 years ago

can you share a small sample VCF with a few of these and I'll see what I can do. slivar is tuned toward diploid vcfs, but I'll see what I can do.

mark-welsh commented 4 years ago

Sure, thanks for the help!

Here is a variant output by MuTect2: original.vcf.gz

and the same variant after decomposing and normalizing with vt: decomposed.normalized.vcf.gz

brentp commented 4 years ago

excellent, thank you. and can you give an example command that you are trying to run so I can make sure to fix that?

mark-welsh commented 4 years ago
slivar expr \
    --alias test.alias \
    --pass-only \
    --vcf decomposed.normalized.vcf.gz \
    --out-vcf test.filtered.vcf \
    --group-expr "VAF_filter:tumor.AF < 0.15"

where the test.alias file is just

#tumor normal
tumor normal

I had a more complicated command with gnotate and custom javascript expressions but I was able to rule those parts out and reproduce the error with just the above MWE

brentp commented 4 years ago

ok. this was a pretty simple fix. Please try the attached. This will be incorporated into next release. slivar_dev.gz

mark-welsh commented 4 years ago

it's working great, thank you for the timely help!