curate_se_colData | R Documentation |
Apply curation to colData in a SummarizedExperiment object
curate_se_colData(
se,
df,
pattern_colname = head(colnames(df), 1),
group_colname = NULL,
id_colname = "Label",
use = c("colnames"),
use_delim = "_",
subset_se = FALSE,
warn_multimatch = TRUE,
indent = 0,
verbose = TRUE,
...
)
se |
|
df |
|
pattern_colname |
|
group_colname |
|
id_colname |
|
use |
|
use_delim |
|
subset_se |
|
warn_multimatch |
|
indent |
|
verbose |
|
... |
additional arguments are passed to |
Given a SummarizedExperiment object, this function is intended
to augment the SummarizedExperiment::colData()
annotation associated
with columns, which are typically biological or experimental
samples.
Measurements within each sample are typically stored as rows.
A convenient wrapper to curate_to_df_by_pattern()
, which applies
the result directly to SummarizedExperiment::colData()
which is
stored as a S4Vectors::DataFrame-class
.
Note that colnames present in both colData(se)
and df
will
take the value from df
as replacement, including the presence of NA
values.
The patterns are used to match identifiers using regular expressions,
and the argument warn_multimatch=TRUE
(default) will print a
warning when one pattern matches two or more identifiers.
It may be intended, or may indicate that some patterns are not
specific enough to match only one intended identifier.
For example pattern="sample_3"
will match identifiers:
c("one_sample_3", "two_sample_3", "one_sample_31")
.
To overcome this type of issue, use regular expressions to
limit matching to the end, for example pattern="sample_3$"
will only match c("one_sample_3", "two_sample_3")
and
will not match "one_sample_31"
.
It can be helpful to name the pattern column "Pattern"
so that
the pattern used is clearly defined in the output
colData(se)
, and can be compared to the intended identifiers.
SummarizedExperiment::SummarizedExperiment
object.
When subset_se=FALSE
(default), the output will contain
the same dimensions and column order as the input se
.
When subset_se=TRUE
the output object may contain fewer columns
based upon the number of identifiers that matched the patterns
supplied in df
.
Other jam utility functions:
cardinality()
,
color_complement()
,
convert_PD_df_to_SE()
,
convert_imputed_assays_to_na()
,
curate_to_df_by_pattern()
,
design2layout()
,
get_numeric_transform()
,
handle_df_args()
,
merge_proteomics_se()
,
nmat_summary()
,
nmatlist_summary()
,
rmd_tab_iterator()
,
rowNormScale()
,
summit_from_vector()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.