fix chromosome compare

This commit is contained in:
Yaossg 2025-01-19 18:11:37 +08:00
parent a3817bf0b7
commit e22428e816

View File

@ -287,7 +287,8 @@ int hisat_3n_table()
}
// if the samChromosome is different than current positions' chromosome, finish all SAM line.
// then load a new reference chromosome.
if (samChromosome != *positions->chromosome) {
auto old = positions->chromosome;
if (samChromosome != (old ? *old : "")) {
positions->appendingFinished();
positions->moveAllToOutput();
positions->loadNewChromosome(std::move(samChromosome));