samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
680 stars 240 forks source link

`--output-type u --write-index=tbi` writes csi index #2284

Closed fellen31 closed 1 month ago

fellen31 commented 2 months ago

Hi,

While --output-type v --write-index=tbi gives an error:

[E::bcf_idx_init] Indexing is only supported on BGZF-compressed files

--output-type u/b --write-index=tbi results in a csi index.

A csi index is also created while writing uncompressed BCF output, even though the manual states "Can be used only for compressed BCF and VCF output.".

  1. Could --output-type u/b --write-index=tbi result in an error instead of a csi index, if tbi is not supported?
  2. Could/should I use the csi index that is output together with an uncompressed BCF?

Thanks!

pd3 commented 1 month ago

The BCF format can be indexed only with csi. The tbi format is used to index bgzf-compressed VCFs. Therefore, please try this instead

--output-type z --write-index=tbi