Skip to content

Commit

Permalink
Display hifiasm coverage in a user-friendly way
Browse files Browse the repository at this point in the history
hifiasm shows coverage as in rd:i:n tag where coverage is n+1.
  • Loading branch information
milenovic authored and asl committed Jan 22, 2025
1 parent bbb9ecb commit 051621a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion graph/assemblygraphbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ namespace io {
nodeDepth = *kaTag;
} else if (auto rdTag = gfa::getTag<int64_t>("rd", record.tags)) {
graph.m_depthTag = "rd";
nodeDepth = *rdTag;
nodeDepth = *rdTag + 1;
} else if (auto kcTag = gfa::getTag<int64_t>("KC", record.tags)) {
graph.m_depthTag = "KC";
nodeDepth = double(*kcTag) / double(length);
Expand Down
2 changes: 1 addition & 1 deletion graph/gfawriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace gfa {
if (depthTag == "DP" || depthTag == "dp")
gfaSegmentLine += "\tDP:f:" + QString::number(node->getDepth()).toLatin1();
else if (depthTag == "rd")
gfaSegmentLine += "\trd:i:" + QString::number(node->getDepth()).toLatin1();
gfaSegmentLine += "\trd:i:" + QString::number(node->getDepth()-1).toLatin1();
else if (depthTag == "KC" || depthTag == "RC" || depthTag == "FC")
gfaSegmentLine += "\t" + depthTag.toLatin1() + ":i:" +
QString::number(int(node->getDepth() * gfaSequence.length() + 0.5)).toLatin1();
Expand Down

0 comments on commit 051621a

Please sign in to comment.