getMarkerEffects: Get marker effect sizes

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/getMarkerEffects.R

Description

Utility function to extract the marker effect sizes as a matrix from the output of findMarkers.

Usage

1
getMarkerEffects(x, prefix = "logFC", strip = TRUE, remove.na.col = FALSE)

Arguments

x

A DataFrame containing marker statistics for a given group/cluster, usually one element of the List returned by findMarkers.

prefix

String containing the prefix for the columns containing the effect size.

strip

Logical scalar indicating whether the prefix should be removed from the output column names.

remove.na.col

Logical scalar indicating whether to remove columns containing any NAs.

Details

Setting remove.na.col=TRUE may be desirable in applications involving blocked comparisons, where some pairwise comparisons are not possible if the relevant levels occur in different blocks. In such cases, the resulting column is filled with NAs that may interfere with downstream steps like clustering.

Value

A numeric matrix containing the effect sizes for the comparison to every other group/cluster.

Author(s)

Aaron Lun

See Also

findMarkers and combineMarkers, to generate the DataFrames.

Examples

1
2
3
4
5
6
7
8
9
library(scuttle)
sce <- mockSCE()
sce <- logNormCounts(sce)
                                                                     
kout <- kmeans(t(logcounts(sce)), centers=4) 
out <- findMarkers(sce, groups=kout$cluster)

eff1 <- getMarkerEffects(out[[1]])
str(eff1)

scran documentation built on April 17, 2021, 6:09 p.m.