brentp / slivar

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

CADD score filtering #133

Closed Elliott77 closed 2 years ago

Elliott77 commented 2 years ago

Can I use a Slivar command with GNOMAD annotations ( gnomad.hg38.genomes.v3.fix.zip) to filter variants by CADD score?

I'm imagining something like: _--info "INFO.caddphred > 10" -g gnomad.hg38.genomes.v3.fix.zip --region ${GenomeBED} \ -v $VCF -o $VCFDIR/$TEMPVCF \

but I get an error: _error from duktape: unknown attribute:caddphred

Neither the gnomad or slivar websites make it clear to me what the attribute should be. Let me know if you have ideas.

Thanks!

Elliott

brentp commented 2 years ago

Hi Elliot, that would work if you had an INFO field containing cadd_phred. But it must be absent. If you have cadd_phred in the VCF but it's not on all variants, then you can do something like:

--info " 'cadd_phred' in INFO && INFO.cadd_phred > 10"

if you don't have cadd_phred in your VCF, then you could use slivar make-gnotate to annotate with that while you filter.

Elliott77 commented 2 years ago

Brilliant. Thanks so much Brent! And thanks for keeping these tools up. Huge fan of Slivar and cyvcf.

Elliott