Skip to content

Commit

Permalink
fix: use R-squared instead of Pearson correlation coefficient
Browse files Browse the repository at this point in the history
Fixes #48
  • Loading branch information
mcanouil committed Dec 26, 2023
1 parent c363232 commit fb18bed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: NACHO
Title: NanoString Quality Control Dashboard
Version: 2.0.5
Version: 2.0.6
Authors@R:
c(person(given = "Mickaël",
family = "Canouil",
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# NACHO 2.0.6

## Fixes

- In `R/qc_positive_control.R`,
- fix: use R-squared instead of Pearson correlation coefficient. ([#48](https://github.com/mcanouil/NACHO/issues/48))

# NACHO 2.0.5

## Fixes
Expand Down
2 changes: 1 addition & 1 deletion R/qc_positive_control.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
qc_positive_control <- function(counts) {
measured <- log2(counts[["Count"]])
known <- log2(as.numeric(sub("^[^(]*\\((.*)\\)$", "\\1", counts[["Name"]]))) # plexset value: "32"
correlation <- stats::cor.test(known, measured)$estimate
correlation <- summary(stats::lm(measured ~ known))$r.squared
unname(round(correlation, 5))
}

0 comments on commit fb18bed

Please sign in to comment.