Skip to content

Commit

Permalink
Don't replace allele with deleted allele if it matches previous allele
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Cooke committed May 2, 2017
1 parent 12495e6 commit 80db2c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/tools/vcf_record_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ std::vector<VcfRecord> VcfRecordFactory::make(std::vector<CallWrapper>&& calls)
Genotype<Allele> 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));
Expand Down

0 comments on commit 80db2c6

Please sign in to comment.