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

utils.dist.binary

Calculate a distance matrix for individuals defined in an {adegenet} genlight object using binary P/A data (SilicoDArT)


Description

This script calculates various distances between individuals based on Tag Presence/Absence data. #'

The distance measure can be one of

simple – simple matching, both 1 or both 0 = 0; one 1 and the other 0 = 1. Presence and absence equally weighted. Jaccard – ignores matching 0, both 1 = 0; one 1 and the other 0 = 1. Absences could be for different reasons. Dice – both 0 = 0; both 1 = 2; one 1 and the other 0 = 1. Absences could be for different reasons. Sometimes called the Czekanowski or Sorensen distance. Phi – binary analogue of the Pearson Correlation coefficient.

One might choose to disregard or downweight absences in comparison with presences because the homology of absences is less clear (mutation at one or the other, or both restriction sites). Your call.

Usage

utils.dist.binary(x, method = "simple", verbose = NULL)

Arguments

x

– name of the genlight containing the SNP genotypes [required]

method

– Specify distance measure [simple]

verbose

– verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [2]

Value

An object of class 'dist' giving distances between individuals

Author(s)

Arthur Georges (Post to https://groups.google.com/d/forum/dartr)

Examples

D <- utils.dist.binary(testset.gs, method="Jaccard")

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.