Question: BEDtools intersect unable to open file
1
gravatar for ATpoint
2.8 years ago by
ATpoint42k
Germany
ATpoint42k wrote:

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.

macos centos bedtools • 1.6k views
ADD COMMENTlink modified 2.8 years ago by Alex Reynolds31k • written 2.8 years ago by ATpoint42k

what are the outputs of:

file RG142.snp.LOH_Ex1KG_sorted.vcf

and

head -n1 RG142.snp.LOH_Ex1KG_sorted.vcf
ADD REPLYlink written 2.8 years ago by Pierre Lindenbaum131k
1
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 REPLYlink modified 2.8 years ago by _r_am31k • written 2.8 years ago by ATpoint42k
0
gravatar for Alex Reynolds
2.8 years ago by
Alex Reynolds31k
Seattle, WA USA
Alex Reynolds31k wrote:

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 COMMENTlink modified 2.8 years ago • written 2.8 years ago by Alex Reynolds31k
Please log in to add an answer.

Help
Access

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