Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gl.report.ld

Calculates pairwise population based Linkage Disequilibirum across all loci using the specifyied number of cores


Description

this function is implemented in a parallel fashion to speed up the process. There is also the ability to restart the function if crashed by specifying the chunkfile names or restarting the function exactly in the same way as in the first run. This is implemented as sometimes due to connectivity loss between cores the function my crash half way. Also remove loci with have only missing value before running the function.

Usage

gl.report.ld(
  x,
  name = NULL,
  save = TRUE,
  outpath = tempdir(),
  nchunks = 2,
  ncores = 1,
  chunkname = NULL,
  probar = FALSE,
  verbose = NULL
)

Arguments

x

a genlight or genind object created (genlight objects are internally converted via gl2gi to genind)

name

character string for rdata file. If not given genind object name is used

save

switch if results are saved in a file

outpath

folder where chunks and results are saved (if save=TRUE). Default it tempdir()

nchunks

how many subchunks will be used (the less the faster, but if the routine crashes more bits are lost

ncores

how many cores should be used

chunkname

the name of the chunks for saving [default is NULL]

probar

if TRUE, a progress bar is displayed for long loops [default = TRUE]

verbose

– verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity]

Value

returns calculation of pairwise LD across all loci between subpopulation. This functions uses if specified many cores on your computer to speed up. And if save is used can restart (if save=TRUE is used) with the same command starting where it crashed. The final output is a data frame that holds all statistics of pairwise LD between loci. (See ?LD in package genetics for details).

Author(s)


dartR

Importing and Analysing SNP and Silicodart Data Generated by Genome-Wide Restriction Fragment Analysis

v1.9.6
GPL-2
Authors
Bernd Gruber [aut, cre], Arthur Georges [aut], Jose L. Mijangos [aut], Peter J. Unmack [ctb], Oliver Berry [ctb], Lindsay V. Clark [ctb], Floriaan Devloo-Delva [ctb]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.