Skip to content

Commit

Permalink
Merge pull request #225 from smithlabcode/unxcounts-for-sym
Browse files Browse the repository at this point in the history
unxcounts for sym
  • Loading branch information
andrewdavidsmith authored Jun 7, 2024
2 parents 72e0376 + 4dd5702 commit 9ff872c
Show file tree
Hide file tree
Showing 2 changed files with 337 additions and 172 deletions.
33 changes: 16 additions & 17 deletions src/common/MSite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,27 @@
#include <unordered_map>

struct MSite {

MSite() {}
MSite(const std::string &_chrom,
const size_t _pos,
const char _strand,
const std::string &_context,
const double _meth,
const size_t _n_reads) :
chrom(_chrom), pos(_pos), strand(_strand),
context(_context), meth(_meth), n_reads(_n_reads) {}
std::string chrom{};
size_t pos{};
char strand{};
std::string context{};
double meth{};
size_t n_reads{};

MSite() = default;
MSite(const std::string &chrom,
const size_t pos,
const char strand,
const std::string &context,
const double meth,
const size_t n_reads) :
chrom{chrom}, pos{pos}, strand{strand},
context{context}, meth{meth}, n_reads{n_reads} {}
explicit MSite(const std::string &line);
explicit MSite(const char *line, const int n);

bool initialize(const char *c, const char *c_end);

std::string chrom;
size_t pos;
char strand;
std::string context;
double meth;
size_t n_reads;

bool operator<(const MSite &other) const {
int r = chrom.compare(other.chrom);
return (r < 0 ||
Expand Down
Loading

0 comments on commit 9ff872c

Please sign in to comment.