Entering edit mode
                    8.6 years ago
        cl10101
        
    
        ▴
    
    80
    I am trying to filter variants with dbSNP annotation. In my VCF file this information is contained in INFO column like this:
Y       59003592        .       A       G       .       .       NS=1;AN=1;AC=1;CGA_XR=dbsnp.96|rs2140187;CGA_SDO=2      GT:PS:FT:GQ:HQ:EHQ:CGA_CEHQ:GL:CGA_CEGL:DP:AD:CGA_RDP        1:.:PASS:2035:2035,.:2035,.:44,.:-2035,0:-44,0:157:146,.:11
Information from header:
##INFO=<ID=CGA_XR,Number=A,Type=String,Description="Per-ALT external database reference (dbSNP, COSMIC, etc)">
According to vcftools documentation there is option to filter sites with specific INFO flag (--keep-INFO). I've tried to use this:
vcftools --vcf file.vcf --out output --keep-INFO CGA_XR
but without success:
VCFtools - 0.1.15
(C) Adam Auton and Anthony Marcketta 2009
Parameters as interpreted:
    --vcf file.vcf
    --out output
    --keep-INFO CGA_XR
After filtering, kept 1 out of 1 Individuals
Error: Using INFO flag filtering on non flag type CGA_XR will not work correctly.
What is the proper usage of this function?
That's a delicious solution!