qpfstats: Get smoothed f2-statistics

qpfstatsR Documentation

Get smoothed f2-statistics

Description

This function returns an array of (pseudo-) f2-statistics which are computed by taking into account other f2-, f3-, and f4-statistics. The advantage of doing that is that f3- and f4-statistics computed from these smoothed f2-statistics can be more accurate for populations with large amounts of missing data. The function uses SNPs which are missing in some populations in a manner which tends to introduce less bias than setting maxmiss to values greater than 0.

Usage

qpfstats(
  pref,
  pops,
  include_f2 = TRUE,
  include_f3 = TRUE,
  include_f4 = TRUE,
  verbose = TRUE
)

Arguments

pref

Prefix of genotype files

pops

Populations for which to compute f2-statistics

include_f2

Should f2-statistics be used to get smoothed f2-statistics? If include_f2 is a positive integer, it specifies how many randomly chosen f2-statistics should be used.

include_f3

Should f3-statistics be used to get smoothed f2-statistics? If include_f3 is a positive integer, it specifies how many randomly chosen f3-statistics should be used.

include_f4

Should f4-statistics be used to get smoothed f2-statistics? If include_f4 is a positive integer, it specifies how many randomly chosen f4-statistics should be used.

Value

A 3d-array of smoothed f2-statistics

Examples

## Not run: 
f2_blocks = qpfstats(geno_prefix, mypops)

## End(Not run)

uqrmaie1/admixtools documentation built on Nov. 3, 2024, 12:56 a.m.