arq5x / bedtools

A powerful toolset for genome arithmetic.
http://code.google.com/p/bedtools/
GNU General Public License v2.0
140 stars 85 forks source link

bedtools expects "chr1" in VCF where reference data uses "1" #103

Closed aksarkar closed 8 years ago

aksarkar commented 10 years ago

This means intersect, etc. all give nonsense answers.

A minimal test case:

#!/bin/bash
cat <<EOF >test1.vcf
##fileformat=VCFv4.0
1   10000   foo A   C   .   .   .
EOF
cat <<EOF >test2.vcf
##fileformat=VCFv4.0
chr1    10000   foo A   C   .   .   .
EOF
echo -e 'chr1\t0\t20000' >test.bed
bedtools intersect -a test1.vcf -b test.bed >test1.hits
bedtools intersect -a test2.vcf -b test.bed >test2.hits
head *.hits

And its output

==> test1.hits <==

==> test2.hits <==
chr1    10000   foo     A       C       .       .       .