genepop_allelefreq: Explore population specific allele frequencies.

View source: R/genepop_allelefreq.R

genepop_allelefreqR Documentation

Explore population specific allele frequencies.

Description

Function returns population derived Major allele frequency (default) or full panel allele frequencies.

Usage

genepop_allelefreq(genepop, popgroup = NULL, wide = FALSE,
  fullpanel = FALSE)

Arguments

genepop

the genepop data to be manipulated. This can be either a file path or a dataframe read in with tab separation, header=FALSE , quote="", and stringsAsFactors=FALSE. This will be the standard genepop format with the first n+1 rows corresponding to the n loci names, or a single comma delimited row of loci names followed by the locus data. Populations are separated by "Pop". Each individual ID is linked to the locus data by " , " (space, space space) and is read in as as a single row (character).

popgroup

population grouping using the "Pop" deliminiter (Default: NULL) or a dataframe or path to a csv. The grouping dataframe should have two columns, the first corresponding to the population name and the second to an aggregation vector of common groups. Each population can only be assigned to one group.

wide

logical specifying whether the allele frequencies should be returned as long (default:FALSE) or wide (TRUE) format. Note that the wide format can be used as the input for alleleotype_genepop to simulate geneotypes.

fullpanel

(default: FALSE) a logical parameter specifying whether allele frequencies for all loci by population should be retured.


rystanley/genepopedit documentation built on June 14, 2024, 5:34 p.m.