There were many lines with more than 4 fields. So, to simplify the file, I removed the last two columns and retained only the first two columns. cat -t SNPs.bed
Chr09^I57068854
Chr09^I57068854
Chr09^I57068854
Chr06^I13897772
Chr09^I57068854
Chr02^I2244737
Chr09^I57068854
Chr02^I2244737
Chr09^I57054157
Chr01^I60532342
awk -F '\t' '(NF!=2) {print FILENAME,NF,NR, $0;}' SNPs.bed
awk -F '\t' '(NF!=4) {print FILENAME,NF,NR, $0;}' genesgff1.bed
didn't display anything whichI think is expected. But the bedtools is still not working,
bedtools intersect -a genesgff1.bed -b SNPs.bed -wa > output.txt
Error: unable to open file or unable to determine types for file SNPs.bed
- Please ensure that your file is TAB delimited (e.g., cat -t FILE).
- Also ensure that your file has integer chromosome coordinates in the
expected columns (e.g., cols 2 and 3 for BED).
remove the header: chr^Istart^Iend^Igenes
what is the output of
Thank you, I did remove the headers from both bed files. The output of
is