View source: R/bayescan_inputs_pools.R
bayescan_inputs_pools | R Documentation |
bayescan
input filesGenerates an input file for Bayescan (Foll & Gaggiotti, 2008) from pooled allele frequencies.
bayescan_inputs_pools(
dat,
pool.info,
file.bayescan,
file.loci,
poolCol,
locusCol,
freqCol
)
dat |
Data table: The biallelic SNP data. Requires all of the following columns:
|
pool.info |
Data table: The population pool metadata. Requires all of the following columns:
|
file.bayescan |
Character: The name of the input file for |
file.loci |
Character: A file that contains an information about the locus ID in
the |
poolCol |
Character: Population pool ID. Default = |
locusCol |
Character: Locus ID. Default = |
freqCol |
Character: The reference allele frequency. Default = |
The allele counts in the Bayescan input file generated reflect the number of haploid genomes pooled. E.g. if 20 individuals were pooled, i.e. 40 genomes, and the Ref allele was estimated at a frequency of 0.7, the counts would be Ref=28 and Alt=12. NOTE: The estimated number of indivdiuals carrying an allele is rounded to nearest integer (e.g. 1.5 = 2, and 1.4 = 1), with the exception when the number of individauls is < 1 but > 0, in which it is always rounded to 1.
Foll & Gaggiotti (2008) A genome scan method to identify selected loci appropriate for both dominant and codominant markers: A Bayesian perspective. Genetics 180: 977-993.
library(genomalicious)
data(data_PoolFreqs)
data(data_PoolInfo)
bayescan_inputs_pools(dat=data_PoolFreqs,
pool.info=data_PoolInfo,
file.bayescan='Bayescan_input.txt',
file.loci='Bayescan_loci.txt',
poolCol='POOL',
locusCol='LOCUS',
freqCol='FREQ')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.