BEDtools intersect unable to open file
1
1
Entering edit mode
6.1 years ago
ATpoint 81k

Maybe someone experienced this before (BEDtools v.2.26.0)

Having a folder with a BED file and a number of VCF file, aiming to intersect:

bedtools intersect -c -a tmp.bed -b *.vcf > counted.txt

Error message on macOS 10.12.5:

"Error: Unable to open file RG142.snp.LOH_Ex1KG_sorted.vcf. Exiting."

The same command with the exact same commands files works perfectly fine on our CentOS HPC cluster. As I have no idea where to start debugging, suggestions are appreciated.

BEDtools macOS CentOS • 3.0k views
ADD COMMENT
0
Entering edit mode

what are the outputs of:

file RG142.snp.LOH_Ex1KG_sorted.vcf

and

head -n1 RG142.snp.LOH_Ex1KG_sorted.vcf
ADD REPLY
1
Entering edit mode
RG142.snp.LOH_Ex1KG_sorted.vcf: ASCII text, with very long lines
##fileformat=VCFv4.1

Output is the same on macOS and CentOS.

My bash_profile contains:

export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
ADD REPLY
0
Entering edit mode
6.1 years ago

Another way:

$ for fn=`ls *.vcf`; do convert2bed --input=vcf --sort-tmpdir=$PWD ${fn} > ${fn}.bed; done
$ bedmap --count tmp.bed <(bedops -u *.vcf.bed) > counted.txt
$ rm *.vcf.bed
ADD COMMENT

Login before adding your answer.

Traffic: 2111 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