Learn R Programming

dartR (version 1.1.11)

gl.collapse.pval: Collapse a fixed distance matrix by amalgamating populations for which fixed differences are not significant

Description

This script takes the output from gl.collapse recursive and further collapses the fixed difference matrix based on the pvalue associated with each comparison. The results are subsets of populations (OTUs) for which diagnosability is non-significant. A recode table is generated applied to the genlight object to reflect the resultant OTUs.

Usage

gl.collapse.pval(fd, prefix = "fd.sig", delta = 0.02, reps = 1000,
  alpha = 0.05, v = 2)

Arguments

fd

-- name of the list of matricies output by gl.collapse.recursive run with test=TRUE [required]

prefix

-- a string to be used as a prefix in generating the matrix of fixed differences (stored to disk) and the recode table (also stored to disk) [default "fd_sig"]

delta

Default 0.02

reps

number of repetition. Default 1000.

alpha

-- significance level for test of false positives [default 0.05]

v

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

Value

A list containing the gl object x and the following square matricies [[1]] $gl -- the input genlight object; [[2]] $fd -- raw fixed differences; [[3]] $pcfd -- percent fixed differences; [[4]] $nobs -- mean no. of individuals used in each comparison; [[5]] $nloc -- total number of loci used in each comparison; [[6]] $expobs -- if test=TRUE, the expected count of false positives for each comparison [by simulation], otherwise NAs [[7]] $prob -- if test=TRUE, the significance of the count of fixed differences [by simulation], otherwise NAs

Details

The recode table and final distance matrix are stored to disk as csv files.