HipSTR icon indicating copy to clipboard operation
HipSTR copied to clipboard

CRAM 3.1 support

Open dpmccabe opened this issue 2 months ago • 0 comments

We've been using CRAM 3.1 files (the default format generated by Samtools/htslib starting with v1.22), but unfortunately HipSTR can't read them. For instance, take the conversion of NA12878_20k_b37:

samtools view wgs_bam_NA12878_20k_hg38_NA12878.bam -C -T Homo_sapiens_assembly38.fasta -o wgs_bam_NA12878_20k_hg38_NA12878.cram

Running HipSTR on the BAM works fine, but it fails with the CRAM.

HipSTR --bams wgs_bam_NA12878_20k_hg38_NA12878.cram --fasta Homo_sapiens_assembly38.fasta --regions str_hg38.bed --str-vcf bam.vcf.gz --min-reads 20 --def-stutter-model --max-str-len 150
Detected 1 BAM/CRAM files
BAMs/CRAMs contain unique read group IDs for 1 unique libraries and 1 unique samples
Reading region file str_hg38.bed
Region file contains 14 regions

Processing region chr11 2171087 2171115
[E::cram_next_slice] Failure to decode slice
ERROR: Invalid record encountered in wgs_bam_NA12878_20k_hg38_NA12878.cram. Please ensure the BAM/CRAM is not truncated and is properly formatted
Exiting...

What would be involved in making HipSTR understand CRAM 3.1 files?

dpmccabe avatar Oct 21 '25 19:10 dpmccabe