Adds Benjamini-Hochberg adjusted q-values and a simple significance code column based on p-values contained in a data frame.
add_qsig(df)The input data frame with added columns q_value and
sig. If df is NULL or empty, it is returned as is.
A data frame containing at least a numeric column
p_value. If df is NULL or has zero rows,
it is returned unchanged.
The function:
Computes q_value using p.adjust(method = "BH").
Creates a sig column with significance codes:
"***" for q_value <= 0.001
"**" for 0.001 < q_value <= 0.01
"*" for 0.01 < q_value <= 0.05
"" otherwise