Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • id0
    Senior Member
    • Sep 2012
    • 130

    BEDTools: Unexpected file format. Please use tab-delimited BED, GFF, or VCF.

    I am using BEDTools and getting the following error:
    Code:
    Unexpected file format.  Please use tab-delimited BED, GFF, or VCF. Perhaps you have non-integer starts or ends at line 1?
    I had a GFF file and figured maybe there is indeed a problem, so I converted it to a 3-column BED file just to be safe. The BED file did not work either.

    I searched around for this error and it's usually caused by non-unix newlines or non-tab separators. My file does not have either of those issues.

    Here are the first few lines of the BED file:
    Code:
    chr1	3214482	3216968
    chr1	3421702	3421901
    chr1	3670552	3671498
    chr1	4290846	4293012
    chr1	4343507	4350091
    Any idea what may be causing this error?
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    Check the bed file using the following command to make sure there are no unexpected characters.

    Code:
    $ cat -e filename.bed | more
    or

    Code:
    $ cat -A filename.bed | more
    The tab characters are displayed as "^I" (at least on CentOS).
    Last edited by GenoMax; 08-19-2013, 06:52 AM.

    Comment

    • id0
      Senior Member
      • Sep 2012
      • 130

      #3
      Originally posted by GenoMax View Post
      Check the bed file using the following command to make sure there are no unexpected characters and the file is indeeded tab limited.

      Code:
      $ cat -e filename.bed | more
      I already did that. No unexpected characters.

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        Are you getting the error even with a small subset like the one you pasted above?

        Comment

        • id0
          Senior Member
          • Sep 2012
          • 130

          #5
          Used different files and small subsets and still getting the same problem.

          Supposedly, the problem is at line 1, but there is really nothing wrong with it as far as I can tell.

          Comment

          • GenoMax
            Senior Member
            • Feb 2008
            • 7142

            #6
            Not sure which exact bedtools program you need but perhaps bedops (http://code.google.com/p/bedops/) could provide an alternative.

            Comment

            • id0
              Senior Member
              • Sep 2012
              • 130

              #7
              I am using coverageBed. I just wanted to quickly get coverage at specific regions.

              I have a valid BED file. Why is BEDTools disagreeing?

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #8
                Have you used this copy of bedtools successfully before?

                Comment

                • id0
                  Senior Member
                  • Sep 2012
                  • 130

                  #9
                  No. Unfortunately I just got BEDTools.

                  It compiled and it seems to be running okay for the most part. I assume if there was a problem with BEDTools, it wouldn't launch in the first place or produce some other lower-level error first.

                  Comment

                  • Heisman
                    Senior Member
                    • Dec 2010
                    • 534

                    #10
                    Create a file with vim and then type the following (with tabs):

                    chr1 500 1000
                    chr1 700 1200

                    and try to use "mergeBed" on it and see if that works.

                    Comment

                    • id0
                      Senior Member
                      • Sep 2012
                      • 130

                      #11
                      Originally posted by Heisman View Post
                      Create a file with vim and then type the following (with tabs):

                      chr1 500 1000
                      chr1 700 1200

                      and try to use "mergeBed" on it and see if that works.
                      mergeBed works on that example. It also works on other BED files.

                      coverageBed does not work on any of the files.

                      This is very confusing.

                      Comment

                      • wadachi
                        Junior Member
                        • Jan 2014
                        • 1

                        #12
                        How about checking "new line characters"?

                        if you make your .bed files on Windows, new line characters should be set \r\n.
                        whereas Unix/Linux uses only \r, so the excess \n may make BEDTools confused.

                        to justify this, choose line end character of Unix/Linux in the selection pulldown in your text editor's "save as ..." dialogue. (in my case, gedit in Ubuntu).

                        hope this works!

                        Comment

                        • inesdesantiago
                          Member
                          • Jan 2009
                          • 44

                          #13
                          You could also use GenomeIntervals2BED.py script available within the SeqGI framework.
                          Have a look: http://seqgi.sourceforge.net/Genomeintervals2bed.html

                          Comment

                          • jshaik
                            Junior Member
                            • Jun 2011
                            • 6

                            #14
                            use dos2unix command in linux to convert your bed file to a file that is acceptable by bedtools. This happens as the windows and linux have different new line characters

                            Comment

                            • Armin_P
                              Junior Member
                              • Sep 2014
                              • 4

                              #15
                              I was facing the same problem. One of my files was a bam file and the other gff3/bed (I do not know if you have a bam file). Anyways, I used 'bedtools coverage' with the -abam option instead of -a and provided my bam file there. -b was then the gff3 or .bed (I tried both) and it worked!

                              Comment

                              Latest Articles

                              Collapse

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, Today, 10:09 AM
                              0 responses
                              9 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, Yesterday, 08:59 AM
                              0 responses
                              14 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 12:03 PM
                              0 responses
                              24 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-02-2026, 11:40 AM
                              0 responses
                              20 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...