diversity.stats.between-methods: Diversities

diversity.stats.between-methodsR Documentation

Diversities

Description

A generic function to calculate nucleotide & haplotype diversities between populations (dxy).

Usage


## S4 method for signature 'GENOME'
diversity.stats.between(object,new.populations=FALSE,subsites=FALSE,keep.site.info=FALSE,
haplotype.mode=FALSE, nucleotide.mode=TRUE)

Arguments

object

An object of class "GENOME"

new.populations

list of populations. default=FALSE

subsites

"transitions": SNPs that are transitions.
"transversions": SNPs that are transversions.
"syn": synonymous sites.
"nonsyn": nonsynonymous sites.
"exon": SNPs in exon regions.
"intron": SNPs in intron regions.
"coding": SNPs in coding regions (CDS).
"utr": SNPs in UTR regions.
"gene": SNPs in genes.
"intergenic" : SNPs in intergenic regions.

keep.site.info

Store SNP specific values in the region.stats

haplotype.mode

Haplotype Diversities

nucleotide.mode

Nucleotide Diversities

Details

The nucleotide diversities have to be devided by GENOME.class@n.sites to give diversities per site.

Value

Returned value is a modified object of class "GENOME"

———————————————————
The following slots will be modified in the "GENOME" object
———————————————————

Slot Reference Description
1. nuc.diversity.between [1,3] Nucleotide diversity (between the population)
2. hap.diversity.between [1] Haplotype diversity (between the population)

References

[1] Hudson, R. R., M. Slatkin, and W.P. Maddison (1992). Estimating of levels of gene flow from DNA sequence data. Gentics 13(2),583-589

[2] Wakeley, J. (1996).The Variance of Pairwise Nucleotide Differences in Two Populations with Migration. THEORETICAL POPULATION BIOLOGY. 49, 39-57.

Examples


# GENOME.class <- readData("\home\Alignments")
# GENOME.class
# GENOME.class <- diversity.stats.between(GENOME.class)
# GENOME.class <- set.populations(GENOME.class, list(...))
# GENOME.class <- diversity.stats.between(GENOME.class)
# GENOME.class <- diversity.stats(GENOME.class,
# list(c("seq1","seq5","seq3"),c("seq2","seq8")))
# show the result:
# GENOME.class@nuc.diversity.within


pievos101/PopGenome documentation built on Feb. 24, 2023, 7:11 a.m.