RGB.pop: Transform genotype in RGB colors

Description Usage Arguments Examples

View source: R/MapTools.R

Description

This function aims to create a tri-polar heatmap. A tripolar heat map aims to indicate relatedness between populations.

Usage

1
RGB.pop(XX, pop, red, green, blue)

Arguments

XX

A binary datafram of genotypes, individuals as row and alleles as column

pop

A vector informing of population every sample belongs to

red, green, blue

A vector of alleles to put in a single color group

Examples

1
2
3
4
5
require(sp)
data(Leymus)
RGB.pop(Leymus,pop=Leypop,red=c("GreenExtra.160","GreenExtra.105","GreenExtra.176","Green1.188"),green=c("BlueExtra.127","Blue.add.128","BlueExtra.222","Blue.add.129","BlueExtra.182","BlueExtra.131") ,blue=c("Green1.120","GreenExtra.136","Green1.193","Green1.169","Green1.133"))->col.RGB
plot(west)
points(locations,col=rgb(col.RGB, max = 255) ,pch=16,cex=2)

giby/Linarius documentation built on May 14, 2017, 10:53 a.m.