bpec.geoTree {BPEC}R Documentation

Phylogeographic GoogleEarth plot

Description

Given the output of an MCMC run, outputs phylogeographic code to show migration on a map through GoogleEarth.

Usage

bpec.geoTree(bpecout,file="GoogleEarthTree.kml")

Arguments

bpecout

R object from bpec.mcmc run

file

Filename for the .kml file to be created

Details

Additionally to the output variables, a .kml file is created which can be loaded into GoogleEarth.

Value

phy

Set of nodes and branches that can be loaded into bpec.phylo2GE()

geo

Set of haplotypes and locations that can be loaded into bpec.phylo2GE()

Note

bpec.phylo2GE uses the function curvy.R from the archived package R2G2 of Arrigo et al (2012).

Author(s)

Axel Hille

References

I. Manolopoulou, A. Hille, B.C.Emerson B (2020). BPEC: An R Package for Bayesian Phylogeographic and Ecological Clustering. Journal of Statistical Software, 92(3), 1-32. doi: 10.18637/jss.v092.i03

I. Manolopoulou and B.C. Emerson (2012). Phylogeographic ancestral inference using the coalescent model on haplotype trees. Journal of Computational Biology, 19(6), 745-755.

G. Valiente (2009). Combinational Pattern Matching Algorithms in Computational Biology Using Perl and R. CRC Press.

N. Arrigo, L.P. Albert, P.G. Mickelson and M.S. Barker (2012). Quantitative visualization of biological data in Google Earth using R2G2, an R CRAN package. Molecular Ecology Resources, 12(6), 1177-1179.

Examples

## Not run: 
#to use example dataset:
data(MacrocnemisRawSeqs)
data(MacrocnemisCoordsLocs)
coordsLocs <- MacrocnemisCoordsLocs
rawSeqs <- MacrocnemisRawSeqs

## to use your own dataset
# rawSeqs <- bpec.loadSeq('Haplotypes.nex')
# coordsLocs <- bpec.loadCoords("coordsLocsFile.txt")

## to set phenotypic/environmental covariate names manually, use (as appropriate)
# colnames(coordsLocs)[1:dims] <- c('lat','long','cov1','cov2','cov3')   
## where dims is the corresponding number of measurements available 
## (2 for latitude and longitude only, add one for each additional available measurement) 

#to run the MCMC sampler: 
bpecout <- bpec.mcmc(rawSeqs, coordsLocs, maxMig = 2, iter = 50, ds = 0, postSamples = 5, dims = 8)
bpec.Geo <- bpec.geoTree(bpecout, file = "GoogleEarthTree.kml")

## End(Not run)

[Package BPEC version 1.3.1 Index]