sweeps.stats-methods | R Documentation |
This module calculates some statistics to detect selective sweeps.
## S4 method for signature 'GENOME' sweeps.stats(object,new.populations=FALSE,subsites=FALSE, freq.table=FALSE, FST=FALSE) ## S4 method for signature 'GENOME' get.sweeps(object)
object |
an object of class |
new.populations |
list of populations. default: |
subsites |
|
freq.table |
the frequency counts for the CLR test. |
FST |
use FST values instead of the minor allele frequencies |
The freq.table
contains the global sets of frequency counts.
It can be produced with the module detail.stats
.
The values in the slot GENOME.class@region.stats@minor.allele.frequencies
can be used to create this global set. (use the R function table
)
freq.table
is a list of length n.pops.
The return value is a modified object of class "GENOME"
————————————————————–
The following slots will be modified in the "GENOME"
object
————————————————————–
CL |
Composite Likelihood of SNPs |
CLR |
Nielsen's CLR test |
Cai JJ (2008) PGEToolbox: A Matlab toolbox for population genetics and evolution
Journal of Heredity Jul-Aug;99(4):438-40.doi:10.1093/jhered/esm127
Nielson, R. (2005). Genomic scans for selective sweeps using SNP data
Genome Res. 2005 15: 1566-1575
# Reading one alignment stored in the folder Aln # GENOME.class <- readData("\home\Aln") # # CL # GENOME.class <- sweeps.stats(GENOME.class) # GENOME.class@CL # # CLR # create global set # GENOME.class <- detail.stats(GENOME.class) # freq <- GENOME.class@region.stats@minor.allele.freqs[[1]] # freq.table <- list() # freq.table[[1]] <- table(freq) # define the region of interest # GENOME.class.split <- splitting.data(GENOME.class, positions= ...) # calculate CLR # GENOME.class.split <- sweeps.stats(GENOME.class.split, freq.table=freq.table) # GENOME.class@CLR
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.