ancfreq: ancfreq

View source: R/ancfreq.R

ancfreqR Documentation

ancfreq

Description

A function to calculate ancestral allele frequency based on two reference populations.

Usage

ancfreq(
  outputdir,
  inputdir_dip = "missing",
  pop1_dip = "missing",
  pop2_dip = "missing",
  inputdir_hap = "missing",
  pop1_hap = "missing",
  pop2_hap = "missing",
  mergetype = "union"
)

Arguments

outputdir

The dir to the output file. A postfix ('_dip','_hap','_merge') will be added.

inputdir_dip

The dir to a file containing diploid genotype likelihood data.

pop1_dip

A numeric vector specifying the index of reference population 1 for diploid data.

pop2_dip

A numeric vector specifying the index of reference population 2 for diploid data.

inputdir_hap

The dir to a file containing haploid genotype likelihood data.

pop1_hap

A numeric vector specifying the index of reference population 1 for haploid data.

pop2_hap

A numeric vector specifying the index of reference population 2 for haploid data.

mergetype

A parameter for merging type ("intersect","union","full_dip","full_hap")

Value

The output for ancfreq consists of a single line for each SNP. The first field shows the base position; the second to third fields show the estimated allele frequency for reference population 1 and 2; the third field shows the estimated difference in allele frequency in the two reference populations, the fourth to fifth fields show available individuals in reference population one and two.


lycium0605/rLCLAE documentation built on Aug. 28, 2024, 11:35 p.m.