Extract vector gene list (or named gene vector) from data.frame results of FindAllMarkers
or similar analysis.
Extract_Top_Markers(
marker_dataframe,
num_features = 10,
num_genes = deprecated(),
group_by = deprecated(),
group.by = "cluster",
rank_by = "avg_log2FC",
gene_column = "gene",
gene_rownames_to_column = FALSE,
data_frame = FALSE,
named_vector = TRUE,
make_unique = FALSE
)data.frame output from FindAllMarkers or similar analysis.
number of features per group (e.g., cluster) to include in output list.
column name of marker_dataframe to group data by. Default is "cluster" based on
FindAllMarkers.
column name of marker_dataframe to rank data by when selecting num_genes per group.by.
Default is "avg_log2FC" based on FindAllMarkers.
column name of marker_dataframe that contains the gene IDs. Default is "gene"
based on FindAllMarkers.
logical. Whether gene IDs are stored in rownames and should be moved to column. Default is FALSE.
Logical, whether or not to return filtered data.frame of the original markers_dataframe or
to return a vector of gene IDs. Default is FALSE.
Logical, whether or not to name the vector of gene names that is returned by the function.
If TRUE will name the vector using the column provided to group.by. Default is TRUE.
Logical, whether an unnamed vector should return only unique values. Default is FALSE.
Not applicable when data_frame = TRUE or named_vector = TRUE.
filtered data.frame, vector, or named vector containing gene IDs.
if (FALSE) {
top10_genes <- Extract_Top_Markers(marker_dataframe = markers_results, num_genes = 10,
group.by = "cluster", rank_by = "avg_log2FC")
}