9. FAQ

9.1. Installation issues

9.1.1. Why am I getting all of these zlib errors?

On certain operating systems (especially free Linux distributions) the complete zlib libraries are not installed. Bedtools depends upon zlib in order to decompress gzipped files.

- Building main bedtools binary.
obj/gzstream.o: In function gzstreambuf::open(char const*, int):
gzstream.C:(.text+0x2a5): undefined reference to gzopen64'
collect2: ld returned 1 exit status
make: *** [all] Error 1

If you see an error such as the above, it suggests you need to install the zlib and zlib1g-dev libraries. This is typically straightforward using package managers. For example, on Debian/Ubuntu this would be:

apt-get install zlib
apt-get install zlib1g-dev

and on Fedora/Centos this would be:

yum install zlib
yum install zlib1g-dev

9.2. General questions

9.2.1. How do I know what version of bedtools I am using?

Use the –version option.

$ bedtools --version
bedtools v2.17.0

9.2.2. How do I bring up the help/usage menu?

To receive a high level list of available tools in bedtools, use `-h:

$ bedtools -h
bedtools: flexible tools for genome arithmetic and DNA sequence analysis.
usage:    bedtools <subcommand> [options]

The bedtools sub-commands include:

[ Genome arithmetic ]
    intersect     Find overlapping intervals in various ways.
    window        Find overlapping intervals within a window around an interval.
    closest       Find the closest, potentially non-overlapping interval.
    coverage      Compute the coverage over defined intervals.
    map           Apply a function to a column for each overlapping interval.
    genomecov     Compute the coverage over an entire genome.
    merge         Combine overlapping/nearby intervals into a single interval.
    cluster       Cluster (but don't merge) overlapping/nearby intervals.
    complement    Extract intervals _not_ represented by an interval file.
...

To display the help for a specific tool (e.g., bedtools shuffle), use:

$ bedtools merge -h

Tool:    bedtools merge (aka mergeBed)
Version: v2.17.0
Summary: Merges overlapping BED/GFF/VCF entries into a single interval.

Usage:   bedtools merge [OPTIONS] -i <bed/gff/vcf>

Options:
    -s      Force strandedness.  That is, only merge features
            that are the same strand.
            - By default, merging is done without respect to strand.

    -n      Report the number of BED entries that were merged.
            - Note: "1" is reported if no merging occurred.

9.3. Issues with output

9.3.1. I know there are overlaps, but none are reported. What might be wrong?

There are two common causes of this problem. The first cause is non-obvious differences in the way chromosomes are named in files being compared. For example, “1” is not the same as “chr1” just as ” chr1” is not the same as “chr1”. Secondly, users often copy files from a Windows machine to a UNIX machine. This causes issues because Windows uses two bytes to represent the end of a line (\r\n) whereas the UNIX convention uses a single byte (\n). If your files don’t conform to the UNIX convention, you will have problems. One can convert files from Windows to UNIX with the following command:

perl -i -p -e 's/\r\n/\n/g;' file.windows > file.unix

9.4. Installation issues

comments powered by Disqus

Edit and improve this document!

This file can be edited directly through the Web. Anyone can update and fix errors in this document with few clicks -- no downloads needed.

  1. Go to 9. FAQ on GitHub.
  2. Edit files using GitHub's text editor in your web browser (see the 'Edit' tab on the top right of the file)
  3. Fill in the Commit message text box at the bottom of the page describing why you made the changes. Press the Propose file change button next to it when done.
  4. Then click Send a pull request.
  5. Your changes are now queued for review under the project's Pull requests tab on GitHub!

For an introduction to the documentation format please see the reST primer.