joint_sfs: Joint site frequency spectrum

joint_sfsR Documentation

Joint site frequency spectrum

Description

This function computes the joint site frequency spectrum from genotype files or allele frequency and count matrices. The joint site frequency spectrum lists how often each combination of haplotypes is observed. The number of combinations is equal to the product of one plus the number of haplotypes in each population. For example, five populations with a single diploid individual each have 3^5 possible combinations.

Usage

joint_sfs(afs, pref = NULL)

Arguments

afs

A named list of length two where the first element (afs) contains the allele frequency matrix, and the second element (counts) contains the allele count matrix.

pref

Instead of afs, the prefix of genotype files can be provided.

Value

A data frame with the number of times each possible combination of allele counts is observed.

Examples

## Not run: 
dat = plink_to_afs('/my/plink/file', pops = c('pop1', 'pop2', 'pop3', 'pop4', 'pop5'))
joint_sfs(dat)

## End(Not run)

uqrmaie1/admixtools documentation built on April 25, 2024, 11:30 a.m.