diff --git a/src/core/tools/vcf_record_factory.cpp b/src/core/tools/vcf_record_factory.cpp index af31260f3..bb91ccb56 100644 --- a/src/core/tools/vcf_record_factory.cpp +++ b/src/core/tools/vcf_record_factory.cpp @@ -325,7 +325,8 @@ std::vector VcfRecordFactory::make(std::vector&& calls) Genotype new_genotype {ploidy}; for (unsigned i {0}; i < ploidy; ++i) { if (prev_genotype[i].sequence() == deleted_sequence || - (prev_genotype[i].sequence() == old_genotype[i].sequence() + (old_genotype[i] != prev_genotype[i] + && prev_genotype[i].sequence() == old_genotype[i].sequence() && sequence_size(old_genotype[i]) < region_size(old_genotype))) { Allele new_allele {mapped_region(curr_call), deleted_sequence}; new_genotype.emplace(move(new_allele));