This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcf to bed

While I attempted to convert my .vcf to .bed, I faced the following problem:

►tbbrubio@tbbrubio-B85M-HD3[gwd] convert2bed -i vcf < gwd.recode.vcf > sorted-gwd.vcf.bed
►Error: Invalid field count (64) -- input file may have too many fields
►convert2bed
  version: 2.4.13
  author:  Alex Reynolds

What have I done wrong?

convert2bed bedops

I try to have convert2bed follow VCF format specifications, so if an error comes up that says a line in a header contains too many fields, there may either be something about the VCF input file that does not follow VCF specification, or convert2bed isn't using the correct rules to process the VCF file and thinks something is wrong when the input is fine. If you want to post your VCF file somewhere when I can examine it more closely, that would be helpful to diagnosing the issue. You can also use other toolkits to first validate the VCF file. I think vcftools may contain such a tool, but I am not certain.

1 answer

You can try BEDOPS which contain vcf2bed script.

Link Here: http://bedops.readthedocs.org/en/latest/content/reference/file-management/conversion/vcf2bed.html

Log in to answer this question.