Association of signature exposures with other features will be performed using one of two procedures: for a continuous association variable (including ordinal variable), correaltion is performed; for a binary association variable, samples will be divided into two groups and Mann-Whitney U-test is performed to test for differences in signature exposure medians between the two groups. See get_tidy_association for cleaning association result.

get_sig_feature_association(
  data,
  cols_to_sigs,
  cols_to_features,
  type = "ca",
  method_co = c("spearman", "pearson", "kendall"),
  method_ca = stats::wilcox.test,
  min_n = 0.01,
  verbose = FALSE,
  ...
)

Arguments

data

a data.frame contains signature exposures and other features

cols_to_sigs

colnames for signature exposure

cols_to_features

colnames for other features

type

a character vector containing 'ca' for categorical variable and 'co' for continuous variable, it must have the same length as cols_to_features.

method_co

method for continuous variable, default is "spearman", could also be "pearson" and "kendall".

method_ca

method for categorical variable, default is "wilcox.test"

min_n

a minimal fraction (e.g. 0.01) or a integer number (e.g. 10) for filtering some variables with few positive events. Default is 0.01.

verbose

if TRUE, print extra message.

...

other arguments passing to test functions, like cor.test.

Value

a list. For 'co' features, 'measure' means correlation coefficient. For 'ca' features, 'measure' means difference in means of signature exposure.