Learn R Programming

PopGenome (version 2.7.5)

detail.stats-methods: Several statistics

Description

This generic function calculates some mixed statistics.

Usage

# S4 method for GENOME
detail.stats(
	object,
	new.populations=FALSE,
	new.outgroup=FALSE,
	subsites=FALSE,
	biallelic.structure=FALSE,
	mismatch.distribution=FALSE,
	site.spectrum=TRUE,
        site.FST=FALSE
        )
# S4 method for 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. "intron": SNPs in intron regions. "coding": SNPs in coding regions (CDS). "utr": SNPs in UTR regions. "gene": SNPs in genes.

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.stats

the 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

0

population is polymorphic, the remaining individuals are polymorphic

1

population is polymorphic, the remaining individuals are monomorphic

2

population is monomorphic, the remaining individuals are polymorphic

3

population is monomorphic, the remaining individuals are monomorphic with the same value

4

population is monomorphic, the remaining individuals are monomorphic with different values

Examples

Run this code
# NOT RUN {
# 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