gl.infer.sex {dartR.sexlinked}R Documentation

Uses sex-linked loci to infer sex of individuals

Description

This function uses the output of function gl.keep.sexlinked (list of 5 elements) to infer the sex of all individuals in the dataset. It uses 3 types of sex-linked loci (W-/Y-linked, Z-/X-linked, and gametologs), assigns a preliminary genetic sex for each type of sex-linked loci available, and outputs an agreed sex.

This function produces as output a dataframe with individuals in rows and 11 columns.

Usage

gl.infer.sex(gl_sexlinked, system = NULL, seed = NULL)

Arguments

gl_sexlinked

The output of function gl.keep.sexlinked (complete list with 5 elements). See explanation in "Details" section [required].

system

String that declares the sex-determination system of the species: 'zw' or 'xy' [required].

seed

User-defined integer for repeatability purposes. If not provided by user, it is chosen randomly by default. See "Details" section.

Details

Parameter gl_sexlinked must be the name of the output object (a list of 5 elements) produced by function gl.keep.sexlinked. Parameter seed must be an integer that will be used on the KMeans algorithm used by the function. We highly recommend choosing the seed to guarantee repeatability.

Note that this function was created with the explicit intent that a human checks the evidence for the sex assignments that do NOT agree for all types of sex-linked loci (called "indefinite sex assignments" and denoted as "*M" or "*F" in the last column of dataframe output). This human can then use their criterion to validate these assignments.

Function's output

This function creates a dataframe with one row per individual and 11 columns:

Value

A dataframe.

Author(s)

Custodian: Diana Robledo-Ruiz – Post to https://groups.google.com/d/forum/dartr

References

Examples

LBP_sexLinked <- gl.keep.sexlinked(x = LBP, system = "xy", plot.display = TRUE, ncores = 1)
inferred.sexes <- gl.infer.sex(gl_sexlinked = LBP_sexLinked, system = "xy", seed = 100)
inferred.sexes


[Package dartR.sexlinked version 1.0.5 Index]