Applies various filters to genes on the shared (\(W\)) and dataset-specific (\(V\)) components of the factorization, before selecting those which load most significantly on each factor (in a shared or dataset-specific way).
getFactorMarkers(
object,
dataset1,
dataset2,
factorShareThresh = 10,
datasetSpecificity = NULL,
logFCThresh = 1,
pvalThresh = 0.05,
nGenes = 30,
printGenes = FALSE,
verbose = getOption("ligerVerbose", TRUE),
factor.share.thresh = factorShareThresh,
dataset.specificity = datasetSpecificity,
log.fc.thresh = logFCThresh,
pval.thresh = pvalThresh,
num.genes = nGenes,
print.genes = printGenes
)
A list object consisting of the following entries:
data.frame of dataset1-specific markers
data.frame of shared markers
data.frame of dataset2-specific markers
A frequency table indicating the number of factors each marker appears, in dataset1
A frequency table indicating the number of factors each marker appears, in dataset2
liger object with factorization results.
Name of first dataset. Required.
Name of second dataset. Required
Numeric. Only factors with a dataset specificity
less than or equal to this threshold will be used. Default 10
.
Numeric vector. Pre-calculated dataset specificity
if available. Length should match number of all factors available. Default
NULL
automatically calculates with
calcDatasetSpecificity
.
Numeric. Lower log-fold change threshold for differential
expression in markers. Default 1
.
Numeric. Upper p-value threshold for Wilcoxon rank test for
gene expression. Default 0.05
.
Integer. Max number of genes to report for each dataset.
Default 30
.
Logical. Whether to print ordered markers passing logFC,
UMI and frac thresholds, when verbose = TRUE
. Default FALSE
.
Logical. Whether to show information of the progress. Default
getOption("ligerVerbose")
or TRUE
if users have not set.
Deprecated. See Usage section for replacement.
library(dplyr)
result <- getFactorMarkers(pbmcPlot, dataset1 = "ctrl", dataset2 = "stim")
print(class(result))
print(names(result))
result$shared %>% group_by(factor_num) %>% top_n(2, logFC)
Run the code above in your browser using DataLab