Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #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


    • #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


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

        Comment


        • #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


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

            Comment


            • #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


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

                Comment


                • #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


                  • #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


                    • #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


                      • #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


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

                          Comment


                          • #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


                            • #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

                              • seqadmin
                                Strategies for Sequencing Challenging Samples
                                by seqadmin


                                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                                03-22-2024, 06:39 AM
                              • seqadmin
                                Techniques and Challenges in Conservation Genomics
                                by seqadmin



                                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                                Avian Conservation
                                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                                03-08-2024, 10:41 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, Yesterday, 06:37 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, Yesterday, 06:07 PM
                              0 responses
                              8 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 03-22-2024, 10:03 AM
                              0 responses
                              49 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 03-21-2024, 07:32 AM
                              0 responses
                              67 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X