Learn R Programming

hpoPlot (version 2.2)

get.pop.frequency.based.colours: Function to colour HPO nodes in plot with colours based on information content/frequency of terms with respect to population

Description

Function to colour HPO nodes in plot with colours based on information content/frequency of terms with respect to population

Usage

get.pop.frequency.based.colours(hpo.terms, terms, plotting.context,
  colourPalette = colorRampPalette(c("Yellow", "Green", "#0099FF"))(10),
  terms.freq = if (is.null(plotting.context$frequency))
  exp(-plotting.context$information[terms]) else plotting.context$frequency,
  max.colour.freq = max(terms.freq), min.colour.freq = min(terms.freq))

Arguments

hpo.terms
R-Object representation of HPO
terms
Character vector of HPO terms
plotting.context
List object with hpo.phenotypes slot for list of character vectors of terms
colourPalette
Character vector of colours for the different information contents of the terms to be plotted, going from rare to common
terms.freq
Numeric vector of frequencies of terms in plot, named by term
max.colour.freq
Numeric value in [0, 1] giving the maximum frequency (to which the dullest color will be assigned)
min.colour.freq
Numeric value in [0, 1] giving the minimum frequency (to which the brightest color will be assigned)

Value

  • Character vector of colours, named by term