This requires a working installation of qpDstat, which will be called using system

qpdstat_wrapper(
  pref,
  pop1,
  pop2 = NULL,
  pop3 = NULL,
  pop4 = NULL,
  bin = "~np29/o2bin/qpDstat",
  outdir = ".",
  parfile = NULL,
  f4mode = "YES",
  inbreed = "NO",
  printonly = FALSE,
  env = "",
  verbose = TRUE
)

Arguments

pref

Path to and prefix of the packedancestrymap genotype files

pop1

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 combinations to be tested. pop2, pop3, pop4 will be ignored.

  4. the location of a file (poplistname or popfilename) which specifies the populations or population combinations to be tested. pop2, pop3, pop4 will be ignored.

pop2

A vector of population labels

pop3

A vector of population labels

pop4

A vector of population labels

bin

Path to the qpDstat binary file

outdir

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

parfile

qpDstat parameter file. If this is specified, pop, pop2, pop3, and pop4 will be ignored.

f4mode

f4mode

inbreed

inbreed

printonly

Should the command be printed or executed?

env

Export environmental variables. See examples.

verbose

Print progress updates

Value

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

Examples

if (FALSE) {
pop1 = 'Denisova.DG'
pop2 = c('Altai_Neanderthal.DG', 'Vindija.DG')
pop3 = c('Chimp.REF', 'Mbuti.DG', 'Russia_Ust_Ishim.DG')
pop4 = 'Switzerland_Bichon.SG'
qpdstat_wrapper('genotype_prefix', pop1, pop2, pop3, pop4,
  bin = 'path/to/qpDstat', pref = 'path/to/packedancestrymap_prefix')
}