brentp / slivar

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

Slivar for SVtyper vcf #92

Closed nroak closed 3 years ago

nroak commented 3 years ago

I'm using Slivar to apply segregation filters to a multi-sample vcf for SV calls generated by SURVIVOR followed by SVTYPER. I understand that Slivar was mainly developed through SNV/InDel point of view, so the SV variant classes won't be supported. That said, I have had good success with GT field based filtering for segregating SVs.

However, the output generates errors like below for nearly 2.5mil entries in the VCF: Is there any way to silence these messages that we would expect for non-SNV calls?

~/resources/slivar/slivar expr \
--vcf ../SVTYPER.perSample.cohort.merged.ann.snpeff.ann.vcf \
--pass-only \
--out-vcf $family.segregating.vcf \
--js functions.js \
--ped $family.ped \
--info "INFO.SVLEN >100" \
--family-expr "shared_affected:fam.every(affected_any)" \
--family-expr "shared_affected_only:fam.every(affected_only)" \
--family-expr "het:fam.every(function(s) {return s.het == s.affected && s.hom_ref == !s.affected})" \
--family-expr "hom_alt:fam.every(function(s) {return s.hom_alt == s.affected && s.hom_ref == !s.affected})" \
--family-expr "seg_dom:fam.every(segregating_dominant)" \
--family-expr "seg_rec:fam.every(segregating_recessive)"

> slivar version: 0.1.13 8cf3a240d38c05d14d4208a6c074aca89332519f
[slivar] 132 samples matched in VCF and PED to be evaluated
error: unknown impact "feature_fusion" from csq "N[CHR15:101980258[|feature_fusion|LOW|||transcript|ENST00000456328.2|processed_transcript||t(1%3B15)(p36.33%3Bq26.3)(n.-1391)||||||" please report the variant at https://github.com/brentp/slivar/issues
brentp commented 3 years ago

Hi, you certainly should be able to use slivar for SVs.

I'll add this to the default-order list, but meanwhile, you can download this file: https://raw.githubusercontent.com/brentp/slivar/master/src/slivarpkg/default-order.txt

and add "feature_fusion" somewhere toward the bottom (if you agree that it's low impact) and save that.

Then if you export the environment variable: SLIVAR_IMPACTFUL_ORDER=/path/to/your/saved-impact-order.txt, slivar will use that instead of the default.

brentp commented 3 years ago

And if you're not already, note that duphold annotations work well to filter variants and you can add expressions for that to the slivar command.

brentp commented 3 years ago

I added feature_fusion to that file so now you just need to download it and set the environment variable to the path where you keep it.