Ryan's Blog

Getting samtools/bcftools to work with S3

Posted in Uncategorized by ryanlayer on April 27, 2016

Get htslib and configure it to enable libcurl

git clone https://github.com/samtools/htslib.git
cd htslib
autoconf
./configure --enable-libcurl
make
cd ..

Get samtools, and modify the Makefile to use the relevant libraries

git clone https://github.com/samtools/samtools.git
cd samtools
vi Makefile

Change LIBS = to LIBS = -lcurl -lcrypto -lssl

Then compile.
make
cd ..

Get bcftools, and make the same changes to the Makefile
git clone https://github.com/samtools/bcftools.git
cd bcftools
vi Makefile
make

Now test it out.

samtools view s3://1000genomes/data/NA21124/alignment/NA21124.alt_bwamem_GRCh38DH.20150718.GIH.low_coverage.cram

Advertisements

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

%d bloggers like this: