createSampleSubmission: Create a SomaLogic Sample Submission Form

Description Usage Arguments Value See Also Examples

View source: R/read-sample-submision-input-files.R

Description

Creates a data table of contents for a SomaLogic sample submission form.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
createSampleSubmission(
  slides,
  controls,
  comments,
  samples,
  sampleMatrix = c("EDTA-Plasma", "Sodium Citrate Plasma", "Serum"),
  siteId = "WCQ",
  studyName = "",
  studyId = "",
  runName = "Set A"
)

Arguments

slides

A data frame of slide data, as imported by readSlides.

controls

A data frame of control data, as imported by readControls.

comments

A data frame of comment data, as imported by readComments.

samples

A data frame of sample data, as imported by readSamples.

sampleMatrix

A string giving the type of samples (plamsa or serum).

siteId

A string giving the SomaLogic ID of your site or institution.

studyName

A string giving your institution's name for the study.

studyId

A string giving the SomaLogic ID of the study

runName

A string naming the plate.

Value

A data table with the 96 rows (one plate worth, with each row representing a sample). It contains the following columns:

SampleNumber

One to ninety six.

SlideId

From slides.csv.

Subarray

Position in slide, from 1 to 8.

PlatePosition

Position in plate, from A1 to H12

PercentDilution

Always 40.

BarCode

From controls.csv.

SampleNotes

From controls.csv.

AssayNotes

From controls.csv.

SampleId

From samples.csv.

SampleMatrix

sampleMatrix for samples; blank for controls.

SiteId

siteId for samples; blank for controls.

StudyName

studyName for samples; blank for controls.

TimePoint

Currently blank.

SampleGroup

Currently blank.

SampleDescription

Currently blank.

StudyId

studyId for samples; blank for controls.

RunName

runName for samples; blank for controls.

See Also

writeSampleSubmissionForm for a more complete usage example.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Import the input files
withr::with_dir(
    system.file("extdata", package = "readat"),
    {
        slides <- readSlides()
        controls <- readControls()
        comments <- readComments()
        samples <- readSamples()
    }
)

# Create the sample submission form and write to Excel spreadsheet
submission <- createSampleSubmission(
    slides, controls, comments, samples,
    studyName = "Taheri01", studyId = "WCQ-16-002"
)
str(submission)

graumannlab/readat documentation built on May 16, 2020, 10:15 p.m.