Question: intersecting bed and vcf files
1
gravatar for hpapoli
4.7 years ago by
hpapoli70
Sweden
hpapoli70 wrote:

Hello,

I want to intersect a vcf file with a bed file for which I use the following command:

intersectBed -a vcf -b bedfile > newvcf

The problem here is that the file newvcf is a vcf file without a header so when I want to intersect the two vcfs with this command, I am not able to do that:

vcf-isec -n +2 A.vcf.gz B.vcf.qz | bgzip -c > out.vcf

How I can create the intersect with bed file so I can have a proper vcf file with header as the output?

Thanks!

intersectbed • 4.2k views
ADD COMMENTlink modified 4.7 years ago • written 4.7 years ago by hpapoli70
2
gravatar for hpapoli
4.7 years ago by
hpapoli70
Sweden
hpapoli70 wrote:

I am sorry, I found the answer, one only needs to add -header option to the intersectBed command!

ADD COMMENTlink written 4.7 years ago by hpapoli70
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1307 users visited in the last hour