Skip to content

Commit 2f06f02

Browse files
committed
Merge branch 'ar/gh451' into 'master'
refactor(dmr, regions): makes effect sizes exp - control. See merge request machine-learning/modkit!291
2 parents c6b6f4c + 4f2f784 commit 2f06f02

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

modkit-core/src/dmr/llr_model.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ impl ModificationCounts {
191191
interval: DmrInterval,
192192
) -> MkResult<Self> {
193193
let score = llk_ratio(&control_counts, &exp_counts)?;
194-
let coh_res = cohen_h(&control_counts, &exp_counts);
194+
let coh_res = cohen_h(&exp_counts, &control_counts);
195195
Ok(Self {
196196
control_counts,
197197
exp_counts,
@@ -249,7 +249,7 @@ impl ModificationCounts {
249249
}
250250

251251
fn effect_size(&self) -> f32 {
252-
self.control_counts.frac_modified() - self.exp_counts.frac_modified()
252+
self.exp_counts.frac_modified() - self.control_counts.frac_modified()
253253
}
254254
}
255255

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#chrom start end name score strand a_counts a_total b_counts b_total a_mod_percentages b_mod_percentages a_pct_modified b_pct_modified effect_size cohen_h cohen_h_low cohen_h_high
2-
chr20 9838623 9839213 CpG: 47 257.34514203447543 . C:57 1777 C:601 2091 C:3.21 C:28.74 0.032076534 0.2874223 -0.25534576 -0.7715211567869047 0.708284253638713 0.8347580599350964
3-
chr20 10034962 10035266 CpG: 35 1.294227443419004 . C:7 1513 C:14 1349 C:0.46 C:1.04 0.00462657 0.010378058 -0.0057514883 -0.0679566754086949 -0.00543680228264623 0.14135015310003604
4-
chr20 10172120 10172545 CpG: 35 5.013026381110649 . C:43 1228 C:70 1088 C:3.50 C:6.43 0.035016287 0.06433824 -0.02932195 -0.13643116482308143 0.054828613466501475 0.21803371617966139
5-
chr20 10217487 10218336 CpG: 59 173.7819873154349 . C:136 2337 C:482 1838 C:5.82 C:26.22 0.058194265 0.26224157 -0.2040473 -0.5879686471848853 0.5268640027632352 0.6490732916065354
6-
chr20 10433628 10434345 CpG: 71 -0.13968153023233754 . C:31 2748 C:36 3733 C:1.13 C:0.96 0.0112809315 0.009643719 0.0016372129 0.016102959313509635 -0.033161275613487945 0.06536719424050721
7-
chr20 10671925 10674963 CpG: 255 6.355823977093678 . C:67 9459 C:153 12862 C:0.71 C:1.19 0.0070832013 0.011895506 -0.0048123044 -0.05004497666410637 0.023497206482167955 0.07659274684604479
2+
chr20 9838623 9839213 CpG: 47 257.34514203447543 . C:57 1777 C:601 2091 C:3.21 C:28.74 0.032076534 0.2874223 0.25534576 0.7715211567869047 0.708284253638713 0.8347580599350964
3+
chr20 10034962 10035266 CpG: 35 1.294227443419004 . C:7 1513 C:14 1349 C:0.46 C:1.04 0.00462657 0.010378058 0.0057514883 0.0679566754086949 -0.00543680228264623 0.14135015310003604
4+
chr20 10172120 10172545 CpG: 35 5.013026381110649 . C:43 1228 C:70 1088 C:3.50 C:6.43 0.035016287 0.06433824 0.02932195 0.13643116482308143 0.054828613466501475 0.21803371617966139
5+
chr20 10217487 10218336 CpG: 59 173.7819873154349 . C:136 2337 C:482 1838 C:5.82 C:26.22 0.058194265 0.26224157 0.2040473 0.5879686471848853 0.5268640027632352 0.6490732916065354
6+
chr20 10433628 10434345 CpG: 71 -0.13968153023233754 . C:31 2748 C:36 3733 C:1.13 C:0.96 0.0112809315 0.009643719 -0.0016372129 -0.016102959313509635 -0.033161275613487945 0.06536719424050721
7+
chr20 10671925 10674963 CpG: 255 6.355823977093678 . C:67 9459 C:153 12862 C:0.71 C:1.19 0.0070832013 0.011895506 0.0048123044 0.05004497666410637 0.023497206482167955 0.07659274684604479

0 commit comments

Comments
 (0)