From 5f76c3dcfae2b7efafada18f7a8374ea153ebf22 Mon Sep 17 00:00:00 2001 From: James Eapen Date: Tue, 15 Oct 2024 14:25:44 -0400 Subject: [PATCH] fix(parsers): cast m_count to double to get unrounded beta --- src/parsers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parsers.cpp b/src/parsers.cpp index 6f3ace3..b26a6ae 100644 --- a/src/parsers.cpp +++ b/src/parsers.cpp @@ -56,7 +56,7 @@ BedLine parseCovRecord(const std::string& bedString) { int m_count = std::stoi(fields[4]); int u_count = std::stoi(fields[5]); int cov = m_count + u_count; - float beta = m_count / (m_count + u_count); + float beta = (double) m_count / cov; BedLine read = {chrom, start, end, beta, cov, m_count}; return read;