OCOCO: the first online consensus caller. Call genomic consensus directly from an unsorted SAM/BAM stream.
Clone or download


OCOCO - Online Consensus Caller

Build Status Arxiv install with bioconda DOI

Welcome to OCOCO, an online consensus caller.


  • GCC 4.8+ or equivalent
  • ZLib

Getting started

git clone --recursive https://github.com/karel-brinda/ococo
cd ococo && make -j
./ococo -i test.bam -f test.fa -m real-time --vcf-cons -

Installation: make install

Alternative ways of installation

Using Conda

conda install ococo

Using Brew

brew install ococo

Command line parameters

Input options:
  -i, --input FILE      input SAM/BAM file (- for standard input)
  -f, --fasta-ref FILE  initial FASTA reference (otherwise seq of N's is used)
  -s, --stats-in FILE   input statistics

Output options:
  -F, --fasta-cons FILE FASTA file with consensus
  -S, --stats-out FILE  output statistics
  -V, --vcf-cons FILE   VCF file with updates of consensus (- for standard output)
  -P, --pileup FILE     truncated pileup (- for standard output)
  --verbose             verbose mode (report every update of a counter)

Parameters for consensus calling:
  -x, --counters STR    counter configuration: [ococo16]
                           - ococo16 (3b/counter, 16b/position)
                           - ococo32 (7b/counter, 32b/position)
                           - ococo64 (15b/counter, 64b/position)
  -m, --mode STR        mode: [batch]
                           - real-time (updates reported immediately)
                           - batch (updates reported after end of algn stream)
  -t, --strategy STR    strategy for updates: [majority]
                           - majority (update to majority base)
                           - stochastic (update to stochastically drawn base)
                           - no-updates (no updates, only counters updated)
  -q, --min-MQ INT      skip alignments with mapping quality smaller than INT [1]
  -Q, --min-BQ INT      skip bases with base quality smaller than INT [13]
  -w, --ref-weight INT  initial counter value for nucleotides from ref [0]
  -c, --min-cov INT     minimum coverage required for update [2]
  -M, --maj-thres FLOAT majority threshold [0.51]

   ococo -i test.bam -f test.fa -m real-time -V -
   ococo -x ococo64 -i test.bam -f test.fa -P - -V variants.vcf

   For more details, see the manual page 'man ./ococo.1'.


Please use Github issues.


See Releases.




Karel Brinda <kbrinda@hsph.harvard.edu>

Citing OCOCO