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
                                Recent Advances in Sequencing Analysis Tools
                                by seqadmin


                                The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
                                Yesterday, 07:48 AM
                              • seqadmin
                                Essential Discoveries and Tools in Epitranscriptomics
                                by seqadmin




                                The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                                04-22-2024, 07:01 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, Today, 06:57 AM
                              0 responses
                              9 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, Yesterday, 07:17 AM
                              0 responses
                              14 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 05-02-2024, 08:06 AM
                              0 responses
                              19 views
                              0 likes
                              Last Post seqadmin  
                              Started by seqadmin, 04-30-2024, 12:17 PM
                              0 responses
                              24 views
                              0 likes
                              Last Post seqadmin  
                              Working...
                              X