getFactorMarkers | R Documentation |
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
)
object |
liger object with factorization results. |
dataset1 |
Name of first dataset. Required. |
dataset2 |
Name of second dataset. Required |
factorShareThresh |
Numeric. Only factors with a dataset specificity
less than or equal to this threshold will be used. Default |
datasetSpecificity |
Numeric vector. Pre-calculated dataset specificity
if available. Length should match number of all factors available. Default
|
logFCThresh |
Numeric. Lower log-fold change threshold for differential
expression in markers. Default |
pvalThresh |
Numeric. Upper p-value threshold for Wilcoxon rank test for
gene expression. Default |
nGenes |
Integer. Max number of genes to report for each dataset.
Default |
printGenes |
Logical. Whether to print ordered markers passing logFC,
UMI and frac thresholds, when |
verbose |
Logical. Whether to show information of the progress. Default
|
factor.share.thresh , dataset.specificity , log.fc.thresh , pval.thresh , num.genes , print.genes |
Deprecated. See Usage section for replacement. |
A list object consisting of the following entries:
value of \code{dataset1} |
data.frame of dataset1-specific markers |
shared |
data.frame of shared markers |
value of \code{dataset1} |
data.frame of dataset2-specific markers |
num_factors_V1 |
A frequency table indicating the number of factors each marker appears, in dataset1 |
num_factors_V2 |
A frequency table indicating the number of factors each marker appears, in dataset2 |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.