[Feature Request] -i/-e flags to accept file containing expression
Hello, thanks for maintaining bcftools!
Would it be possible to allow the -i/-e flags to accept a text file containing the expression to perform inclusion/exclusion by? I'm aware that this can be done with perl scripts but what we're looking for is a simple, reproducible way for our scientists (i.e. not necessarily programming-proficient people) to filter VCFs. Very often they want to filter by a pretty standard set of conditions, and it would be great if we could maintain a local repository of 'filtering configs'.
Thanks
We could also do this on a local fork if it's preferable - any pointers to the appropriate code would be much appreciated.
I (pending review) have solved my own issue by writing a bash wrapper for bcftools that handles passing a file to -i/-e amongst other things, but I'll leave it open for now in case it's interesting
This is easy to add in principle, the only question is what the syntax would look like.
Maybe use the @ symbol which is already used to reference a file in other expressions, for example
bctools view -i '@expressions.txt'
Alternatively, the program could check directly for an existence of a file, it is very unlikely for a file to be named to match a valid expression.