imgag / ngs-bits

Short-read sequencing tools
MIT License
136 stars 30 forks source link

MappingQC error related to FASTA index #527

Closed sjaenick closed 3 months ago

sjaenick commented 3 months ago

Hi there,

MappingQC 2024_02 compiled from source on Ubuntu 22.04.4 LTS, we're seeing the following error:

jaes@localvm:~/mqc$ ../ngs-bits/bin/MappingQC -in file_sorted.bam -wgs -out out.xml -ref hg19.fa
MappingQC 2024_02
Programming exception: FastaFileIndex::seq: Invalid start position chr17:81523376 after chromosome end (81195210)
Location             : ../../src/cppNGS/FastaFileIndex.cpp:122
This should not happen, please report the error to the developers!
jaes@localvm:~/mqc$ 

The reference used here is https://hgdownload2.soe.ucsc.edu/goldenPath/hg19/bigZips/hg19.fa.gz, extracted with gunzip and index generated with samtools faidx. Unfortunately, I can't share the .bam file, but alignments were generated with bwa bwasw.

marc-sturm commented 3 months ago

You forgot to set the reference genome build of the QC regions. By default the hg38 QC regions are used. Please try with -build hg19 in addition to the -ref arument.