Filters monomorphic loci, including those with all NAs
Source:R/gl.filter.monomorphs.r
gl.filter.monomorphs.Rd
This script deletes monomorphic loci from a genlight {adegenet} object
A DArT dataset will not have monomorphic loci, but they can arise, along with loci that are scored all NA, when populations or individuals are deleted.
Retaining monomorphic loci unnecessarily increases the size of the dataset and will affect some calculations.
Note that for SNP data, NAs likely represent null alleles; in tag presence/absence data, NAs represent missing values (presence/absence could not be reliably scored)
See also
Other filter functions:
gl.filter.allna()
,
gl.filter.callrate()
,
gl.filter.heterozygosity()
,
gl.filter.hwe()
,
gl.filter.ld()
,
gl.filter.locmetric()
,
gl.filter.maf()
,
gl.filter.overshoot()
,
gl.filter.pa()
,
gl.filter.parent.offspring()
,
gl.filter.rdepth()
,
gl.filter.reproducibility()
,
gl.filter.secondaries()
,
gl.filter.sexlinked()
,
gl.filter.taglength()
Author
Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr
Examples
# SNP data
result <- gl.filter.monomorphs(testset.gl, verbose=3)
#> Starting gl.filter.monomorphs
#> Processing genlight object with SNP data
#> Identifying monomorphic loci
#> Removing monomorphic loci and loci with all missing
#> data
#> Original No. of loci: 255
#> Monomorphic loci: 144
#> Loci scored all NA: 0
#> No. of loci deleted: 144
#> No. of loci retained: 111
#> No. of individuals: 250
#> No. of populations: 30
#> Completed: gl.filter.monomorphs
#>
# Tag P/A data
result <- gl.filter.monomorphs(testset.gs, verbose=3)
#> Starting gl.filter.monomorphs
#> Processing genlight object with Presence/Absence (SilicoDArT) data
#> Identifying monomorphic loci
#> Removing monomorphic loci and loci with all missing
#> data
#> Original No. of loci: 255
#> Monomorphic loci: 41
#> Loci scored all NA: 0
#> No. of loci deleted: 41
#> No. of loci retained: 214
#> No. of individuals: 218
#> No. of populations: 29
#> Completed: gl.filter.monomorphs
#>