Skip to content

Commit

Permalink
Krona taxonomy report was not working if no sequence was unclassified
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Feb 2, 2021
1 parent 9f0fb3e commit b31ebb6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/taxonomy/taxonomyreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ std::string escapeAttribute(const std::string &data) {
void kronaReport(FILE *FP, const NcbiTaxonomy &taxDB, const std::unordered_map<TaxID, TaxonCounts> &cladeCounts, unsigned long totalReads, TaxID taxID = 0, int depth = 0) {
std::unordered_map<TaxID, TaxonCounts>::const_iterator it = cladeCounts.find(taxID);
unsigned int cladeCount = it == cladeCounts.end() ? 0 : it->second.cladeCount;
// unsigned int taxCount = it == cladeCounts.end()? 0 : it->second.taxCount;
if (cladeCount == 0) {
return;
}
if (taxID == 0) {
if (cladeCount > 0) {
fprintf(FP, "<node name=\"unclassified\"><magnitude><val>%d</val></magnitude></node>", cladeCount);
Expand Down

0 comments on commit b31ebb6

Please sign in to comment.