WideSomaLogicDataAttributes: Get WideSomaLogicData attributes

Description Usage Arguments Value See Also Examples

Description

Accessors and mutators (getters and setters) for objects of class WideSomaLogicData or LongSomaLogicData.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
getIntensities(x, ...)

## S3 method for class 'WideSomaLogicData'
getIntensities(
  x,
  rowsContain = c("samples", "sequences"),
  reorder = FALSE,
  ...
)

## S3 method for class 'LongSomaLogicData'
getIntensities(x, ...)

## S3 method for class 'WideSomaLogicData'
as.matrix(x, ...)

getSampleData(x, ...)

## S3 method for class 'WideSomaLogicData'
getSampleData(x, ...)

## S3 method for class 'LongSomaLogicData'
getSampleData(x, ...)

getSequenceData(x)

getMetadata(x)

getChecksum(x)

setSequenceData(x, value)

setMetadata(x, value)

setChecksum(x, value)

setSampleData(x, value)

setIntensities(x, value, prependSeqIdToColNames = NA)

Arguments

x

An object of class WideSomaLogicData or LongSomaLogicData.

...

Variables passed to and from from other methods.

rowsContain

Either samples or sequences.

reorder

If TRUE, rows are reordered by ExtIdentifier and columns are reordered by SeqId, alphabetically.

value

Value to set the attribute to.

prependSeqIdToColNames

Logical. Should "SeqId." be prepended to the column names of the intensities? If NA, auto-guess whether they should be.

Value

getIntensities returns a numeric matrix of intensities for each protein. Row names are taken from the ExtIdentifier of the input. Column names are the protein sequence IDs. (If you set rowsContain = "sequences", then rows and columns and their names are swapped.)

getSampleData returns a data table containing the sample data. That is, the input without the intensities or attributes. There is one compulsory column:

ExternalId

Character. A unique identifer for the sample.

These columns are not compulsory for the file spec, but are always included by SomaLogic:

SampleId

Character. The customer's original sample identifier. This is either the same as the subject identifier, or the calibrator and buffer separated by a hyphen. For example "1234" or "PPT-09".

TimePoint

Character or numeric. The time point identified by the customer.

SampleGroup

Character. Cohort information provided by the customer.

SampleNotes

Character. Lab comments about the sample condition.

AssayNotes

Character. Lab comments about assay adverse events.

Common optional columns:

PlateId

Character. Identifier for the plate. For assay experiments, this also functions as an experiment identifier.

SlideId

Character. Agilent slide barcode.

Subarray

Integer. Agilent subarray number from 1 to 8.

SampleType

Character. Either "Sample, "QC", "Buffer" or "Calibrator".

BarCode

Character. 1D Barcode of aliquot.

Barcode2d

Character. 2D Barcode of aliquot.

SiteId

Character. The laboratory that ran the experiment, applicable if subcontracted.

SampleUniqueId

Character. Where multiple experiments are combined, this column can be used to ensure a unique sample ID.

Subject_ID

Character. Identifier for the person/animal/thing being sampled.

HybControlNormScale

Numeric. Hybridization control normalization scale factor. For example, 1.23.

NormScale_40

Numeric. Median normalization scale factor, for only the sequences diluted to 40% concentration. For example, 1.23.

NormScale_0_005

Numeric. Median normalization scale factor, for only the sequences diluted to 0.005% concentration. For example, 1.23.

NormScale_1

Numeric. Median normalization scale factor, for only the sequences diluted to 1% concentration. For example, 1.23.

PercentDilution

Numeric. How much was the sample diluted? Either 40, 1, or 0.005.

SampleMatrix

Character. Either "EDTA-Plasma", "Sodium Citrate Plasma" or "Serum". Applicable if different matrices are used with different samples in the file, otherwise use the StudyMatrix metadata value.

SampleDescription

Character. Free text describing the sample.

TubeUniqueID

Character. A unique identifier for every sample tube, assigned by the customer.

RowCheck

Character. Either "PASS" or "FAIL". Did the sample pass quality control checks?

getSequenceData returns a data table containing the sequence data. "Sequence" can be considered synonymous with "feature" or "SOMAmer reagent". The following columns are compulsory.

SeqId

A unique identifer for the SOMAmer reagent.

Target

The unique name for the targeted proteins.

The following columns are optional but should always be provided by SomaLogic.

SomaId

Character. The SomaLogic identifier for the protein target. For the 1129 and 1310 assays, there is a one-to-one correspondence between SeqId and SomaId, but in theory there is a many-to-one correspondence.

TargetFullName

Character. A description of the proteins targeted by the SOMAmer reagent, taken from UniProt.

UniProt

Character. The UniProt identifiers for the targeted proteins. Older versions of the file format may also contain the value 'Family', referring to a whole family of proteins, though this behaviour is considered deprecated.

EntrezGeneID

Character. The Entrez Gene identifiers for the genes corresponding to the targeted proteins.

EntrezGeneSymbol

Character. The Entrez Gene symbols for the genes corresponding to the targeted proteins.

Organism

Character. What animal does the target protein refer to?

ColCheck

Character. Either PASS or FAIL. Did the sequence pass quality control checks?

Units

Character. Unit of measurement for the SOMAmer reagent abundances. Should always be RFU.

Type

Character. One of "Spuriomer", "Protein", "Hybridization Control", "Non-human Protein".

Cal_*PlateId*

Numeric. Calibration scale factor for each plate. For example, 1.23.

CalReference

Numeric. Calibration reference intensity, in RFU. For example, 543.21.

Dilution

Numeric. Concentration of the diluted sample compared to the neat sample, as a percentage. Either 40, 1, or 0.005.

getCheckSum and getMetadata return the checksum (a string) and metadata (a list) attributes of the input.

See Also

readAdat

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Get the sample dataset
soma_file <- extractSampleData()
wide_soma_data <- readAdat(soma_file)

# Access its components
checksum <- getChecksum(wide_soma_data)
metadata <- getMetadata(wide_soma_data)
sequenceData <- getSequenceData(wide_soma_data)
sampleData <- getSampleData(wide_soma_data)

# Intensities of a WideSomaLogicData object are a matrix
intWideSamp <- getIntensities(wide_soma_data)
if (interactive()) {
# Not run due to side effects of View
  View(intWideSamp, "Wide intensities, samples per row")
}
intWideSeq <- getIntensities(                 # The transpose
  wide_soma_data,
  rowsContain = "sequences"
)
if (interactive()) {
  View(intWideSeq, "Wide intensities, seqs per row")
}

# Sample data is always a data table
sampWide <- getSampleData(wide_soma_data)
if (interactive()) {
  View(sampWide, "Wide sample data")
}

# For LongSomaLogicData objects, the intensities are returned
# as a data.table
long_soma_data <- reshape2::melt(wide_soma_data)
intLong <- getIntensities(long_soma_data)
if (interactive()) {
  View(intLong, "Long intensities")
}

# Sample data has a different shape now
sampLong <- getSampleData(long_soma_data)
if (interactive()) {
  View(sampLong, "Long sample data")
}

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