Skip to contents

The script returns a genlight object with specified loci deleted.

#' See more about data manipulation in the [tutorial](http://georges.biomatix.org/storage/app/media/uploaded-files/tutorial4dartrdatamanipulation22-dec-21-3.pdf).

Usage

gl.drop.loc(x, loc.list = NULL, first = NULL, last = NULL, verbose = NULL)

Arguments

x

Name of the genlight object containing SNP genotypes or presence/absence data [required].

loc.list

A list of loci to be deleted [required, if loc.range not specified].

first

First of a range of loci to be deleted [required, if loc.list not specified].

last

Last of a range of loci to be deleted [if not specified, last locus in the dataset].

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].

Value

A genlight object with the reduced data.

See also

gl.keep.loc to keep rather than drop specified loci

Author

Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr

Examples

# SNP data
  gl2 <- gl.drop.loc(testset.gl, loc.list=c('100051468|42-A/T', '100049816-51-A/G'),verbose=3)
#> Starting gl.drop.loc 
#>   Processing genlight object with SNP data
#>   List of loci to drop has been specified
#>   Warning: Listed loci 100049687-12-C/T not present in the dataset -- ignored
#>   Deleting the specified loci
#>   Summary of recoded dataset
#>     Original No. of loci: 255 
#>     No. of loci deleted: 1 
#>     No. of loci retained: 254 
#> Completed: gl.drop.loc 
#> 
# Tag P/A data
  gs2 <- gl.drop.loc(testset.gs, loc.list=c('20134188','19249144'),verbose=3)
#> Starting gl.drop.loc 
#>   Processing genlight object with Presence/Absence (SilicoDArT) data
#>   List of loci to drop has been specified
#>   Deleting the specified loci
#>   Summary of recoded dataset
#>     Original No. of loci: 255 
#>     No. of loci deleted: 2 
#>     No. of loci retained: 253 
#> Completed: gl.drop.loc 
#>