qp3pop_wrapper: Wrapper function around the original qp3Pop program

View source: R/wrappers.R

qp3pop_wrapperR Documentation

Wrapper function around the original qp3Pop program

Description

Computes f3 statistics of the form f3(A; B, C). Equivalent to (f2(A, B) + f2(A, C) - f2(B, C)) / 2 and to f4(A, B; A, C). Requires a working installation of qp3Pop, which will be called using system

Usage

qp3pop_wrapper(
  pref,
  source1,
  source2 = NULL,
  target = NULL,
  bin = "~np29/o2bin/qp3Pop",
  outdir = ".",
  parfile = NULL,
  inbreed = "NO",
  outgroupmode = "NO",
  printonly = FALSE,
  env = "",
  verbose = TRUE
)

Arguments

pref

Path to and prefix of the packedancestrymap genotype files

source1

One of the following four:

  1. NULL: Populations will be read from poplistname or popfilename specified in parfile

  2. A vector of population labels

  3. A data frame in which the first four columns specify the population triples to be tested. source2, target will be ignored.

  4. The location of a file (poplistname or popfilename) which specifies the populations or population combinations to be tested. source2 and target will be ignored.

source2

A vector of population labels

target

A vector of population labels

bin

Path to the qp3Pop binary file

outdir

Output directory. files out, parfile, poplistname, popfilename may be overwritten

parfile

qp3Pop parameter file. If this is specified, source1, source2, target will be ignored.

inbreed

inbreed

outgroupmode

outgroupmode

printonly

Should the command be printed or executed?

env

Export environmental variables. See examples.

verbose

Print progress updates

Value

If printonly, the qp3Pop command, otherwise a data frame with parsed qp3Pop output

Examples

## Not run: 
source1 = c('Altai_Neanderthal.DG', 'Vindija.DG')
source2 = c('Chimp.REF', 'Mbuti.DG', 'Russia_Ust_Ishim.DG')
target = 'Denisova.DG'
qp3pop_wrapper('genotype_prefix', source1, source2, target,
  bin = 'path/to/qp3Pop')

## End(Not run)

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