haplotype.loci | R Documentation |
This function extracts haplotypes from phased genotypes.
## S3 method for class 'loci'
haplotype(x, locus = 1:2, quiet = FALSE, compress = TRUE,
check.phase = TRUE, ...)
## S3 method for class 'haplotype.loci'
plot(x, ...)
dist.haplotype.loci(x)
x |
an object of class |
locus |
a vector of integers giving the loci to analyse. |
quiet |
a logical value specifying whether to not print the
progress of the analysis ( |
compress |
by default only the unique haplotypes are returned
with their frequencies. If |
check.phase |
a logical value specifying whether to check if the individual genotypes are phased. |
... |
arguments passed to and from methods. |
The individuals with at least one unphased genotype are ignored with a warning.
dist.haplotype.loci
computes pairwise distances among
haplotypes by counting the number of different alleles.
Checking whether the genotypes are phased can be time consuming with
very big data sets. It may be useful to set check.phase = FALSE
if several analyses are done on the same data and no warning was
issued after the first scan, or you are sure that the genotypes are phased.
haplotype
returns a matrix of mode character with the loci as
rows and the haplotypes as columns. The attribute "freq"
gives
the counts of each haplotype and the class is "haplotype.loci"
.
dist.haplotype.loci
returns an object of class "dist"
.
haplotype
is a generic function with methods for objects of
class "DNAbin"
and of class "loci"
. Note that the class
returned by these methods is different: c("haplotype", "DNAbin")
and "haplotype.loci"
, respectively. This and other details are
likely to change in the future.
Emmanuel Paradis
haplotype
, LD
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.