Skip to contents

Joins two signatures by feature name and optionally draws a scatter plot comparing feature scores. Use data_source = "signature" to compare significant features only, or data_source = "difexp" to compare all overlapping features in the differential-expression tables. Signatures are retrieved from the SigRepo database unless OmicSignature objects are supplied directly.

Usage

compareSignatureScores(
  conn_handler = NULL,
  signature_id_a = NULL,
  signature_name_a = NULL,
  signature_id_b = NULL,
  signature_name_b = NULL,
  omic_signature_a = NULL,
  omic_signature_b = NULL,
  data_source = c("signature", "difexp"),
  feature_col = "feature_name",
  score_col = "score",
  method = c("pearson", "spearman", "kendall"),
  plot = TRUE,
  label_a = NULL,
  label_b = NULL,
  verbose = TRUE,
  ...
)

Arguments

conn_handler

An R object obtained from SigRepo::newConnHandler(). Required unless omic_signature_a and omic_signature_b are supplied.

signature_id_a

Database ID for signature A.

signature_name_a

Name for signature A.

signature_id_b

Database ID for signature B.

signature_name_b

Name for signature B.

omic_signature_a

Optional OmicSignature R6 object for signature A.

omic_signature_b

Optional OmicSignature R6 object for signature B.

data_source

One of "signature" or "difexp". Defaults to "signature".

feature_col

Column containing feature names. Defaults to "feature_name".

score_col

Column containing feature scores. Defaults to "score".

method

Correlation method passed to stats::cor.test().

plot

Logical; whether to draw a scatter plot. Defaults to TRUE.

label_a

Label for signature A.

label_b

Label for signature B.

verbose

Logical; whether or not to print diagnostic messages while retrieving signatures. Defaults to TRUE.

...

Additional arguments passed to graphics::plot().

Value

A list containing overlap_scores, correlation, and n_overlap.