Question: how to use vcf2bed with .gz file
gravatar for Medhat
3.2 years ago by
Medhat8.7k wrote:

Is there is a way to use vcf2bed with compressed file?

for example in general the tool work like this

vcf2bed < foo.vcf > sorted-foo.vcf.bed

so if my file is foo.vcf.gz

zcat foo.vcf.gz | vcf2bed > sorted-foo.vcf.bed

will not work any idea?

snp next-gen vcf • 1.0k views
ADD COMMENTlink written 3.2 years ago by Medhat8.7k
gravatar for Pierre Lindenbaum
3.2 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum129k wrote:

( not tested ) using a hyphen for stdin ?

zcat foo.vcf.gz | vcf2bed - > sorted-foo.vcf.bed


vcf2bed <(gunzip -c foo.vcf.gz) > sorted-foo.vcf.bed


ADD COMMENTlink modified 3.2 years ago • written 3.2 years ago by Pierre Lindenbaum129k

That is right the first form zcat foo.vcf.gz | vcf2bed - > sorted-foo.vcf.bed worked fine; the other did not,

Please change to an answer :)

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by Medhat8.7k
Please log in to add an answer.


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