This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error when using Bedtools for sorting files

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

Post a head of your bed file, and also look into the sort-bed function in the bedops package.

1 answer

$ 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

Log in to answer this question.