Output:
A list containing six elements: one table–with per-locus counts, Fisher’s exact test estimates, p-values and true/false columns for each type of sex-linked loci–and five genlight objects: one with autosomal loci, and one with each type of sex-linked loci.
Two sets of ‘before’ and ‘after’ plots: one set with female call rate plotted against male call rate with each data point representing one locus (one plot before and one plot after removing sex-linked loci identified by call rate). The other set with proportion of heterozygous females plotted against proportion of heterozygous males, and each point representing one locus (one plot before and one after removing sex-linked loci identified by heterozygosity).
Recommended use: In order to minimize the number of loci analysed by the function to speed computation time, it is advantageous to use the filter.sex.linked function after removing of secondary loci (i.e., those in the same sequenced fragment). This may not be needed when computation time is not a concern or the number of loci is small (i.e., ~50,000 SNPs), which will help identify sex-linked markers in species with short or little-differentiated sex chromosomes. Additionally, it is strongly recommended to use this function before other quality filters in order to ensure that (i) variation in call rate has not been truncated, and (ii) downstream filtering is done on autosomal loci only. When known-sex individuals are scarce, we recommend using 15 known-sex individuals of each sex to identify as many sex-linked loci as possible (even if few), then use those sex-linked loci to sex all individuals with functioninfer.sex , and then use the new sex assignments to identify the remaining sex-linked loci with function filter.sex.linked (see Results section 3).