Alleles unique to the Y or W chromosome and monomorphic on the X chromosomes will appear in the SNP dataset as genotypes that are heterozygotic in all individuals of the heterogametic sex and homozygous in all individuals of the homogametic sex.
gl.sexlinkage(x, t.het = 0, t.hom = 0, v = 2)
-- name of the genlight object containing the SNP data [required]
-- tolerance, that is tm=0.05 means that 5 be regarded as consistent with a sex specific marker [default 0]
-- tolerance, that is tf=0.05 means that 5 be regarded as consistent with a sex specific marker [default 0]
-- verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]
The list of sex specific loci
This script will identify loci with alleles that behave in this way, as putative sex specific SNP markers.
Sex of the individuals for which sex is known with certainty is to be held in the variable x@other$ind.metrics$sex, as M for male, F for female, NA otherwise. The script abbreviates the entries here to the first character. So coding of "Female" and "Male" works as well. Character are also converted to upper cases.
# NOT RUN {
result <- gl.sexlinkage(testset.gl)
# }
Run the code above in your browser using DataLab