colorBySpecies: Assign colors by SpeciesID

Description Usage Arguments Details Value Author(s)

Description

Assigns unique colors by SpeciesID, for multi-species plotting.

Usage

1
2
colorBySpecies(speciesSet, palette = c("cyan", "springgreen", "gold", "hotpink"), 
	intergenic = NULL, intergenic.color = "brown")

Arguments

speciesSet

a vector of SpeciesIDs, or similar identifiers to factor on

palette

a vector of colors to choose from, at least as long as the levels of speciesSet

intergenic

an optional boolean condition, of the same length as speciesSet, that flags which IDs will be colored as 'intergenic'

intergenic.color

the color for 'intergenic'

Details

a utility for coloring features of multi-species images, like chromosome or gene pie and bar charts. Lets the speciesID of each feature be color coded without explicitly naming them.

Value

a LIST, with

colors

a vector of colors of the same length as speciesSet

legend.colors

a named vector of the unique colors and their SpeciesIDs, for use in figure legends

Author(s)

Bob Morrison


robertdouglasmorrison/DuffyTools documentation built on Dec. 7, 2018, 8:02 a.m.