Learn R Programming

PopGenome (version 1.2.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
        )
## 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 which are transitions. "transversions": SNPs which are transversions. "syn": synonymous sites. "nonsyn": nonsynonymous sites. "exon": SNPs in exon regions. "i
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

Value

  • returned value is an modified object of class "GENOME" -------------------------------------------------------------- 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,
  • 0pop is polymorph rest is polymorph
  • 1pop is polymorph rest is monomorph
  • 2pop is monomorph rest is polymorph
  • 3pop is monomorph rest is monomorph with same value
  • 4pop is monomorph rest is monomorph with different values

Examples

Run this code
# GENOME.class <- readData("\home\Alignments")
# GENOME.class
# GENOME.class <- detail.stats(GENOME.class)
# GENOME.class <- detail.stats(GENOME.class,list(1:7,8:12))
# 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