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'
• 2,506 views
•
link
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
• 1 views
•
link
Log in to answer this question.
Post a
headof your bed file, and also look into thesort-bedfunction in the bedops package.