count DNA sequence reads in BAM files
Python C++ CMake XSLT Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build-common @ d10a309
debian
src/exe/bam-readcount
.gitignore
.gitmodules
CMakeLists.txt
PackageInfo.cmake
README.textile

README.textile

bam-readcount

The purpose of this program is to generate metrics at single nucleotide positions.
Help is currently available on the commandline if you do not supply the program
any arguments.

Build Dependencies

  • git
  • cmake 2.8+ (cmake.org)
  • samtools (sourceforge download page)
    • We have tested as new as version 0.1.17 with no trouble. Older versions may not have been tested, but we anticipate they should work.

Build Instructions

Build Samtools

  • Download and extract samtools to a directory of your choosing.
  • Enter that directory and run make
  • Set an environment variable called SAMTOOLS_ROOT to point to this directory.
    • For example (if you are using bash), you can use export SAMTOOLS_ROOT=`pwd` if you are still in the samtools directory or simply export SAMTOOLS_ROOT=/path/to/samtools otherwise.

Clone the bam-readcount repository

  • Recursively clone the git repository
        git clone --recursive git://github.com/genome/bam-readcount.git

Compile bam-readcount

  • bam-readcount does not support in source builds. Create a new build directory, enter it, and run:
        cmake /path/to/bam-readcount/repo
        make

The binary can then be found in the bin/ subdirectory of your build directory.

FAQ

I get errors from cmake about missing modules. How do I fix this?

bam-readcount contains a git submodule called build-common. It contains helper modules for cmake. If you downloaded the source as a tarball from github or forgot to do a recursive clone using git, then you will not have this submodule and will see cmake errors. If you are using git, we recommend you go back and use the —recursive option when cloning the SomaticSniper repository. If you cannot use git, follow the instructions below to remedy the situation.

  1. Download the build-common module separately here
  2. Extract that tarball, and rename the directory it creates to ‘build-common’.
  3. Replace the empty build-common subdirectory in the sniper directory with directory you just created.
  4. Resume following the build instructions.

I get a segfault when attempting to run on a whole bam file.

This is a known bug that will be addressed in future versions. In most cases, you will only need read counts on a subset of positions and specifying the sites of interest is functional. Should you need to run the entire genome through then running by chromosome and concatenating the results should be a decent workaround (e.g. like bam-readcount -f ref.fasta some.bam chr1).

User Support

Please mail genome-dev@genome.wustl.edu with problems or questions.