brentp / slivar

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

Feature Request: Restrict Analysis to BED Regions/ Locations #31

Closed nroak closed 5 years ago

nroak commented 5 years ago

I was wondering if it will be possible to incorporate an upstream filter for BED region (chr12:NN-NN input BED file) before any evaluation of expressions such as denovo, comphet, etc.

This will help speed up the analysis of testing multiple expressions of inheritance on a small set of candidate genes. Currently, on a multi-sample VCF, it takes a long time if evaluating 3-4 expressions. Currently, I'm doing this in a two-step process using bedtools intersect followed by Slivar.

brentp commented 5 years ago

slivar expr already has a --region which can be a BED regions or a single chr:start-end. That will be used to limit the analysis. Does this address your needs?

nroak commented 5 years ago

Oh, I didn't find it before, my bad. Thanks for this. Just to clarify, this restricts analysis BEFORE expressions are evaluated, correct?

brentp commented 5 years ago

yes, it only even parses variants that are in those regions, so the expressions are only evaluated for variants in those regions.