extract_counts | R Documentation |
Prepare data for various ADMIXTOOLS 2 functions. This function reads data from genotype files,
and extracts data required to compute blocked f-statistics for any sets of samples. The data consists of
.rds
files with total and alternative allele counts for each individual, and products of total
and alternative allele counts for each pair.
The function calls packedancestrymap_to_afs
or plink_to_afs
and afs_to_f2_blocks
.
extract_counts(
pref,
outdir,
inds = NULL,
blgsize = 0.05,
maxmiss = 0,
minmaf = 0,
maxmaf = 0.5,
transitions = TRUE,
transversions = TRUE,
auto_only = TRUE,
keepsnps = NULL,
maxmem = 8000,
overwrite = FALSE,
format = NULL,
cols_per_chunk = NULL,
verbose = TRUE
)
pref |
Prefix of PLINK/EIGENSTRAT/PACKEDANCESTRYMAP files.
EIGENSTRAT/PACKEDANCESTRYMAP have to end in |
outdir |
Directory where data will be stored. |
inds |
Individuals for which data should be read. Defaults to all individuals |
blgsize |
SNP block size in Morgan. Default is 0.05 (5 cM). If |
maxmiss |
Discard SNPs which are missing in a fraction of individuals greater than |
minmaf |
Discard SNPs with minor allele frequency less than |
maxmaf |
Discard SNPs with minor allele frequency greater than than |
transitions |
Set this to |
transversions |
Set this to |
auto_only |
Keep only SNPs on chromosomes 1 to 22 |
keepsnps |
SNP IDs of SNPs to keep. Overrides other SNP filtering options |
maxmem |
Maximum amount of memory to be used. If the required amount of memory exceeds |
overwrite |
Overwrite existing files in |
format |
Supply this if the prefix can refer to genotype data in different formats
and you want to choose which one to read. Should be |
cols_per_chunk |
Number of genotype chunks to store on disk. Setting this to a positive integer makes the function slower, but requires less memory. The default value for |
verbose |
Print progress updates |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.