Can Parabricks generate CSI index when running fq2bam?

Hi everyone,

I am using NVIDIA Parabricks to run the fq2bam pipeline. I would like to know whether Parabricks supports generating CSI index (instead of the default BAI index) for the output BAM file.

Environment:

Parabricks version: 4.6.0-1

Command:

pbrun fq2bam \
–ref /workdir/ref/ref.fa \
–in-fq /workdir/R001_1.fq.gz /workdir/R001_2.fq.gz “@RG\tID:R001\tLB:lib1\tPL:illumina\tSM:R001\tPU:R001” \
–out-bam /workdir/R001.bam \
–num-gpus 1 \
–gpusort \
–gpuwrite

Error:

[PB Info 2026-Apr-20 11:44:00] ------------------------------------------------------------------------------
[PB Info 2026-Apr-20 11:44:00] || Parabricks accelerated Genomics Pipeline ||
[PB Info 2026-Apr-20 11:44:00] || Version 4.6.0-1 ||
[PB Info 2026-Apr-20 11:44:00] || Marking Duplicates, BQSR ||
[PB Info 2026-Apr-20 11:44:00] ------------------------------------------------------------------------------
[PB Info 2026-Apr-20 11:44:00] CuBamWriter using CUDA device 0
[PB Info 2026-Apr-20 11:44:01] Using PBCuBamWriter for BAM writing (algo 1)
[PB Info 2026-Apr-20 11:44:01] progressMeter - Percentage
[E::hts_idx_push] Region 536870771..536870921 cannot be stored in a bai index. Try using a csi index with min_shift = 14, n_lvls >= 6
[PB Error 2026-Apr-20 11:44:06][src/PBCuBGZFWriter.cu:226] Issue writing BAM alignment to index structure, exiting.

Background:
My reference genome is very large (> 10Gbp). The resulting BAM file exceed the limit of the standard BAI index (2 GB or 2^31 alignments per reference sequence). Therefore, I need a CSI index, which supports larger genomes and BAM files.

Question:
Does Parabricks fq2bam currently support CSI index generation? If yes, what is the correct parameter? If not, is there any workaround (e.g., generating CSI index manually with samtools index after running fq2bam)?

Thank you for your help!

Hello, unfortunately we currently do not support .csi indexes with fq2bam.

I see that the final BAM had an error because it exceeded the limit of a .bai index. It is an inherent limitation inherited from htslib (see https://github.com/samtools/samtools/issues/1011).

Currently we do not have a way to coordinate sort without writing a .bai index. There are two workarounds you could do.

  • Write to an unsorted .bam file using --align-only with fq2bam. Then sort and index using samtools.
  • You could also write to a .cram file which should not have this limitation on the index.

Thank you for your detailed explanation and attention to this issue. I will try one of these approaches. Thank you again for your help!