Identify loci that are sex linked in specimens in a genlight adegenet object
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.filter.sexlinked( x, sex = NULL, filter = NULL, read.depth = 0, t.het = 0, t.hom = 0, t.pres = 0, plot = FALSE, verbose = NULL )
x |
– name of the genlight object containing the SNP data [required] |
sex |
– factor that defines the sex of individuals. See explanation above. |
filter |
– switch to either 'keep' sexlinked markers only from the genlight object or drop them. Default is NULL, so has to be specified. |
read.depth |
– additional filter option to keep only loci above a certain read.depth. Default to 0, which means read.depth is not taken into account. |
t.het |
– tolerance, that is t.het=0.05 means that 5% of the heterogametic sex can be homozygous and still be regarded as consistent with a sex specific marker [default 0] |
t.hom |
– tolerance, that is t.hom=0.05 means that 5% of the homogametic sex can be heterozygous and still be regarded as consistent with a sex specific marker [default 0] |
t.pres |
– tolerance, that is t.pres=0.05 means that a silicodart marker can be present in either of the sexes and still be regarded as a sex-linked marker. [default 0] |
plot |
– creates a plot that shows the heterozygosity of males and females at each loci. be regarded as consistent with a sex specific marker [default 0] |
verbose |
– verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2] |
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 can be provided via a factor (equal to the length of the number of individuals) or to be held in the variable x@other$ind.metrics$sex
.
Coding is: M for male, F for female, U or NA for unknown/missing. 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.
the filtered genlight object (filter="keep": sexlinked loci,filter="drop", everything except sexlinked loci).
Arthur Georges, Bernd Gruber & Floriaan Devloo-Delvan (Post to https://groups.google.com/d/forum/dartr)
cat("does not work yet") #result <- gl.sexlinkage(testset.gl)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.