force.colour.scheme {BoutrosLab.plotting.general}R Documentation

Based on predefined colour schemes, returns a vector of corresponding colours.

Description

Takes a vector of character strings and an scheme returns the matching colours as a vector.

Usage

force.colour.scheme(
	x = NA,
	scheme,
	fill.colour = 'slategrey',
	include.names = FALSE,
	return.factor = FALSE,
	return.scheme = FALSE
	);

Arguments

x

The input character or numeric vector, defaults to NA incase return.scheme = TRUE.

scheme

A string representing a predefined scheme. Available schemes are: “annovar.annotation”, “annovar.annotation.collapsed”, “annovar.annotation.collapsed2”, “tissue”, “sex”, “stage”, “risk”, “MSI”, “tumour”, “CNV”, “organism”

, “chromosome” and “biomolecule”

fill.colour

Value to enter when value of x not present in scheme.

include.names

Should the output be a named vector or not?

return.factor

Should factors (scheme names) be returned?

return.scheme

Should the scheme list be returned?

Details

The input character options for each colour scheme are as follows: annovar.annotation

annovar.annotation.collapsed

annovar.annotation.collapsed2

tissue

sex

stage

risk

MSI

tumour

CNV

organism

chromosome

biomolecule

clinicalt3

clinicalt9

gleason.score

gleason.sum

tissue.color

psa.categorical

age.categorical.default

age.categorical.prostate

age.gradient

psa.gradient

heteroplasmy

mt.annotation

isup.grade

Value

If multiple returns are requested, outputs a list (return.factor: factor length x with scheme names; scheme: list containing scheme names and colours; colours: vector length x with the required colours).

Author(s)

Nicholas Harding

Examples

annovar.output <- c('nonsynonymous snv', 'stopgain snv', 'none', 'stoploss snv', 
'frameshift deletion', 'frameshift substitution', 'splicing', 'none');
force.colour.scheme(annovar.output,'annovar.annotation');
force.colour.scheme(annovar.output,'annovar.annotation', 'white');

[Package BoutrosLab.plotting.general version 7.1.0 Index]