Learn R Programming

PopGenome (version 2.1.6)

detail.stats-methods: Several statistics

Description

This generic function calculates some mixed statistics.

Usage

## S3 method for class 'GENOME':
detail.stats(
	object,
	new.populations=FALSE,
	new.outgroup=FALSE,
	subsites=FALSE,
	biallelic.structure=FALSE,
	mismatch.distribution=FALSE,
	site.spectrum=TRUE,
        site.FST=FALSE
        )
## S3 method for class 'GENOME':
get.detail(object, biallelic.structure=FALSE)

Arguments

object
an object of class "GENOME"
new.populations
list of populations.
new.outgroup
outgroup sequences.
subsites
"transitions": SNPs that are transitions. "transversions": SNPs that are transversions. "syn": synonymous sites. "nonsyn": nonsynonymous sites. "exon": SNPs in exon regions. "int
biallelic.structure
fixed and shared polymorphisms (stored in GENOME.class@region.stats).
mismatch.distribution
statistics based on mismatch distribution
site.spectrum
minor allele frequency of each SNP
site.FST
computes FST for each SNP

Value

  • The return value is a modified object of class "GENOME" ------------------------------------------------------------------ The following Slots will be modified in the "GENOME" object ------------------------------------------------------------------
  • MDSD...
  • MDG1...
  • MDG2...
  • region.statsthe slot biallelic.structure and minor.allele.freqs will be filled
  • The function get.detail(GENOME.class, biallelic.structure=TRUE) returns a matrix for each region, where
  • 0population is polymorphic, the remaining individuals are polymorphic
  • 1population is polymorphic, the remaining individuals are monomorphic
  • 2population is monomorphic, the remaining individuals are polymorphic
  • 3population is monomorphic, the remaining individuals are monomorphic with the same value
  • 4population is monomorphic, the remaining individuals are monomorphic with different values

Examples

Run this code
# GENOME.class <- readData("\home\Alignments")
# GENOME.class
# GENOME.class <- set.populations(GENOME.class,list(1:10))
# GENOME.class <- detail.stats(GENOME.class)
# show the result:
# mismatch.values   <- get.detail(GENOME.class)
# bial.struc.values <- get.detail(GENOME.class, biallelic.structure=TRUE)
# GENOME.class@region.stats@biallelic.structure
# GENOME.class@region.stats@biallelic.structure[[1]]

Run the code above in your browser using DataLab