# Correction to: IonCRAM: a reference-based compression tool for ion torrent sequence files

The Original Article was published on 09 September 2020

## Correction to: BMC Bioinformatics (2020) 21:397 https://doi.org/10.1186/s12859-020-03726-9

Following publication of the original article [1], the authors identified a missing section in the published article. The missing section is given below.

Algorithm IonCRAM-CompressBAM

1. 1

Sort the BAM file (if not sorted) by genomic coordinates. Then sort the reads starting at the same locus lexicographically via sorting their CIGAR string.

2. 2

Separate the signals of the forward reads from those of the reverse ones and process each group independently (in parallel) using Steps 3 and 4.

3. 3

Remove the flow signals from the BAM file and store them separately. Compress the remaining fields of the BAM file (sequence, quality, and other fields) using a reference based method (We use the program Scramble [20] for this step.)

4. 4

Define blocks of flow signals, such that the reads in each block are mapped to the same locus. Each block B can be processed in parallel using the steps 4.1 to 4.3:

1. 4.1

Let Fr denote the rth flow-signal vector in B (r âˆˆ [1..m]), and let Fr[i] âˆˆ $$\mathbb{Z}$$ denote the ith component of it, 1â€‰â‰¤â€‰iâ€‰â‰¤â€‰n. Take F1 as a reference vector and compute the difference vector Dj, where Dj[i]â€‰=â€‰Fj[i] â€“ Fj+1 [i], 1â€‰â‰¤â€‰iâ€‰â‰¤â€‰n, 1â€‰â‰¤â€‰jâ€‰<â€‰m.

2. 5.1

For each Dj, allocate a vector Vj1 of n bytes to store its values. If Dj[x]â€‰>â€‰255 for any x, then we write 255 in Vj1[x] and write the values (Dj[x]-255) in a separate list Vj2. (The length of Vj2 list equals the number of values larger than 255 in Dj and they are very rare in practice.)

3. 6.1

Concatenate F1 and the V vectors and compress them. (We use the XZ algorithm as default method for that purpose.) (F1 is a reference flow signal vector that will be used in decompression).

5. 5

Wait until all (parallel) processes finish. Use the Linux tar package to create a compressed folder including the compressed B blocks files and the other compressed CRAM files computed in Step 1.

The author group has been updated above and the original article [1] has been corrected.

## Reference

1. Shokrof M, Abouelhoda M. IonCRAM: a reference-based compression tool for ion torrent sequence files. BMC Bioinformatics. 2020;21:397. https://doi.org/10.1186/s12859-020-03726-9.

## Author information

Authors

### Corresponding author

Correspondence to Mohamed Abouelhoda.

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and permissions