Skip to content

Commit

Permalink
Add new lifting and bridging vignette
Browse files Browse the repository at this point in the history
- word smithing of lifting documentation
- addition of new vignette with lifting guidance
- closes SomaLogic#77
  • Loading branch information
stufield committed Mar 22, 2024
1 parent aba9d4d commit bdbae99
Show file tree
Hide file tree
Showing 8 changed files with 423 additions and 57 deletions.
2 changes: 1 addition & 1 deletion R/adat-helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' [checkSomaScanVersion()] determines if the version of
#' is a recognized version of SomaScan.\cr
#' \cr
#' Table of SomaScan Assay versions:
#' Table of SomaScan assay versions:
#' \tabular{lll}{
#' **Version** \tab **Commercial Name** \tab **Size** \cr
#' `V4` \tab 5k \tab 5284 \cr
Expand Down
36 changes: 12 additions & 24 deletions R/lift-adat.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' between assay versions; from changing reagents, liquid handling equipment,
#' well volumes, and content expansion.
#'
#' Table of SomaScan Assay versions:
#' Table of SomaScan assay versions:
#'
#' \tabular{lll}{
#' **Version** \tab **Commercial Name** \tab **Size** \cr
Expand Down Expand Up @@ -36,36 +36,24 @@
#' @details
#' Matched samples across assay versions are used to calculate bridging
#' scalars. For each analyte, this scalar is computed as the ratio of
#' population _medians_ (\eqn{n > 1000}) between assay versions. For example,
#' the linear scalar for the \eqn{i^{th}} analyte translating from `11k` -> `7k`
#' is defined as:
#'
#' \deqn{R_i = \frac{\hat\mu_{7k}}{\hat\mu_{11k}}}
#' population _medians_ across assay versions.
#' Please see the lifting vignette
#' `vignette("lifting-and-bridging", package = "SomaDataIO")`
#' for more details.
#'
#' @section Lin's CCC:
#' Calculating analyte-specific bridging scalars involves a careful evaluation
#' of the correlation of post-lifting RFU values in the reference population
#' used to calculate the linear scalars. The Lin's Concordance Correlation
#' Coefficient (CCC) is calculated between matched samples from the original
#' SomaScan signal space and the identical lifted samples that have been
#' scaled back to the original signal space. This CCC value is an estimate
#' of how well an analyte can be bridged across specific SomaScan versions.
#' Factors affecting lifting CCCs are: reagents with high
#' intra-assay CV (Coefficient of Variation) and reagents signaling
#' near background or saturation levels.
#' The Lin's Concordance Correlation Coefficient (CCC) is calculated
#' by computing the correlation between post-lift RFU values and the
#' RFU values generated on the original SomaScan version.
#' This CCC estimate is a measure of how well an analyte can be bridged
#' across SomaScan versions.
#' See `vignette("lifting-and-bridging", package = "SomaDataIO")`.
#' As with the lifting scalars, if you have an annotations file
#' you may view the analyte-specific CCC values via [read_annotations()].
#' Alternatively, [getSomaScanLiftCCC()] retrieves these values
#' from an internal object for both `"serum"` and `"plasma"`.
#' Lin's CCC (\eqn{p_c}) is defined by:
#'
#' \deqn{p_c = \frac{2\rho\hat\sigma_x\hat\sigma_y}{(\hat\mu_x - \hat\mu_y)^2 + \hat\sigma^2_x + \hat\sigma^2_y}}
#'
#' where \eqn{\rho}, \eqn{\mu}, and \eqn{\sigma} are the Pearson correlation
#' coefficient, and estimated median and standard deviation estimates from
#' assay version groups \eqn{x} and \eqn{y} respectively.
#'
#' @section Column Setdiff:
#' @section Analyte Setdiff:
#' * Newer versions of SomaScan typically have additional content, i.e.
#' new reagents added to the multi-plex assay that bind to additional proteins.
#' When lifting _to_ a previous SomaScan version, new reagents that do _not_
Expand Down
16 changes: 11 additions & 5 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ navbar:
href: articles/stat-binary-classification.html
- text: Linear Regression
href: articles/stat-linear-regression.html

FAQs:
text: Coming Soon
menu:
Expand All @@ -88,7 +88,6 @@ navbar:
- text: Standard Process
- text: Best Practices
- text: ----
- text: Lifting SomaScan
- text: Non-Standard Matrices
- text: Limits of Detection (LoD)

Expand All @@ -106,6 +105,11 @@ articles:
contents:
- cli-merge-tool

- title: Lifting and Bridging
navbar: ~
contents:
- articles/lifting-and-bridging

- title: Statistical Workflow Examples
contents:
- starts_with("articles/stat-")
Expand Down Expand Up @@ -140,12 +144,14 @@ reference:

- title: Transform Between SomaScan Versions
desc: >
Functionality required to convert between SomaScan versions,
e.g. v4.1 -> v4.0, sometimes referred to as "lifting".
Functionality required to bridge between SomaScan versions,
e.g. 11k -> 7k, sometimes referred to as "lifting".
contents:
- read_annotations
- lift_adat
- read_annotations
- transform
- starts_with("getSomaScan")
- getSignalSpace

- title: Expression Data
desc: >
Expand Down
2 changes: 1 addition & 1 deletion man/adat-helpers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 12 additions & 24 deletions man/lift_adat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.html
*.png
*.R
2 changes: 0 additions & 2 deletions vignettes/articles/figures/.gitignore

This file was deleted.

Loading

0 comments on commit bdbae99

Please sign in to comment.