Error when using Bedtools for sorting files
1
0
Entering edit mode
4.6 years ago

I have a .bed file that I've converted from .vcf and I want to sort them and remove duplicate entries. Whenever I try to sort the file using bedtools, I get this error. I'm not using bash's sort because I want to make sure that my files can be used by bedtools in the future.

$bedtools sort -i < Complete_Human_SNPs.bed > -bash: syntax error near unexpected token newline' software error • 1.2k views ADD COMMENT 0 Entering edit mode Post a head of your bed file, and also look into the sort-bed function in the bedops package. ADD REPLY 1 Entering edit mode 4.6 years ago tiago211287 ★ 1.3k$ bedtools sort < -bash: syntax error near unexpected token newline'

Probably the problem is this character you used '<'

Try :

bedtools sort -i Complete_Human_SNPs.bed > output.bed