The script, having deleted individuals, optionally identifies resultant monomorphic loci or loci with all values missing and deletes them (using gl.filter.monomorphs.r). The script also optionally recalculates statistics made redundant by the deletion of individuals from the dataset.
The script returns a genlight object with the individuals deleted and, optionally, the recalculated locus metadata.
#' See more about data manipulation in the [tutorial](http://georges.biomatix.org/storage/app/media/uploaded-files/tutorial4dartrdatamanipulation22-dec-21-3.pdf).
Arguments
- x
Name of the genlight object containing SNP genotypes [required].
- ind.list
A list of individuals to be removed [required].
- recalc
Recalculate the locus metadata statistics [default FALSE].
- mono.rm
Remove monomorphic loci [default FALSE].
- verbose
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity].
See also
gl.keep.ind
to keep rather than drop specified
individuals
Author
Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr
Examples
# SNP data
gl2 <- gl.drop.ind(testset.gl,
ind.list=c('AA019073','AA004859'))
#> Starting gl.drop.ind
#> Processing genlight object with SNP data
#> Deleting specified individuals
#> Warning: Resultant dataset may contain monomorphic loci
#> Locus metrics not recalculated
#> Completed: gl.drop.ind
#>
gl2 <- gl.drop.ind(testset.gl,
ind.list=c('AA019073','AA004859'))
#> Starting gl.drop.ind
#> Processing genlight object with SNP data
#> Deleting specified individuals
#> Warning: Resultant dataset may contain monomorphic loci
#> Locus metrics not recalculated
#> Completed: gl.drop.ind
#>
# Tag P/A data
gs2 <- gl.drop.ind(testset.gs,
ind.list=c('AA020656','AA19077','AA004859'))
#> Starting gl.drop.ind
#> Processing genlight object with Presence/Absence (SilicoDArT) data
#> Warning: Listed individual AA004859 not present in the dataset -- ignored
#> Deleting specified individuals
#> Warning: Resultant dataset may contain monomorphic loci
#> Locus metrics not recalculated
#> Completed: gl.drop.ind
#>
gs2 <- gl.drop.ind(testset.gs, ind.list=c('AA020656'
,'AA19077','AA004859'),mono.rm=TRUE, recalc=TRUE)
#> Starting gl.drop.ind
#> Processing genlight object with Presence/Absence (SilicoDArT) data
#> Warning: Listed individual AA004859 not present in the dataset -- ignored
#> Deleting specified individuals
#> Deleting monomorphic loc
#> Recalculating locus metrics
#> Completed: gl.drop.ind
#>