Skip to content

Commit 0bcda3a

Browse files
authored
Release candidate 6.3.0 (SomaLogic#147)
- simplified examples of calcOutlierMap() and s3 methods to reduce execution times - fixed spelling errors and updated WORDLIST - updated NEWS.md and cran-comments.md - addresses items in SomaLogic#146
1 parent 5f7842d commit 0bcda3a

File tree

10 files changed

+121
-65
lines changed

10 files changed

+121
-65
lines changed

NEWS.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,61 @@
11
# SomaDataIO (development version)
22

3+
### New Functions
4+
5+
* Added `preProcessAdat()` function
6+
- added new function `preProcessAdat()` to filter features,
7+
filter samples, generate data QC plots of normalization
8+
scale factors by covariates, and perform standard analyte
9+
RFU transformations including log10, centering, and scaling
10+
11+
* Added `calcOutlierMap()` function
12+
- added `calcOutlierMap()` and its print and plot
13+
S3 methods, along with `getOutlierIds()` for
14+
identifying sample level outliers from outlier map object
15+
- added `ggplot2` as a package dependency
16+
17+
### Function and Object Improvements
18+
19+
* Added `ex_clin_data` object
20+
- a `tibble` object with additional sample annotation fields
21+
`smoking_status` and `alcohol_use` to demonstrate merging to a
22+
`soma_adat` object
23+
24+
### Documentation Updates
25+
26+
* Added pre-processing vignette article
27+
- includes guidance on pre-processing SomaScan data for
28+
a typical analysis
29+
- provides an example of recommended workflow of
30+
filtering features, filtering samples, performing data
31+
QC checks, and transformations of RFU features
32+
- introduces usage of the `preProcessAdat()` function
33+
34+
* Improved adat ingest documentation in `README`
35+
- added comments to clarify file path input to `read_adat()`
36+
example in `README`
37+
38+
* Updated stat workflow articles to begin with reading in adat
39+
- updated data preparation chunks with comments about
40+
how to download and read in the the `example_data.adat` object
41+
- data preparation chunks now use the `preProcessAdat()`
42+
function for pre-processing
43+
44+
* Added sample annotation merging guidance
45+
- updated `README` and loading and wrangling vignette
46+
article with section including code to join the
47+
`ex_clin_data` object to the `example_data` adat
48+
49+
### Internal :construction:
50+
51+
* Added helper utility functions for snapshot plot unit tests
52+
- added helper utility functions `figure()`, `close_figure()`,
53+
`save_png()`, and `expect_snapshot_plot()` for saving plot
54+
snapshot output to `testthat/helper.R`
55+
- added snapshot unit tests for `preProcessAdat()`
56+
messaging, print and QC plot output
57+
58+
359
# SomaDataIO 6.2.0
460

561
### New Functions

R/calcOutlierMap.R

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,22 @@
3636
#' \item{legend.sub}{A character string containing the plot legend subtitle.}
3737
#' @author Stu Field
3838
#' @examples
39-
#' om <- calcOutlierMap(example_data)
39+
#' dat <- example_data |> dplyr::filter(SampleType == "Sample")
40+
#' om <- calcOutlierMap(dat)
4041
#' class(om)
4142
#'
4243
#' # S3 print method
4344
#' om
4445
#'
4546
#' # `sample.order = "frequency"` orders samples by outlier frequency
46-
#' om <- calcOutlierMap(example_data, sample.order = "frequency")
47+
#' om <- calcOutlierMap(dat, sample.order = "frequency")
4748
#' om$rows.by.freq
4849
#' om$sample.order
4950
#'
50-
#' # order samples by user specified indices
51-
#' om <- calcOutlierMap(example_data, sample.order = 192:1)
52-
#' om$sample.order
53-
#'
5451
#' # order samples field in Adat
55-
#' om <- calcOutlierMap(example_data, sample.order = "Sex")
52+
#' om <- calcOutlierMap(dat, sample.order = "Sex")
5653
#' om$sample.order
5754
#' @importFrom stats median
58-
5955
#' @export
6056
calcOutlierMap <- function(data, anno_tbl = NULL,
6157
apt.order = c(NA, "dilution", "signal"),

R/plotMap.R

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#' @param gridlinelwd Width of the gridlines.
2727
#' @param gridlinelty Line type of the gridlines.
2828
#' @param main Character. Main title for the plot.
29-
#' See [ggtitle()] for `ggplot2` style graphics.
29+
#' See [ggplot2::ggtitle()] for `ggplot2` style graphics.
3030
#' @param x.lab Character. Optional string for the x-axis. Otherwise
3131
#' one is automatically generated (default).
3232
#' @param y.lab Character. Optional string for the y-axis. Otherwise
@@ -42,17 +42,20 @@
4242
#' The file name must also include the desired file type extension;
4343
#' this will be used to determine the file type,
4444
#' e.g. a file named `foo.png` will be saved as a `PNG`.
45-
#' See [ggsave()] for a full list of file type (device) options.
45+
#' See [ggplot2::ggsave()] for a full list of file type (device) options.
4646
#' @param plot.width If `"filename != NULL"`, the width of the plot image file.
4747
#' @param plot.height If `"filename != NULL"`, the height of the plot image file.
4848
#' @param plot.scale If `"filename != NULL"`, the scale of the plot image file.
4949
#' @param ... Arguments required by the `plot()` generic. Currently unused.
5050
#' @return Plot an image of the passed matrix.
5151
#' @author Stu Field, Amanda Hiser
52-
#' @seealso [ggplot()], [geom_raster()]
52+
#' @seealso [ggplot2::ggplot()], [ggplot2::geom_raster()]
5353
#' @examples
54-
#' om <- calcOutlierMap(example_data)
55-
#' plot(om, flags = 0.05)
54+
#' example_data |>
55+
#' dplyr::filter(SampleType == "Sample") |>
56+
#' head(10) |>
57+
#' calcOutlierMap() |>
58+
#' plot(flags = 0.05)
5659
#' @importFrom dplyr mutate group_by row_number ungroup
5760
#' @importFrom ggplot2 element_text element_blank element_rect unit
5861
#' @importFrom ggplot2 labs scale_x_discrete scale_x_continuous theme

R/preProcessAdat.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' Pre-process an ADAT file containing raw analyte RFU values in preparation
44
#' for analysis. For more details please refer to the [pre-processing how-to
5-
#' article](https://somalogic.github.io/SomaDataIO/articles/pre-processing.html)
5+
#' article](https://somalogic.github.io/SomaDataIO/dev/articles/pre-processing.html)
66
#'
77
#' The `soma_adat` object is pre-processed with the following steps:
88
#'

cran-comments.md

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

2-
# Submission 6.2.0
2+
# Submission 6.3.0
33

44
- This is a submission to an existing CRAN package.
55

6-
- It contains feature upgrades, minor internal bug-fixes,
7-
and improved documentation.
6+
- It contains new functionality, a new vignette article and
7+
improved documentation.
88

99

1010
## Reverse Dependencies
@@ -27,13 +27,8 @@ The following `notes` were displayed during
2727
`devtools::check(remote = TRUE, manual = TRUE)`:
2828

2929
```
30-
❯ checking CRAN incoming feasibility ... [7s/72s] NOTE
30+
❯ checking CRAN incoming feasibility ... [7s/28s] NOTE
3131
Maintainer: ‘Caleb Scheidel <[email protected]>’
32-
33-
New maintainer:
34-
Caleb Scheidel <[email protected]>
35-
Old maintainer(s):
36-
Stu Field <[email protected]>
3732
3833
❯ checking installed package size ... NOTE
3934
installed size is 6.0Mb
@@ -42,7 +37,6 @@ The following `notes` were displayed during
4237
extdata 1.1Mb
4338
```
4439

45-
4640
## Package Size
4741

4842
- Package tarball from `R CMD build` is 4.2Mb
@@ -52,31 +46,35 @@ The following `notes` were displayed during
5246

5347
```
5448
name user system elapsed
55-
Col.Meta 0.23 0.01 0.25
56-
SeqId 0.03 0.02 0.05
57-
SomaDataIO-package 0.08 0.02 0.10
58-
SomaScanObjects 0.25 0.00 0.25
59-
adat-helpers 0.05 0.00 0.04
60-
adat2eSet 0.31 0.04 0.36
61-
addClass 0 0 0
62-
calc_eLOD 0.01 0.00 0.01
63-
cleanNames 0 0 0
64-
diffAdats 0.33 0.00 0.33
65-
getAnalyteInfo 0.11 0.00 0.11
66-
getAnalytes 0.02 0.00 0.01
67-
groupGenerics 0.28 0.00 0.28
68-
is_intact_attr 0 0 0
69-
is_seqFormat 0 0 0
70-
lift_adat 0.25 0.02 0.26
71-
loadAdatsAsList 1.36 0.00 1.36
72-
merge_clin 0.08 0.00 0.08
73-
parseHeader 0.08 0.01 0.09
74-
pivotExpressionSet 0.07 0.00 0.06
75-
read_adat 1.22 0.00 1.22
76-
read_annotations 0 0 0
77-
rownames 0 0 0
78-
soma_adat 0.2 0.0 0.2
79-
transform 0 0 0
80-
write_adat 0.24 0.01 0.25
49+
Col.Meta 0.34 0.00 0.34
50+
SeqId 0.03 0.02 0.05
51+
SomaDataIO-package 0.12 0.00 0.12
52+
SomaScanObjects 0.36 0.00 0.36
53+
adat-helpers 0.06 0.00 0.08
54+
adat2eSet 0.58 0.06 0.64
55+
addClass 0 0 0
56+
calcOutlierMap 4.49 0.29 4.78
57+
calc_eLOD 0.03 0.00 0.03
58+
cleanNames 0 0 0
59+
diffAdats 0.47 0.05 0.51
60+
getAnalyteInfo 0.17 0.00 0.17
61+
getAnalytes 0.01 0.00 0.01
62+
getOutlierIds 2.03 0.09 2.14
63+
groupGenerics 0.49 0.00 0.49
64+
is_intact_attr 0.01 0.00 0.02
65+
is_seqFormat 0.02 0.00 0.02
66+
lift_adat 0.44 0.00 0.44
67+
loadAdatsAsList 1.67 0.02 1.69
68+
merge_clin 0.12 0.01 0.14
69+
parseHeader 0.14 0.02 0.15
70+
pivotExpressionSet 0.11 0.00 0.11
71+
plot.Map 1.78 0.06 1.84
72+
preProcessAdat 1.88 0.03 1.91
73+
read_adat 1.44 0.03 1.47
74+
read_annotations 0 0 0
75+
rownames 0.01 0.00 0.01
76+
soma_adat 0.29 0.00 0.29
77+
transform 0 0 0
78+
write_adat 0.40 0.01 0.42
8179
```
8280

inst/WORDLIST

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ LF
3838
Lifecycle
3939
MERCHANTABILITY
4040
MacOS
41+
MADs
42+
NHS
4143
NormScale
4244
ORCID
4345
PII
@@ -125,4 +127,5 @@ tada
125127
th
126128
tibble
127129
tidyr
130+
untransformed
128131
vectorized

man/calcOutlierMap.Rd

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot.Map.Rd

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/preProcessAdat.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/articles/pre-processing.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ and removed.
302302
### Sample Level Outliers by RFU
303303

304304
It is also important to evaluate if there are any sample-level outliers
305-
by RFU measurements. For standard plasma and serum studies Standard Biotools'
305+
by RFU measurements. For standard plasma and serum studies Standard BioTools'
306306
recommended outlier definition is any sample where `>= 5%` of RFU measurements
307307
exceed 6 median absolute deviations (MADs) and 5x fold-change from median
308308
signal.
@@ -539,7 +539,7 @@ SeqId B in the original sample prep. All comparisons should be made between
539539
sample groups *within* a given SeqId. The RFU value, as well as log10 RFU and
540540
z-score, is dependent on variety of analyte-specific factors such as the
541541
SOMAmer Reagent-target protein binding kinetics, the dilution bin of the
542-
SOMAmer reagant, NHS-biotin conjagation efficiency of the SOMAmer, and other
542+
SOMAmer reagent, NHS-biotin conjugation efficiency of the SOMAmer, and other
543543
factors intrinsic to the SOMAmer Reagent within the SomaScan assay.
544544

545545

0 commit comments

Comments
 (0)