From e22428e8168e3cb20d00d2aae2089747e8d3d2f0 Mon Sep 17 00:00:00 2001 From: Yaossg Date: Sun, 19 Jan 2025 18:11:37 +0800 Subject: [PATCH] fix chromosome compare --- hisat_3n_table.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hisat_3n_table.cpp b/hisat_3n_table.cpp index f639677..a537228 100644 --- a/hisat_3n_table.cpp +++ b/hisat_3n_table.cpp @@ -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));