ntcard

Estimating k-mer coverage histogram of genomics data

https://github.com/bcgsc/ntcard

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary

Keywords

cardinality-estimation hyperloglog k-mer-counting k-mer-frequency streaming-algorithms
Last synced: 6 months ago · JSON representation ·

Repository

Estimating k-mer coverage histogram of genomics data

Basic Info
Statistics
  • Stars: 77
  • Watchers: 18
  • Forks: 9
  • Open Issues: 8
  • Releases: 6
Topics
cardinality-estimation hyperloglog k-mer-counting k-mer-frequency streaming-algorithms
Created over 9 years ago · Last pushed about 2 years ago
Metadata Files
Readme Changelog License Citation

README.md

Release Downloads Conda Issues

Logo

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 macOS

Install Homebrew, and run the command

brew install brewsci/bio/ntcard

Install ntCard on Linux

Install Linuxbrew, and run the command

brew install brewsci/bio/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 $ make $ sudo make install

To install ntCard in a specified directory:

$ ./configure --prefix=/opt/ntCard $ make $ make 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:

$ PATH=/opt/ntCard/bin:$PATH

Run ntCard

ntcard [OPTIONS] ... FILE(S) ... Parameters: * -t, --threads=N: use N parallel threads 1 * -k, --kmer=N: the length of k-mer * -c, --cov=N: the maximum coverage of k-mer in output [1000] * -p, --pref=STRING: the prefix for output file names * -o, --output=STRING: the name for single output file name (can be used only for single compact output file) * FILE(S): input file or set of files seperated by space, in fasta, fastq, sam, and bam formats. The files can also be in compressed (.gz, .bz2, .xz) formats . A list of files containing file names in each row can be passed with @ prefix.

For example to run ntcard on a test file reads.fastq with k=50 and output the histogram in a file with prefix freq: $ ntcard -k50 -p freq reads.fastq To run ntcard on a test file reads.fastq with multiple k's k=32,64,96,128 and output the histograms in files with prefix freq use: $ ntcard -k32,64,96,128 -p freq reads.fastq As another example, to run ntcard on 5 input files file1.fq.gz, file2.fa, file3.sam, file4.bam, file5.fq with k=64 and 6 threads and maximum frequency of c=100 on output file with prefix freq: ``` $ ntcard -k64 -c100 -t6 -p freq file1.fq.gz file2.fa file3.sam file4.bam file5.fq ```

If we have a list of input files lib.in, to run ntCard with k=144 and 12 threads and output file with prefix freq: $ ntcard -k144 -t12 -p freq @lib.in

Output: * The numbers Fk provide useful statistics on the input sequences. By default, F0 and F1 are output to stdout along with runtime. * F0 denotes the number of distinct k-mers appearing in the stream sequences * F1 is the total number of k-mers in the input datasets * F2 is the Gini index of variation that can be used to show the diversity of k-mers and * F∞ results in the most frequent k-mer in the input reads. * A tab separated output file with columns k, f, and n. * k k-mer size * f the frequency of a k-mer * n the number of k-mers with frequency f

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

Owner

  • Name: BC Cancer Canada's Michael Smith Genome Sciences Centre
  • Login: bcgsc
  • Kind: organization
  • Email: rwarren@bcgsc.ca
  • Location: Vancouver, BC, Canada

Sequencing centre for genomics and bioinformatics research. NOTE 01/2019: FTP now closed. Cited data available: http://www.bcgsc.ca/downloads/supplementary

Citation (CITATION.bib)

@article{doi:10.1093/bioinformatics/btw832,
author = {Mohamadi, Hamid and Khan, Hamza and Birol, Inanc},
title = {ntCard: a streaming algorithm for cardinality estimation in genomics data},
journal = {Bioinformatics},
volume = {33},
number = {9},
pages = {1324},
year = {2017},
doi = {10.1093/bioinformatics/btw832},
URL = { + http://dx.doi.org/10.1093/bioinformatics/btw832},
eprint = {/oup/backfile/content_public/journal/bioinformatics/33/9/10.1093_bioinformatics_btw832/2/btw832.pdf}
}

GitHub Events

Total
  • Issues event: 2
  • Watch event: 2
  • Issue comment event: 1
  • Member event: 2
Last Year
  • Issues event: 2
  • Watch event: 2
  • Issue comment event: 1
  • Member event: 2

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 42
  • Total pull requests: 19
  • Average time to close issues: 24 days
  • Average time to close pull requests: 12 days
  • Total issue authors: 24
  • Total pull request authors: 5
  • Average comments per issue: 3.38
  • Average comments per pull request: 0.26
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tseemann (12)
  • kmnip (4)
  • sjackman (3)
  • sapoudel (2)
  • lczech (2)
  • Souvadra (1)
  • rsharris (1)
  • warrenlr (1)
  • TEcandidates (1)
  • tillea (1)
  • mmokrejs (1)
  • emreerhan (1)
  • rozovr (1)
  • Niohuruzh (1)
  • mahesh-panchal (1)
Pull Request Authors
  • jwcodee (14)
  • emollier (2)
  • taylorreiter (1)
  • lcoombe (1)
  • sjackman (1)
Top Labels
Issue Labels
bug (6) enhancement (5) help wanted (5) question (3)
Pull Request Labels
enhancement (3)