Filter VCF File by VCF Format Variants
2
0
Entering edit mode
14 months ago

I am trying to filter a VCF file to only include variants that are within another file, which is a txt file with VCF formatted columns (CHR POS REF ALT). I have been having a hard time finding a way to filter by REF and ALT, in addition to CHR POS (which can be accomplished in plink). Anyone have tips?

SnpSift Plink Bcftools • 767 views
ADD COMMENT
2
Entering edit mode
14 months ago

The usual way to do this with plink2 is to first use --set-all-var-ids to make all your variant IDs based on position+alleles, and then use --extract for the filtering step. Note that you can use --recover-var-ids at a later time to restore your original variant IDs when you need them.

ADD COMMENT
0
Entering edit mode
14 months ago

convert your tab delimited file to VCF by adding a dummy VCF header and some empty columns (.). You can then use tools like bcftools isec --collapse none .

ADD COMMENT

Login before adding your answer.

Traffic: 2625 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6