genotypes.pyRAD.loci: Generates genotypes from a 'subset.pyRAD.loci' object

Description Usage Arguments Details Value Author(s) See Also

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

Description

Makes a dataframe of SNP calls from a pyRAD.loci object for export to hierfstat

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
genotypes.pyRAD.loci(dat, groups, loci = 'all', taxa = 'all',
	        useSnps = c('first', 'all'), concat = c(FALSE, TRUE),
					use.tidyName = FALSE,
					na.rm = c('none', 'columns', 'rows'),
					maxAlleles = 2,
					tidyVals = c('-', '.','>', '_', ' '),
					sortByGroups = TRUE,
					variable.only = FALSE, make.dummy.column = TRUE,
					alleleDigits = 1,
					toInteger = TRUE, missingData = "00",
					cores = 1)

Arguments

dat

an object of class subset.pyRAD.loci

groups

a list of vectors, each vector designating a set of individuals to count for each group

loci

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

taxa

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

useSnps

whether to use the first SNP in each locus or all

concat

boolean: whether to concatenate SNPs or return by locus

use.tidyName

choose whether or not to use tidyName when matching names

na.rm

whether to remove missin data by columns, by rows, or not at all

maxAlleles

maximum number of alleles per locus

tidyVals

characters to be stripped out by tidyName, if using

sortByGroups

boolean: whether to sort snps by groups

variable.only

boolean: whether to keep only variable sites

make.dummy.column

boolean: whether to add a dummy column when there is only one SNP (currently added as a work-around for wc)

alleleDigits

how many digits per allele

toInteger

boolean: whether to return SNPs as integers

missingData

string to use for missing data

cores

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

Details

current not tightly integrated with hierfstat, but designed to be used by it

Value

data.frame of genotypes

Author(s)

Andrew Hipp

See Also

subset.pyRAD.loci


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