Skip to contents

Strips prepended database abbreviation, changes underscores to spaces, and converts to title case.

Usage

format_GSEA_name(
  pw,
  ignore = NULL,
  source = FALSE,
  split = FALSE,
  split_nchar = 40
)

Arguments

pw

string or char vector; MSigDB pathway names

ignore

char vector; terms to leave as all uppercase (ex. DNA, RNA) instead of title case

source

logical; T to append source in parens at end of name

split

logical; T to (roughly) split long names into multiple lines

split_nchar

integer; if split = TRUE, max number of characters per line

Value

Nicer looking title-case'd pathway name

Examples

format_GSEA_name("DATABASE_DNA_REPAIR")
#> [1] "DNA Repair"
format_GSEA_name("DATABASE_DNA_REPAIR_THIS_IS_A_REALLY_LONG_PATHWAY", split = TRUE)
#> [[1]]
#> [1] "DNA Repair this is a Really Long Pathway"
#>