Function to calculate Nei's distance between two or more population
get.distance(
  population,
  type = "nei",
  marker = "all",
  per.marker = FALSE,
  gen1 = NULL,
  database1 = NULL,
  cohorts1 = NULL,
  id1 = NULL,
  gen2 = NULL,
  database2 = NULL,
  cohorts2 = NULL,
  id2 = NULL,
  database.list = NULL,
  gen.list = NULL,
  cohorts.list = NULL
)Population list
population list
Chose type of distance to compute (default: Neis standard genetic distance "nei"). Alt: Reynolds distance ("reynold"), Cavalli-Sforza ("cavalli"), Neis distance ("nei_distance"), Neis minimum distance ("nei_minimum")
Vector with SNPs to consider (Default: "all" - use of all markers)
Set to TRUE to return per marker statistics on genetic distances
Quick-insert for database (vector of all generations to consider)
First Groups of individuals to consider
Quick-insert for database (vector of names of cohorts to consider)
Individual IDs to search/collect in the database
Quick-insert for database (vector of all generations to consider)
Second Groups of individuals to consider
Quick-insert for database (vector of names of cohorts to consider)
Individual IDs to search/collect in the database
List of databases to consider (use when working with more than 2 populations)
Quick-insert for database (vector of all generations to consider)
Quick-insert for database (vector of names of cohorts to consider)
data(ex_pop)
get.distance(ex_pop, database1 = cbind(1,1), database2 = cbind(1,2))
Run the code above in your browser using DataLab