This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Why the bed file not recognized as a bed file

I am using the blockbuster.x to do peak analysis, where it needs bed file as input. However, when I used one of my bed file, the blockbuster.x returned an error, saying that it's wrong file format. I don't understand why this is and I appreciate your help.

The first few lines of that bed is like this:

NC_012920.1 0   25  tag_22  1.0 -
NC_012920.1 0   26  tag_20  1.0 -
NC_012920.1 0   27  tag_18  1.0 -
NC_012920.1 0   28  tag_21  1.0 -
NC_012920.1 0   35  tag_17  2.0 -
NC_012920.1 0   37  tag_19  2.0 -
NC_012920.1 1   37  tag_24  1.0 -
NC_012920.1 4   23  tag_30  1.0 -
NC_012920.1 4   41  tag_32  1.0 -
NC_012920.1 4   42  tag_31  2.0 -

I think it's just a normal bed file?

peak bed

Are those blank lines bewteen the entries there in the actaul file, or are they a consequence of the way you've pasted it into biostars? Because they would almost certainly cause a problem if they are in the bedfile.

2 answers

it's not a bed file. https://genome.ucsc.edu/FAQ/FAQformat.html#format1

The first three required BED fields are: chrom - The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671). chromStart - The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0. chromEnd - The ending position of the feature in the chromosome or scaffold.

Chromosome names can be anything; there are no particular rules for their names in the specification, only suggestions and examples.

Use head foo.bed | cat -te to verify that the input is tab-delimited and has Unix line endings. Use BEDOPS sort-bed foo.bed > foo.sorted.bed to ensure it is sorted, assuming your analysis tool requires sorted BED input.

Log in to answer this question.