Skip to content

Commit

Permalink
fix(parsers): cast m_count to double to get unrounded beta
Browse files Browse the repository at this point in the history
  • Loading branch information
jamespeapen committed Oct 15, 2024
1 parent 511b575 commit 5f76c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5f76c3d

Please sign in to comment.