From 4f410df37d98677bb60b35e2ecd001db4a77eb5a Mon Sep 17 00:00:00 2001 From: stufield Date: Fri, 8 Mar 2024 01:21:21 +0000 Subject: [PATCH] Built site for SomaDataIO: 6.0.0.9000@d0f508f --- dev/articles/cli-merge-tool.html | 16 ++++++++-------- dev/articles/loading-and-wrangling.html | 16 ++++++++++------ dev/index.html | 7 ++++--- dev/pkgdown.yml | 2 +- dev/reference/read_adat.html | 11 ++++++++--- dev/reference/write_adat.html | 2 +- dev/search.json | 2 +- 7 files changed, 33 insertions(+), 23 deletions(-) diff --git a/dev/articles/cli-merge-tool.html b/dev/articles/cli-merge-tool.html index 1b4421f..ef0057c 100644 --- a/dev/articles/cli-merge-tool.html +++ b/dev/articles/cli-merge-tool.html @@ -136,10 +136,10 @@

Overview

This requires the new clinical, i.e. non-proteomic, data to be merged with the ‘SomaScan’ data into a “new” ADAT prior to analysis. For this -purpose, a command-line interface (“CLI”) tool has been included with SomaDataIO in +purpose, a command-line-interface (“CLI”) tool has been included with SomaDataIO in the cli/merge/ directory, which allows one to generate an updated *.adat file via the command-line without having to -open an integrated development environment (“IDE”), +launch an integrated development environment (“IDE”), e.g. RStudio.


@@ -151,8 +151,8 @@

Setup dir(system.file("cli", "merge", package = "SomaDataIO")) #> [1] "merge_clin.R" "meta.csv" "meta2.csv" -f <- system.file("cli", "merge", "merge_clin.R", package = "SomaDataIO") -f +merge_script <- system.file("cli", "merge", "merge_clin.R", package = "SomaDataIO") +merge_script #> [1] "/Users/runner/work/_temp/Library/SomaDataIO/cli/merge/merge_clin.R"

First create a temporary “analysis” directory:

@@ -165,16 +165,16 @@ 

Setup #> [1] TRUE # copy merge tool into analysis directory -file.copy(f, to = analysis_dir) +file.copy(merge_script, to = analysis_dir) #> [1] TRUE

Let’s create some dummy ‘SomaScan’ data derived from the -example_data object from SomaDataIO +example_data object from SomaDataIO. First we reduce its size to 9 samples and 5 proteomic features each, and then write to text with write_adat(). This will be the “new” starting point for the clinical data merge and represents where customers would begin their analysis.

-feats <- withr::with_seed(3, sample(getAnalytes(example_data), 5))
+feats <- withr::with_seed(3, sample(getAnalytes(example_data), 5L))
 sub_adat <- dplyr::select(example_data, PlateId, SlideId, Subarray,
                           SampleId, Age, all_of(feats)) |> head(9L)
 withr::with_dir(analysis_dir,
@@ -264,7 +264,7 @@ 

Standard Syntaxboth files, (ADAT and CSV), has the same variable name:

# change directory to the analysis path
-cd /var/folders/h1/8hndypj13nsbj5pn4xsnv1tm0000gn/T//RtmpI20XVX/somascan-20ec40042bed
+cd /var/folders/h1/8hndypj13nsbj5pn4xsnv1tm0000gn/T//RtmpzmmHjJ/somascan-1c83463186d7
 
 # run the Rscript:
 # - we recommend using the --vanilla flag
diff --git a/dev/articles/loading-and-wrangling.html b/dev/articles/loading-and-wrangling.html
index 55a3dd8..aac88cc 100644
--- a/dev/articles/loading-and-wrangling.html
+++ b/dev/articles/loading-and-wrangling.html
@@ -133,10 +133,14 @@ 

Loading an ADAT

Load an ADAT text file into R memory with:

-# Sample file name
-f <- system.file("extdata", "example_data10.adat",
-                 package = "SomaDataIO", mustWork = TRUE)
-my_adat <- read_adat(f)
+# path to *.adat file
+# replace with your file path
+adat_path <- system.file("extdata", "example_data10.adat",
+                         package = "SomaDataIO", mustWork = TRUE)
+adat_path
+#> [1] "/Users/runner/work/_temp/Library/SomaDataIO/extdata/example_data10.adat"
+
+my_adat <- read_adat(adat_path)
 
 # class test
 is.soma_adat(my_adat)
@@ -271,7 +275,7 @@ 

Debugging
-read_adat(f, debug = TRUE)
+read_adat(adat_path, debug = TRUE)
 #> ══ Parsing Specs ═══════════════════════════════════════════════════════════════
 #> Table Begin               45
 #> Col.Meta Start            46
@@ -533,7 +537,7 @@ 

Writing a soma_adat write_adat(my_adat, file = tempfile("my-adat-", fileext = ".adat")) #> ADAT passed all checks and traps. -#> ADAT written to: '/var/folders/h1/8hndypj13nsbj5pn4xsnv1tm0000gn/T//RtmpLOFxRR/my-adat-215075df79c4.adat'

+#> ADAT written to: '/var/folders/h1/8hndypj13nsbj5pn4xsnv1tm0000gn/T//RtmpyVUDTI/my-adat-1d0a568c99db.adat'

diff --git a/dev/index.html b/dev/index.html index e168b27..2b1ba82 100644 --- a/dev/index.html +++ b/dev/index.html @@ -131,7 +131,7 @@

The SomaDataIO R package loads and exports ‘SomaScan’ data via the SomaLogic Operating Co., Inc. structured text file called an ADAT (*.adat). The package also exports auxiliary functions for manipulating, wrangling, and extracting relevant information from an ADAT object once in memory. Basic familiarity with the R environment is assumed, as is the ability to install contributed packages from the Comprehensive R Archive Network (CRAN).

-

If you run into any issues/problems with SomaDataIO full documentation of the most recent release can be found at our pkgdown website hosted by GitHub. If the issue persists we encourage you to consult the issues page and, if appropriate, submit an issue and/or feature request.

+

If you run into any issues/problems with SomaDataIO full documentation of the most recent release can be found at our website of articles and workflows. If the issue persists we encourage you to consult the issues page and, if appropriate, submit an issue and/or feature request.


Usage @@ -203,9 +203,9 @@

Objects and Data
wget https://raw.githubusercontent.com/SomaLogic/SomaLogic-Data/master/example_data.adat

  • -

    it has been replaced by an abbreviated, light-weight version containing only the first 10 samples and can be found at:

    +

    within SomaDataIO it has been replaced by an abbreviated, light-weight version containing only the first 10 samples:

    -system.file("extdata", "example_data10.adat", package = "SomaDataIO")
    +dir(system.file("extdata", package = "SomaDataIO"), full.names = TRUE)
@@ -263,6 +263,7 @@

Loading an ADATmy_adat #> ══ SomaScan Data ═══════════════════════════════════════════════════════════════ #> SomaScan version V4 (5k) +#> Signal Space 5k #> Attributes intact ✓ #> Rows 10 #> Columns 5318 diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index 3f7f046..93a78b1 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -12,7 +12,7 @@ articles: safely-map-values-join: safely-map-values-join.html safely-rename-df: safely-rename-df.html train-test-setup: train-test-setup.html -last_built: 2024-02-29T01:24Z +last_built: 2024-03-08T01:18Z urls: reference: https://somalogic.github.io/SomaDataIO/reference article: https://somalogic.github.io/SomaDataIO/articles diff --git a/dev/reference/read_adat.html b/dev/reference/read_adat.html index e05edf7..e817b7f 100644 --- a/dev/reference/read_adat.html +++ b/dev/reference/read_adat.html @@ -181,9 +181,14 @@

Author<

Examples

-
f <- system.file("extdata", "example_data10.adat",
-                 package = "SomaDataIO", mustWork = TRUE)
-my_adat <- read_adat(f)
+    
# path to *.adat file
+# replace with your file path
+adat_path <- system.file("extdata", "example_data10.adat",
+                         package = "SomaDataIO", mustWork = TRUE)
+adat_path
+#> [1] "/Users/runner/work/_temp/Library/SomaDataIO/extdata/example_data10.adat"
+
+my_adat <- read_adat(adat_path)
 
 is.soma_adat(my_adat)
 #> [1] TRUE
diff --git a/dev/reference/write_adat.html b/dev/reference/write_adat.html
index b8f87aa..1cfd483 100644
--- a/dev/reference/write_adat.html
+++ b/dev/reference/write_adat.html
@@ -156,7 +156,7 @@ 

Examples write_adat(adat_out, file = tempfile(fileext = ".adat")) #> ADAT passed all checks and traps. -#> ADAT written to: '/var/folders/h1/8hndypj13nsbj5pn4xsnv1tm0000gn/T//RtmpBkCcyJ/file15c8431c690d.adat' +#> ADAT written to: '/var/folders/h1/8hndypj13nsbj5pn4xsnv1tm0000gn/T//Rtmph5pBUx/file14324bc2c396.adat'