Top markers per group from pseudobulk DESeq2 results
top_markers_dds.RdFilters and ranks the long-form output of pseudobulk_deseq2() to
give the most distinguishing features per group. The filtering
arguments combine multiplicatively, then the top n features per
group are kept by descending Wald statistic and pivoted into wide
form. Counterpart to top_markers() for Wilcoxon-based results.
Arguments
- res
Long-form DESeq2 results from
pseudobulk_deseq2(). Must have columnsgroup,feature,pvalue,padj,log2FoldChange, andstat.- n
Number of top features to return per group. Default
10.- pval_max
Filter features with raw
pvalue > pval_max. Default1(no filter).- padj_max
Filter features with adjusted
padj > padj_max. Default1(no filter).- lfc_min
Filter features with
log2FoldChange < lfc_min. Default1keeps only upregulated features; set to0to include downregulated as well, or-Infto disable.
Value
tibble in wide form: a rank column (1..n) and one
column per group containing the gene identifier of the top-ranked
feature at that rank. Cells are NA for groups that have fewer
than n features passing the filters.