calculate_LD: Calculate LD statistics

Description Usage Arguments Value Author(s) Examples

Description

This function calculates two matrices, once containing all pairwise LD values, one containing all pairwise r statistics

Usage

1
2
calculate_LD(pop, sampled_individuals,
                    number_of_markers, random_markers)

Arguments

pop

Focal population

sampled_individuals

Number of individuals randomly sampled to calculate the LD matrices

number_of_markers

Number of markers used to calculate the LD matrices

random_markers

If TRUE, markers are randomly spaced along the chromosome, if FALSE, markers are equidistantly spaced along the chromosome.

Value

An object containing two items:

LD_matrix

Pairwise LD statistics for all markers

rsq_matrix

Pairwise rsq statistics for all markers

Author(s)

Thijs Janzen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
  wildpop =  create_population(pop_size = 100,
                             number_of_founders = 10,
                             total_runtime = 1000,
                             morgan = 1,
                             seed = 42,
                             write_to_file = FALSE)

  LD_results <- calculate_LD(wildpop,
                                    number_of_markers = 10,
                                    random_markers = TRUE)
  
## End(Not run)

thijsjanzen/isoSIM documentation built on May 29, 2019, 10:39 a.m.