brentp / slivar

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

slivar expr : unaffected patients not selected #145

Closed gael-millot closed 1 year ago

gael-millot commented 1 year ago

Hi.

May be not an issue. Using the attached files, when I use: --family-expr 'all:fam.every(function(s){return s.hom_ref || s.het || s.hom_alt})' --family-expr 'all:fam.every(function(s){return s.affected || ! s.affected})' I only have the 7 affected patients selected, not the 4 unaffected ones in the VCF output.

when I use: --family-expr 'all:fam.every(function(s){return ! s.affected})' I have an empty VCF output.

Thanks for taking care of this message.

Best.

Dyslexia.pedigree.txt

vep.merged_first_10000.vcf.gz

brentp commented 1 year ago

Hi Gael, for family expressions, slivar reports the IDs of affected samples only, this works intuitively for most cases, but indeed, can be confusing at times. If you want to do something with unaffected samples, you can use --sample-expr.

gael-millot commented 1 year ago

If the field generated by --sample-expr can then be used in slivar tsv -s, then my problem is indeed solved. Thanks !

gael-millot commented 1 year ago

However: what kind of expression can be written with --sample-expr to be sure to take systematically all the samples ?

brentp commented 1 year ago

However: what kind of expression can be written with --sample-expr to be sure to take systematically all the samples ?

You'll have to describe more what you're trying to do.

gael-millot commented 1 year ago

Sorry. Slivar is used in a pipeline with parameters defined in a config file. An option of this pipeline would be to get the .tsv file without any filtering made on the VCF (just benefit from the annotations). --pass-only can do it for slivar expr if I understood well but slivar tsv requires the mandatory -s option. Thus, the idea would be to fill the -s option but being certain that no filter is made. Thanks !

gael-millot commented 1 year ago

--sample-expr 'all:sample.GQ >= 0' seems to do not take all the samples (probably when GQ is .). --sample-expr 'all:sample.DP >= 0' seems to do the job, but I would need to be sure (i.e., what about empty info in DP ?)

Thanks.

brentp commented 1 year ago

I think you can you can use --sample-expr 'all:true'

gael-millot commented 1 year ago

Works ! Thanks a lot !