subset.pyRAD.loci: Subsets a 'pyRAD.loci' object

Description Usage Arguments Details Value Author(s) See Also

View source: R/subset.pyRAD.loci.R

Description

This function returns a dataset (at this point, only in DNAStringSet format) from a pyRAD.loci object, subsetting by loci and taxa provided as arguments

Usage

1
2
3
4
5
6
7
## S3 method for class 'pyRAD.loci'
subset(x, loci = colnames(x$radSummary$inds.mat),
              taxa = row.names(x$radSummary$inds.mat),
		format = "DNAStringSet", reportInterval = 500, mins = 1,
		nucVarType = c("verystrict", "strict", "relaxed"),
		use.tidyName = FALSE,
		snpsOnly = FALSE, cores = 1, ...)

Arguments

x

an object of class pyRAD.loci

loci

a character vector of loci to include; defaults to all loci

taxa

a character vector of taxa to include; defaults to all taxa

format

format for DNA matrix; at this point, only DNAStringSet is supported

reportInterval

interval (number of loci) for reporting progress

mins

minimum number of individuals required to return locus data

nucVarType

nucleotide variability to consider in screening for polymorphism: 'relaxed' for all nucleotides, including ambiguities other than 'N', and counting all variable sites; 'strict' for only A,C,G,T, still counting all variable sites; and 'verystrict' for only A,C,G,T, countin only parsimony- informative sites.

use.tidyName

choose whether names are passed through tidyName

snpsOnly

choose whether you only want to get SNPs back, or whole locus sequences

cores

how many processing cores to use; if cores = 1, lapply is used throughout instead of mclapply

...

additional arguments passed to tidyName

Details

Probably it would make sense to wrap some of the functioning of gen.RAD.loci.datasets into this function, but for now they are separated.

Value

A list with values:

DNA

a list of datasets, one per locus, defined by format argument

variable

a boolean vector, indicating which loci are variable according to the criterion provided in arguments

ntaxa

an integer vector, indicating how many taxa are in each locus

Author(s)

Andrew Hipp

See Also

gen.RAD.loci.datasets, filter.by


RADami documentation built on May 30, 2017, 8:23 a.m.