Entering edit mode
                    3.5 years ago
        ManuelDB
        
    
        ▴
    
    110
    I am filtering a VCF file with a bed file using Bedtools. I have carried out this successfully with
 bedtools intersect -wb -a myVCF.vcf -b myBEDfile.bed > output.txt 
However, what I want is to get a VCF file with the metadata and the header because after this, the application I am developing will require the format of a VCF file. I thought that is a very common filtering operation but reading bedtools interest documentation I can't find anything.