Create Kappa Statistics Matrix

create_kappa_matrix(
  enrichment_res,
  use_description = FALSE,
  use_active_snw_genes = FALSE
)

Arguments

enrichment_res

data frame of pathfindR enrichment results. Must-have columns are "Term_Description" (if use_description = TRUE) or "ID" (if use_description = FALSE), "Down_regulated", and "Up_regulated". If use_active_snw_genes = TRUE, "non_Signif_Snw_Genes" must also be provided.

use_description

Boolean argument to indicate whether term descriptions (in the "Term_Description" column) should be used. (default = FALSE)

use_active_snw_genes

boolean to indicate whether or not to use non-input active subnetwork genes in the calculation of kappa statistics (default = FALSE, i.e. only use affected genes)

Value

a matrix of kappa statistics between each term in the enrichment results.

Examples

sub_df <- RA_output[1:3, ]
create_kappa_matrix(sub_df)
#>            hsa05415   hsa04130   hsa03410
#> hsa05415  1.0000000 -0.3636364 -0.3255814
#> hsa04130 -0.3636364  1.0000000 -0.2272727
#> hsa03410 -0.3255814 -0.2272727  1.0000000