Question: BEDtools intersect unable to open file
1
gravatar for ATpoint
22 months ago by
ATpoint28k
Germany
ATpoint28k 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.2k views
ADD COMMENTlink modified 22 months ago by Alex Reynolds29k • written 22 months ago by ATpoint28k

what are the outputs of:

file RG142.snp.LOH_Ex1KG_sorted.vcf

and

head -n1 RG142.snp.LOH_Ex1KG_sorted.vcf
ADD REPLYlink written 22 months ago by Pierre Lindenbaum125k
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 22 months ago by RamRS25k • written 22 months ago by ATpoint28k
0
gravatar for Alex Reynolds
22 months ago by
Alex Reynolds29k
Seattle, WA USA
Alex Reynolds29k 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 22 months ago • written 22 months ago by Alex Reynolds29k
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: 942 users visited in the last hour