Adds new column labeled "pct_diff" to the data.frame output of FindMarkers
, FindAllMarkers
, or other DE test data.frames.
Add_Pct_Diff(
marker_dataframe,
pct.1_name = "pct.1",
pct.2_name = "pct.2",
overwrite = FALSE
)
data.frame containing the results of FindMarkers
, FindAllMarkers
, or other DE test data.frame.
the name of data.frame column corresponding to percent expressed in group 1. Default is Seurat default "pct.1".
the name of data.frame column corresponding to percent expressed in group 2. Default is Seurat default "pct.2".
logical. If the marker_dataframe
already contains column named "pct_diff" whether to
overwrite or return error message. Default is FALSE.
Returns input marker_dataframe
with additional "pct_diff" column.
if (FALSE) {
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()
}