query.spacemix.map: Highlights specific samples in a geogenetic map

View source: R/space.mix.MCMC.R

query.spacemix.mapR Documentation

Highlights specific samples in a geogenetic map

Description

This function highlights the geogenetic locations and admixture source locations for a subset of the samples in a geogenetic map generated from a SpaceMix analysis. Users can specify the names of the samples to be highlighted, as well as whether they wish to visualize the sources of admixture for those samples. This function should be called after a a geogenetic map has already been plotted using make.spacemix.map

Usage

query.spacemix.map(focal.pops, spacemix.map.list, ellipses = TRUE,
  source.option = TRUE)

Arguments

focal.pops

This is a character vector specifying the names of the samples to be highlighted on the existing SpaceMix map.

spacemix.map.list

This is the name of the list produced using the function make.spacemix.map.list. This list should already be loaded into R's working memory.

ellipses

This option (TRUE or FALSE) specifies whether bivariate credible interval ellipses should be plotted for sample geogenetic locations and admixture source locations.

source.option

This option (TRUE or FALSE) specifies whether the sources of admixture for each sample will be plotted, with accompanying admixture arrows.

Value

This function highlights the geogenetic locations and admixture source locations for a specified subset of samples. The return value of this function is invisible.

Examples


#load example spacemix.map.list object
data(example.spacemix.map.list)

#make SpaceMix output map
#	without plotting admixture sources, and without sample names plotted
make.spacemix.map(example.spacemix.map.list,source=FALSE,text=FALSE)

#highlight two samples, without their admixture sources
 query.spacemix.map(focal.pops=c("Sample_9","Sample_23"),
					spacemix.map.list = example.spacemix.map.list,
					ellipses=TRUE,source.option=FALSE)

gbradburd/SpaceMix documentation built on Oct. 19, 2022, 12:43 p.m.