Add_Pct_Diff {scCustomize} | R Documentation |
Add percentage difference to DE results
Description
Adds new column labeled "pct_diff" to the data.frame output of FindMarkers
, FindAllMarkers
, or other DE test data.frames.
Usage
Add_Pct_Diff(
marker_dataframe,
pct.1_name = "pct.1",
pct.2_name = "pct.2",
overwrite = FALSE
)
Arguments
marker_dataframe |
data.frame containing the results of |
pct.1_name |
the name of data.frame column corresponding to percent expressed in group 1. Default is Seurat default "pct.1". |
pct.2_name |
the name of data.frame column corresponding to percent expressed in group 2. Default is Seurat default "pct.2". |
overwrite |
logical. If the |
Value
Returns input marker_dataframe
with additional "pct_diff" column.
Examples
## Not run:
marker_df <- FindAllMarkers(object = obj_name)
marker_df <- Add_Pct_Diff(marker_dataframe = marker_df)
# or piped with function
marker_df <- FindAllMarkers(object = obj_name) %>%
Add_Pct_Diff()
## End(Not run)
[Package scCustomize version 2.1.2 Index]