write_f2: Write blocked f2 estimates to disk

View source: R/io.R

write_f2R Documentation

Write blocked f2 estimates to disk

Description

This function takes 3d arrays of blocked f2, allele frequency products, and counts, splits them by population pair, and writes each pair to a separate .rds file under {outdir}/{pop1}/{pop2}.rds.

Usage

write_f2(est_arr, count_arr, outdir, id = "f2", overwrite = FALSE)

Arguments

est_arr

A 3d array with blocked f2, allele frequency products, or fst estimates for each population pair. The first two dimensions of each array have to have population names.

count_arr

A 3d array of the same dimension with counts

outdir

Directory where data will be stored

id

Postfix showing the type of statistic ("f2", "ap", or "fst")

overwrite

Overwrite existing files in outdir

See Also

read_f2

Examples

## Not run: 
write_f2(f2_arr, count_arr, outdir = 'path/to/f2stats/')

## End(Not run)

uqrmaie1/admixtools documentation built on July 25, 2024, 2:13 p.m.