bcgsc/ntCard

Name: ntCard

Owner: BC Cancer Agency Canada's Michael Smith Genome Sciences Centre

Description: Estimating k-mer coverage histogram of genomics data

Created: 2016-05-30 23:15:42.0

Updated: 2017-12-14 14:40:41.0

Pushed: 2017-11-28 22:16:46.0

Homepage: http://www.bcgsc.ca/platform/bioinfo/software/ntcard

Size: 454

Language: C++

GitHub Committers

UserMost Recent Commit# Commits
Shaun Jackman2018-03-01 23:31:19.01
Hamid Mohamadi2018-01-29 15:54:39.076
Golnaz Jahesh2016-06-16 02:44:13.02

Other Committers

UserEmailMost Recent Commit# Commits

README

ntCard

ntCard is a streaming algorithm for cardinality estimation in genomics datasets. As input it takes file(s) in fasta, fastq, sam, or bam formats and computes the total number of distinct k-mers, F0, and also the k-mer coverage frequency histogram, fi, i>=1.

Install ntCard on Mac OS X

Install Homebrew, and run the command

brew install homebrew/science/ntcard

Compiling ntCard from GitHub

When installing ntCard from GitHub source the following tools are required:

To generate the configure script and make files:

./autogen.sh

Compiling ntCard from source

To compile and install ntCard in /usr/local:

configure
ke 
do make install 

To install ntCard in a specified directory:

configure --prefix=/opt/ntCard
ke 
ke install 

ntCard uses OpenMP for parallelization, which requires a modern compiler such as GCC 4.2 or greater. If you have an older compiler, it is best to upgrade your compiler if possible. If you have multiple versions of GCC installed, you can specify a different compiler:

configure CC=gcc-xx CXX=g++-xx 

For the best performance of ntCard, pass -O3 flag:

configure CFLAGS='-g -O3' CXXFLAGS='-g -O3' 

To run ntCard, its executables should be found in your PATH. If you installed ntCard in /opt/ntCard, add /opt/ntCard/bin to your PATH:

TH=/opt/ntCard/bin:$PATH

Run ntCard

rd [OPTIONS] ... [FILE]

Parameters:

For example to run ntcard on a test file reads.fastq with k=50:

card -k50 reads.fastq 

To run ntcard on a test file reads.fastq with multiple k's k=32,64,96,128 use:

card -k32,64,96,128 reads.fastq 

As another example, to run ntcard on 5 input files file_1.fq.gz, file_2.fa, file_3.sam, file_4.bam, file_5.fq with k=64 and 6 threads and maximum output of frequencies c=100:

card -k64 -c100 -t6 file_1.fq.gz file_2.fa file_3.sam file_4.bam file_5.fq

If we have a list of input files lib.in with input file names in each row and want to run ntCard with k=144 and 12 threads:

card -k144 -t12 @lib.in 

Publications

ntCard

Hamid Mohamadi, Hamza Khan, and Inanc Birol. ntCard: a streaming algorithm for cardinality estimation in genomics data. Bioinformatics (2017) 33 (9): 1324-1330. 10.1093/bioinformatics/btw832


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.