get.distance {MoBPS} | R Documentation |
Calculate Nei distance between two or more population
Description
Function to calculate Nei's distance between two or more population
Usage
get.distance(
population,
type = "nei",
marker = "all",
per.marker = FALSE,
gen1 = NULL,
database1 = NULL,
cohorts1 = NULL,
gen2 = NULL,
database2 = NULL,
cohorts2 = NULL,
database.list = NULL,
gen.list = NULL,
cohorts.list = NULL
)
Arguments
population |
population list |
type |
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") |
marker |
Vector with SNPs to consider (Default: "all" - use of all markers) |
per.marker |
Set to TRUE to return per marker statistics on genetic distances |
gen1 |
Quick-insert for database (vector of all generations to consider) |
database1 |
First Groups of individuals to consider |
cohorts1 |
Quick-insert for database (vector of names of cohorts to consider) |
gen2 |
Quick-insert for database (vector of all generations to consider) |
database2 |
Second Groups of individuals to consider |
cohorts2 |
Quick-insert for database (vector of names of cohorts to consider) |
database.list |
List of databases to consider (use when working with more than 2 populations) |
gen.list |
Quick-insert for database (vector of all generations to consider) |
cohorts.list |
Quick-insert for database (vector of names of cohorts to consider) |
Value
Population list
Examples
data(ex_pop)
get.distance(ex_pop, database1 = cbind(1,1), database2 = cbind(1,2))