plink-ng icon indicating copy to clipboard operation
plink-ng copied to clipboard

Request: plink2 --extract/exclude-if-info [key(s)...]

Open kscott-1 opened this issue 1 year ago • 1 comments

Is it possible to implement an improvement to this flag to allow for multiple INFO filters in the initial vcf to pgen conversion?

plink2 --vcf file.vcf --extract-if-info "A == 1" --extract-if-info "B == 2" --make-pgen

This results in the following error:

Error: Duplicate --extract-if-info flag.

Ideally, I have an INFO flag which I would like to filter like "0 < A < 1" as well, i.e. I'd like to do:

plink2 --vcf file.vcf --extract-if-info "(0 < A < 1) && (B == 2)" --make-pgen or some form of that

Thanks!

(Using Jan 5 a5.10 build)

kscott-1 avatar Jan 23 '24 17:01 kscott-1

I may implement this at some point, but this is relatively low-priority since (i) bcftools already handles this and (ii) if bcftools is really too slow, splitting this type of filter across two plink2 commands isn't a big deal.

chrchang avatar Jan 25 '24 05:01 chrchang