From 46dd0c8c4b2f05d37d201904bdaa24e0aa32a5ed Mon Sep 17 00:00:00 2001 From: mgymrek Date: Tue, 29 Jul 2014 13:41:09 -0400 Subject: [PATCH] fixing more problems with allele lengths < 1bp in the VCF --- src/Genotyper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Genotyper.cpp b/src/Genotyper.cpp index d696a66..7937ca0 100644 --- a/src/Genotyper.cpp +++ b/src/Genotyper.cpp @@ -119,8 +119,9 @@ void Genotyper::GetAlleles(const list& aligned_reads, for (list::const_iterator it = aligned_reads.begin(); it != aligned_reads.end(); it++) { if (it->mate) continue; + int refcopy = it->msEnd - it->msStart + 1; if (it->diffFromRef != 0 && std::find(alleles->begin(), alleles->end(), it->diffFromRef) == alleles->end() && - it->diffFromRef+it->refCopyNum*it->period > 0) { + it->diffFromRef+refcopy >= 1) { alleles->push_back(it->diffFromRef); } }