arq5x / bedtools

A powerful toolset for genome arithmetic.
http://code.google.com/p/bedtools/
GNU General Public License v2.0
139 stars 86 forks source link

bedtools window produces negative values #159

Open BenxiaHu opened 4 years ago

BenxiaHu commented 4 years ago

Hi, I want to get the coordinates of input file by extending 1000000bp up/downstream of TSS: cat input.csv | awk 'NR>1{print $1"\t"$5"\t"$6}' | bedtools window -b stdin -a genes.bed -w 1000000 | awk 'OFS="\t" {print $6,$7,$8,$1,$2,$3,$4,$5}' >input_gene.bed # Error: malformed BED entry at line 1635. Start Coordinate detected that is < 0. Exiting.

So how to set those negative values to 0? Best,