Thank you Jorge. Yes, at the end, I have done it with BCFTOOlS:
bcftools view --genotype ^miss $FILE > "${FILE%.vcf}.fGT.vcf"
I was hoping to do everything in R, as it would be easier to assemble the entire pipeline in R (than to assemble all the scripts I have in a master bash shell .sh script ) .
What tools are you using? "R/BioC" have multiple tools. Can you please give us the exact commands/scripts you're using?
Can you give some background on how the VCF was generated?
Please post the program you are using and the sample vcf file.
I will add to the comments from the 3 other great people. R would not be my 'go to' environment for filtering a VCF. To do what you want, just use
bcftools viewwith the following parameter:Dear gentlemen, thank you for your replies and help. Here I am posting the R code that I am using to do the filtering of a VCF file that is generated by DELLY and contains INVERSIONs only .. Any suggestions on how to post/link the input VCF file would be welcome. Thank you very much !