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. This function identifies loci with alleles that behave in this way, as putative sex specific SNP markers.
Usage
gl.report.sexlinked(
x,
sex = NULL,
t.het = 0.1,
t.hom = 0.1,
t.pres = 0.1,
plot.out = TRUE,
plot_theme = theme_dartR(),
plot_colors = three_colors,
verbose = NULL
)
Arguments
- x
Name of the genlight object containing the SNP or presence/absence (SilicoDArT) data [required].
- sex
Factor that defines the sex of individuals. See explanation in details [default NULL].
- t.het
Tolerance in the heterogametic sex, 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.1].
- t.hom
Tolerance in the homogametic sex, 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.1].
- t.pres
Tolerance in presence, 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.1].
- plot.out
Creates a plot that shows the heterozygosity of males and females at each loci and shaded area in which loci can be regarded as consistent with a sex specific marker [default TRUE].
- plot_theme
Theme for the plot. See Details for options [default theme_dartR()].
- plot_colors
List of three color names for the not sex-linked loci, for the sex-linked loci and for the area in which sex-linked loci appear [default three_colors].
- verbose
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default NULL, unless specified using gl.set.verbosity].
Details
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.
' Function's output
This function creates a plot that shows the heterozygosity of males and females at each loci or SNP data or percentage of present/absent in the case of SilicoDArT data.
Examples of other themes that can be used can be consulted in
See also
Other report functions:
gl.report.bases()
,
gl.report.callrate()
,
gl.report.diversity()
,
gl.report.hamming()
,
gl.report.heterozygosity()
,
gl.report.hwe()
,
gl.report.ld.map()
,
gl.report.locmetric()
,
gl.report.maf()
,
gl.report.monomorphs()
,
gl.report.overshoot()
,
gl.report.pa()
,
gl.report.parent.offspring()
,
gl.report.rdepth()
,
gl.report.reproducibility()
,
gl.report.secondaries()
,
gl.report.taglength()
Author
Arthur Georges, Bernd Gruber & Floriaan Devloo-Delva (Post to https://groups.google.com/d/forum/dartr)
Examples
# \donttest{
out <- gl.report.sexlinked(testset.gl)
#> Starting gl.report.sexlinked
#> Processing genlight object with SNP data
#> Warning: genlight object contains monomorphic loci
#>
#>
#> Starting gl.report.sexlinked
#>
#> Number of females: 114
#> Number of males: 120
#> Sex ratio females:(males+females): 0.49
#> No sex linked markers consistent with female
#> heterogamety (ZZ/ZW)
#> No sex linked markers consistent with male heterogamety
#> (XX/XY)
#>
#> Completed: gl.report.sexlinked
#>
out <- gl.report.sexlinked(testset.gs)
#> Starting gl.report.sexlinked
#> Processing genlight object with Presence/Absence (SilicoDArT) data
#> Warning: genlight object contains monomorphic loci
#>
#>
#> Starting gl.report.sexlinked
#>
#> No sex linked markers consistent with female
#> heterogamety (ZZ/ZW)
#> No sex linked markers consistent with male
#> heterogamety (XX/XY)
#>
#> Completed: gl.report.sexlinked
#>
# }
test <- gl.filter.callrate(platypus.gl)
#> Starting gl.filter.callrate
#> Processing genlight object with SNP data
#> Warning: data include loci that are scored NA across all individuals.
#> Consider filtering using gl <- gl.filter.allna(gl)
#> Warning: Data may include monomorphic loci in call rate
#> calculations for filtering
#> Recalculating Call Rate
#> Removing loci based on Call Rate, threshold = 0.95
#>
#> Completed: gl.filter.callrate
#>
test <- gl.filter.monomorphs(test)
#> Starting gl.filter.monomorphs
#> Processing genlight object with SNP data
#> Identifying monomorphic loci
#> Removing monomorphic loci and loci with all missing
#> data
#> Completed: gl.filter.monomorphs
#>
out <- gl.report.sexlinked(test)
#> Starting gl.report.sexlinked
#> Processing genlight object with SNP data
#>
#>
#> Starting gl.report.sexlinked
#>
#> Number of females: 40
#> Number of males: 40
#> Sex ratio females:(males+females): 0.5
#> No sex linked markers consistent with female
#> heterogamety (ZZ/ZW)
#> No sex linked markers consistent with male heterogamety
#> (XX/XY)
#>
#> Completed: gl.report.sexlinked
#>