Skip to contents

This function is used to pick the top genes/drivers for each group from differential analysis results based on either fold change, p value or FDR.

Usage

getTopFeatures(
  input_table,
  number = 10,
  group_by = "g1_tag",
  sort_by = "log2FC",
  sort_decreasing = TRUE
)

Arguments

input_table

The table generated by getDE() or getDA(), containing 11 statistics of differential analysis.

number

An Integer, number of top genes/driver to pick from each group. Default: 10.

group_by

Character, name of the column for grouping, usually the column of cell types or clusters. Default: "g1_tag".

sort_by

Character, name of the column for sorting. Default: "log2FC".

sort_decreasing

Logical, whether to sort the column specified by sort_by in decreasing order. If FALSE, the column will be sorted in increasing order. Default: TRUE.

Value

A data frame with top genes/driver of each group

Examples

if (FALSE) { # \dontrun{
top_drivers <- getTopFeature(da_res, number = 10, group_by, "g1_tag")
} # }