Based on predefined colour schemes, returns a vector of corresponding colours.
force.colour.scheme.Rd
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?
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).
Details
The input character options for each colour scheme are as follows: annovar.annotation
nonsynonymous snv
stopgain snv
stoploss snv
frameshift deletion
frameshift substitution
splicing
synonymous snv
annovar.annotation.collapsed
nonsynonymous snv
stopgain snv
stoploss SNV
frameshift indel
splicing
annovar.annotation.collapsed2
nonsynonymous
stopgain-stoploss
splicing
frameshift indel
synonymous
utr5-utr3
nonframeshift indel
intronic
intergenic
other
tissue
cartilage
bone
adipose
bladder
kidney
blood
heart
muscle
hypothalamus
pituitary
thyroid
parathyroid
skin
salivarygland
esophagus
stomach
liver
gallbladder
pancreas
intestine
colon
pharynx
larynx
trachea
diaphragm
lung
nerve
spine
brain
eye
breast
ovary
uterus
prostate
testes
lymph
leukocyte
spleen
sex
male
female
stage
I
II
III
IV
risk
High
Low
MSI
MSI-High
MSI-Low
MSS
tumour
Primary
Metastatic
CNV
Amplification
Deletion
LOH
Neutral
organism
Human
Rat
Mouse
chromosome
1 - 22
X
Y
biomolecule
DNA
RNA
Protein
Carbohydrate
Lipid
clinicalt3
t0
t1
t2
t3
t4
t5
clinicalt9
t1a
t1b
t1c
t2a
t2b
t2c
t3a
t3b
t3c
gleason.score
3+3
3+4
4+4
4+5
3+5
5+3
5+4
5+5
missing
NA
gleason.sum
5
6
7
8
9
missing
NA
tissue.color
blood
frozen
ffpe
psa.categorical
0 - 9.9
10 - 19.9
>= 20
age.categorical.default
<50
50 - 60
60 - 70
>= 70
age.categorical.prostate
<40
40 - 50
50 - 65
65 - 70
>= 70
age.gradient
psa.gradient
heteroplasmy
0 - 0.2
0.2 - 0.4
0.4 - 0.6
0.6 - 1.0
mt.annotation
MT-DLOOP
MT-T*
MT-RNR*
MT-ND1
MT-ND2
MT-ND3
MT-ND4L
MT-ND4L/MT-ND4
MT-ND4
MT-ND5
MT-ND6
MT-CO1
MT-CO2
MT-CO3
MT-ATP6/MT-CO3
MT-ATP6
MT-ATP8/MT-ATP6
MT-ATP8
MT-CYB
MT-NC*
MT-OL*
isup.grade
1
2
3
4
5
Examples
annovar.output <- c('nonsynonymous snv', 'stopgain snv', 'none', 'stoploss snv',
'frameshift deletion', 'frameshift substitution', 'splicing', 'none');
force.colour.scheme(annovar.output,'annovar.annotation');
#> [1] "darkseagreen4" "orchid4" "slategrey" "darkturquoise"
#> [5] "darkorange" "darkorange4" "gold1" "slategrey"
force.colour.scheme(annovar.output,'annovar.annotation', 'white');
#> [1] "darkseagreen4" "orchid4" "white" "darkturquoise"
#> [5] "darkorange" "darkorange4" "gold1" "white"