se_collapse_by_column | R Documentation |
Collapse SummarizedExperiment data by column
se_collapse_by_column(
se,
columns = colnames(se),
column_groups,
assay_names = NULL,
colDataColnames = colnames(SummarizedExperiment::colData(se)),
keepNULLlevels = FALSE,
groupFunc = jamba::rowGroupMeans,
noise_floor = 0,
noise_floor_value = 0,
rmOutliers = FALSE,
madFactor = 5,
useMedian = FALSE,
verbose = FALSE,
...
)
se |
|
columns |
|
column_groups |
|
assay_names |
|
colDataColnames |
|
keepNULLlevels |
|
groupFunc |
|
noise_floor |
|
noise_floor_value |
|
rmOutliers , madFactor |
|
useMedian |
|
verbose |
|
... |
additional arguments are passed through |
Purpose is to collapse columns of a SummarizedExperiment
object,
where measurements for a given entity, usually a gene, are split
across multiple rows in the source data. The output of this function
should be measurements appropriately summarized to the gene level.
The driving use case is slightly different than with se_collapse_by_row()
,
in this case the function is mostly convenient method to calculate
group mean values in context of a SummarizedExperiment
object,
so it can be used with jamses::heatmap_se()
for example.
This function retains associated column annotations colData(se)
,
after combining multiple values in an appropriate manner.
Optionally, this function will detect and remove individual outlier values before calculating the group mean.
SummarizedExperiment
object with these changes:
columns will be collapsed by column_groups
, for each assays(se)
numeric
matrix defined by assay_names
.
colData(se)
will also be collapsed by shrinkDataFrame()
to
combine unique values from each column annotation.
Other jamses SE utilities:
make_se_test()
,
se_collapse_by_row()
,
se_detected_rows()
,
se_normalize()
,
se_rbind()
,
se_to_rowcoldata()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.