Skip to content

Commit

Permalink
fixed bug that counted missing data symbol when counting total number…
Browse files Browse the repository at this point in the history
… of alleles at each locus.
  • Loading branch information
Bruce Rannala committed Apr 5, 2024
1 parent 245f8c2 commit a320c4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,10 @@ void checkDataSize(void)
{
std::string regex_str = "\\s+";
std::vector<std::string> list1 = split(aline, regex_str);
alleleLabels[list1[2]].insert(list1[3]);
/* bug fix Apr 4 2024 don't count missing data symbol "0" as an allele */
if(list1[3]!="0")
alleleLabels[list1[2]].insert(list1[3]);
if(list1[4]!="0")
alleleLabels[list1[2]].insert(list1[4]);
}
for (auto all = alleleLabels.begin(); all != alleleLabels.end(); all++) {
Expand Down

0 comments on commit a320c4c

Please sign in to comment.