bpec.geoTree: Phylogeographic GoogleEarth plot

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/bpec.phylo2GE.R

Description

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

Usage

1
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 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## 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)

BPEC documentation built on Aug. 30, 2018, 1:03 a.m.