How to realign a CRAM file to a new reference with DRAGEN

CRAM is a reference-based compression format that offers better compression than BAM and SAM. The reference used for compression is crucial to decompress the CRAM file.

In software versions prior to DRAGEN v4.0.3, in order to re-align a CRAM file to a different reference, a two-step process must be followed.

  1. CRAM to BAM: use the original reference to convert the CRAM file to BAM file; Relevant flags:

  • '--cram-input --enable-map-align true --enable-map-align-output true --output-format BAM --enable-bam-indexing true --ref-dir <Path to original reference's hash table>....'

  1. BAM to CRAM with new reference: relevant flags:

  • '-b --enable-map-align true --enable-map-align-output true --output-format CRAM --ref-dir <Path to new reference's hash table>....'

With DRAGEN v4.0.3, a single step is used by including the flag:

  • --cram-reference flag -

  • Relevant flags:

    • -r <Path to new reference's hash table> --cram-input --output-directory <out_dir> --output-file-prefix <out_prefix> --cram-reference <Path to original reference's hash table or original reference FASTA file (and FAI file)>

See the DRAGEN v4.0.3 user guide for more information.

Last updated

© 2023 Illumina, Inc. All rights reserved. All trademarks are the property of Illumina, Inc. or their respective owners. Trademark information: illumina.com/company/legal.html. Privacy policy: illumina.com/company/legal/privacy.html