sharedLoci: Shared Loci

Description Usage Arguments Value Note Author(s) Examples

Description

Calculate proportion of alleles and number of loci shared between pairs of individuals or strata.

Usage

1
2
3
4
5
propSharedLoci(g, type = c("strata", "ids"), num.cores = NULL)

sharedAlleles(g, smry = c("num", "which"))

.propSharedIds(ids, gt)

Arguments

g

a gtypes object.

type

a character vector determining type of pairwise comparsion. Can be "strata" for strata or "ids" for individuals.

num.cores

number of CPU cores to use. Defaults to the number reported by detectCores - 1.

smry

a character vector determining type of summary for sharedAlleles. "which" returns the names of the alleles shared. "num" returns the number of alleles shared.

ids

character vector of two sample ids to compare.

gt

array of genotypes generated by as.array.gtypes.

gt

genotypes array resulting from a call to as.array(g)

Value

data.frame summary of pairwise shared loci.

Note

If g is a haploid object with sequences, make sure to run labelHaplotypes if sequences aren't already grouped by haplotype.

Author(s)

Eric Archer eric.archer@noaa.gov

Examples

1
2
3
4
5
6
7
8
9
data(msats.g)
msats.g <- stratify(msats.g, "fine")

sharedAlleles(msats.g)

## Not run: 
propSharedLoci(msats.g, num.cores = 2)

## End(Not run)


strataG documentation built on May 19, 2017, 10:07 a.m.
Search within the strataG package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.