VCF to BED conversion error in BEDOPS
2
0
Entering edit mode
6.3 years ago
Shab86 ▴ 310

I have been using the latest version of convert2bed (from bedops) to convert VCF format to BED. But have been getting this error:

convert2bed -i vcf </files/stuff.vcf> /files/stuff.bed

BED row length exceeds capacity at line 1 in -.
Check that you have unix newlines (cat -A) or increase TOKENS_MAX_LENGTH in BEDOPS.Constants.hpp and recompile BEDOPS.

When I simply use cat -A:

cat -A /files/stuff.vcf | convert2bed -i vcf /files/stuff.bed

Segmentation fault

Any help would be greatly appreciated!

bedops bed vcf • 2.2k views
ADD COMMENT
0
Entering edit mode
6.3 years ago
Shab86 ▴ 310

So, probably this and incomplete .bed output are because of the sorting step which might cause the /tempdir to be filled up. A workaround for this, this to use this in addition to my above commands: --do-not-sort. For now, it's working!

ADD COMMENT
0
Entering edit mode
6.3 years ago

If /tmp is filling up, use --sort-tmpdir=<dir> with convert2bed to specify an alternate directory to store intermediate sort data.

You could use --do-not-sort, I suppose, but really you want a sorted BED file so that you can use it for set operations. If you use --do-not-sort, you would follow up with sort-bed --tmpdir <dir> on the resulting unsorted BED, to put it into sorted order.

The purpose of cat -A is to debug your VCF file, to make sure it doesn't have Microsoft-specific line endings. If it does, then you would use dos2unix or tr or similar to clean the input. You would not pipe the output of cat -A to convert2bed, as it seems you may be doing from your question.

ADD COMMENT

Login before adding your answer.

Traffic: 1689 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6