As the doctor gone rogue

February 20, 2014

A note on getting start with samtools on Mac OsX 10.8.5 Mountain Lion

Filed under: NGS — Tags: , , , , — hypotheses @ 9:50 pm

samtools is a handy tool for sequence alignment and mapping (http://samtools.sourceforge.net/

For more information, please refer to the original article here:

  • Li H.*, Handsaker B.*, Wysoker A., Fennell T., Ruan J., Homer N., Marth G., Abecasis G., Durbin R. and 1000 Genome Project Data Processing Subgroup (2009) The Sequence alignment/map (SAM) format and SAMtools. Bioinformatics, 25, 2078-9. [PMID: 19505943]

To get it to work on mac, I’ve decided to compile it.

First, get the sourcecode from http://sourceforge.net/projects/samtools/files/samtools/

Then, decompress the files in ~/bin

Compile it as usual

./configure
make
make install

You might need to have administrative right to write to system folder as well.

Next, we'll need to add a path to ~/.bash_profile

Include this in ~/.bash_profile to point to SAMTOOLS_HOME

export SAMTOOLS_HOME=~/bin/samtools-0.1.19
export PATH=$SAMTOOLS_HOME:$PATH
export PATH=$SAMTOOLS_HOME/bcftools/:$PATH
export PATH=$SAMTOOLS_HOME/misc/:$PATH

Now, samtools should be ready for you to use.

Advertisements

1 Comment »

  1. Thank you very much for the clear desription!

    Comment by DavidR — July 28, 2016 @ 5:13 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: