Learn R Programming

hpoPlot (version 1.0)

term.set.list.from.character: Get Term Set List From Character Vector

Description

Function which returns a list of HPO term sets (typically to represent patients and used by functions in this package) given a character vector of comma separated HPO terms.

Usage

term.set.list.from.character(hpo.terms, character.vector, remove.empty = FALSE)

Arguments

hpo.terms
An R-Object representing the HPO, as returned by get.hpo.terms.
character.vector
A character vector of comma separated lists of HPO terms
remove.empty
Boolean to dictate whether to remove sets with no HPO terms.

Value

  • List of character vectors of HPO terms.

Examples

Run this code
data(hpo)

	patients.character.vector <- c(
		A="HP:0001382,HP:0004272,HP:0007917,HP:0004912,HP:0001596",
		B="HP:0001382,HP:0004272,HP:0002165,HP:0004800,HP:0004912",
		C="HP:0004800,HP:0001382,HP:0004912,HP:0007917,HP:0008743",
		D="HP:0001257,HP:0001382,HP:0007917,HP:0012623,HP:0002165",
		E="HP:0007917,HP:0004800,HP:0004272,HP:0001596,HP:0002165" 
	)

	patients.of.interest <- term.set.list.from.character(hpo.terms, patients.character.vector)

Run the code above in your browser using DataLab