hgdp: Human genome diversity panel - georeferenced data

hgdpR Documentation

Human genome diversity panel - georeferenced data

Description

The datasets hgdp and hgdpPlus provides genetic diversity several human populations worldwide. Both datasets are gData objects, interfaced with the gGraph object worldgraph.40k.

Format

hgdp is a gGraph object with the following data: %

%

@nodes.attr$habitat

habitat corresponding to each % vertice; currently 'land' or 'sea'.

%

@meta$color

a matrix assigning a color for plotting % vertices (second column) to different values of habitat (first % column).

%

Details

hgdp describes 52 populations from the original Human Genome Diversity Panel.

hgdpPlus describes hgdp populations plus 24 native American populations.

References

Authors Journal, YEAR, nb: pp-pp.

Examples


## check object
hgdp

## plotting the object
plot(hgdp)


## results from Handley et al.
## Not run: 
## Addis Ababa
addis <- list(lon = 38.74, lat = 9.03)
addis <- closestNode(worldgraph.40k, addis) # this takes a while

## shortest path from Addis Ababa
myPath <- dijkstraFrom(hgdp, addis)

## plot results
plot(worldgraph.40k, col = 0)
points(hgdp)
points(worldgraph.40k[addis], psize = 3, pch = "x", col = "black")
plot(myPath)

## correlations distance/genetic div.
geo.dist <- sapply(myPath[-length(myPath)], function(e) e$length)
gen.div <- getData(hgdp)[, "Genetic.Div"]
plot(gen.div ~ geo.dist)
lm1 <- lm(gen.div ~ geo.dist)
abline(lm1, col = "blue") # this regression is wrong
summary(lm1)

## End(Not run)


thibautjombart/geograph documentation built on Jan. 27, 2024, 10 p.m.