## 2 Experimental Section
### Tools  
Several compression packages exist that deal with raw sequence data or directly with SAM/BAM files. From the latter class, we considered CRAMtools 1.0 [12], Quip 1.1.4 [13], NGC [14] and the _ReduceReads_ module of the GATK suite [8]. The first three differ from ReduceReads as the latter does not allow to restore the uncompressed form of the BAM files. The compressed BAM is indeed a valid BAM file, with reduced size, thereby preserving \"essential\" information. CRAM is a framework technology that builds on early proof-of-principle for reference-based compression. The basis of this method is the efficient storage of information that is identical or near-identical to input \"reference\" sequences. The key feature is that new sequences identical to the reference have minimal impact on storage regardless of their length or depth of sequencing coverage. Most reads in a resequencing run match the sequence perfectly or near-perfectly, thereby requiring the efficient storage of mapping properties and deviations from the reference in an efficient manner. Much of the efficiency of this method relies on appropriate use of Golomb codes [15] that are now a standard compression technique for storing integer values. ```
CRAMtools:java-jarcramtools-1.0.jarcram --input-bam-filesample.bam --reference-fasta-filehg19.fa --output-cram-filesample.cram
```  
Quip is a lossless compression algorithm for NGS data in the FASTQ and SAM/BAM formats. It uses an arithmetic coding, a form of entropy coding, which refines the Huffman coding. Arithmetic coding is a particularly elegant means of compression in that it allows a complete separation between statistical modeling and encoding. In Quip, the same arithmetic coder is used to encode quality scores, read identifiers, nucleotide sequences and alignment information, but with very different statistical models for each, which gives it a tremendous advantage over general-purpose compression algorithms that lump everything into a single context. Furthermore, the algorithm is adaptive, as it tunes parameters as data are compressed. ```
Quip:quip--input-bam -output-quip -rhg19.fa sample.bam
```NGC enables lossless and lossy compression strategies. It builds on the same idea of CRAM, thereby traversing the bases in an alignment of reads in a per-column way rather than handling each read individually. This leads, ultimately, to a reduction of coding and, in consequence, to a more efficient data compression. QVs are categorized and compressed in a lossy way, yet preserving 99%-100% of all called variants on average. ```
NGC:java-jarngcc-core-0.0.1-standalone.jarcompress -isample.bam -osample.ngcc-rhg19.fa
```  
ReduceReads is a one-way lossy compressor that aims at keeping only essential information for variant calling. It is tunable in terms of compression levels. The default values have been shown to reduce a typical WES BAM file \(100\times\). The higher the coverage, the bigger the savings in file size and performance of the downstream tools. Generally, it distinguishes between variable and consensus regions around variants and holds the variable windows around the disagreement between the reads with sufficient information for subsequent analysis. A disagreement can be triggered for any generic analysis goal with different thresholds (e.g., heterozygous sites, insertions, deletions). Furthermore, the original surviving reads are downsampled to a \"more than reasonable\" coverage for analysis. ```
ReduceReads:java-jarGenomeAnalysisiSTK.jar-Rhg19.fa -TReduceReads -Isample.bam-osample.reduced.bam
```  
Generally, a compression-decomposition round was carried out for each of the first three tools and for each sample. Quip has proven to be unable to handle five of the ten BAM files, _i.e._, those produced with the SOLiD ECC technique and yielded by Lifescope. To perform comparisons of their performance, we used a computer cluster consisting of two nodes, each equipped with 48 AMD Opteron 6172, 2.1 GHz processors, with a 256 GB shared RAM.