getAnalyteInfo {SomaDataIO} | R Documentation |
Get Analyte Annotation Information
Description
Uses the Col.Meta
attribute (analyte annotation data that appears above
the protein measurements in the *.adat
text file) of a soma_adat
object,
adds the AptName
column key, conducts a few sanity checks, and
generates a "lookup table" of analyte data that can be used for simple
manipulation and indexing of analyte annotation information.
Most importantly, the analyte column names of the soma_adat
(e.g. seq.XXXX.XX
) become the AptName
column of the lookup table and
represents the key index between the table and soma_adat
from which it comes.
Usage
getAnalyteInfo(adat)
getTargetNames(tbl)
getFeatureData(adat)
Arguments
adat |
A |
tbl |
A |
Value
A tibble
object with columns corresponding
to the column meta data entries in the soma_adat
. One row per analyte.
Functions
-
getTargetNames()
: creates a lookup table (or dictionary) as a named list object ofAptNames
and Target names in key-value pairs. This is a convenient tool to quickly access aTargetName
given theAptName
in which the key-value pairs map theseq.XXXX.XX
to its correspondingTargetName
intbl
. This structure which provides a convenient auto-completion mechanism at the command line or for generating plot titles. -
getFeatureData()
: . Please now usegetAnalyteInfo()
.
Author(s)
Stu Field
See Also
getAnalytes()
, is_intact_attr()
, read_adat()
Examples
# Get Aptamer table
anno_tbl <- getAnalyteInfo(example_data)
anno_tbl
# Use `dplyr::group_by()`
dplyr::tally(dplyr::group_by(anno_tbl, Dilution)) # print summary by dilution
# Columns containing "Target"
anno_tbl |>
dplyr::select(dplyr::contains("Target"))
# Rows of "Target" starting with MMP
anno_tbl |>
dplyr::filter(grepl("^MMP", Target))
# Target names
tg <- getTargetNames(anno_tbl)
# how to use for plotting
feats <- sample(anno_tbl$AptName, 6)
op <- par(mfrow = c(2, 3))
sapply(feats, function(.x) plot(1:10, main = tg[[.x]]))
par(op)