This is a test version of Biostars. For the public version, visit https://www.biostars.org.
failed to covert bed files to make it compatible with UCSC trackhub

Hi, I have the 8 bed files footprints_1.bed, footprints_2.bed (sorted, and work well with other bedtools commander), like

chrY    59017131        59017352        MAZ     99.9928 -
chrY    59017132        59017353        MAZ     99.9989 -
chrY    59017132        59017353        VEZF1   99.9671 -
chrY    59017133        59017354        ZN467   99.9616 -
chrY    59017134        59017355        MAZ     99.9603 -
chrY    59017134        59017355        ZN467   99.7886 -
chrY    59017135        59017356        MAZ     99.9841 -
chrY    59017135        59017356        VEZF1   99.9903 -
chrY    59017140        59017352        MZF1    99.9998 -
chrY    59017141        59017362        VEZF1   99.9993 -

when I convert them to bigbed,

./binarycommander/bedToBigBed footprints_1.bed http://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/hg19.chrom.sizes footprints_1.bb

I did not get footprints.bb; however, information is shown

footprints_1.bed
end (2) before start (1999786) line 2665221 of footprints_1.bed
footprints_2.bed
end (2) before start (1999786) line 2551396 of footprints_2.bed
footprints_3.bed
end (7) before start (699779) line 1608375 of footprints_3.bed
---

What does the information mean? Could anyone help me solve the issues? Thank you.

bedtobigbed

1 answer

the message is quite clear, you have some start values greater than the end value.

you can display those lines using:

awk 'int($2)>int($3)' *.bed

Thank you. I checked the line 2551396 of footprints_2.bed

chr2    1999786 2e+06   ELF5    99.9799 +

So change awk 'BEGIN {OFS="\t"} {print $1,int($2),int($3), $4}' footprints_2.bed |sort -k1,1 -k2,2n > new.footprints_2.bed

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.

Upvote|Bookmark|Accept

Log in to answer this question.