read.sync: Read Sync-File Format

Description Usage Arguments Value Author(s) See Also Examples

View source: R/loadaf.R

Description

Reads a synchronized file generated e.g. by the Popoolation2 software and extracts biallelic count data. Allele frequencies are polarized either by the minor or the rising allele.

Usage

1
read.sync(file, gen, repl, polarization = c("minor", "rising", "reference"), keepOnlyBiallelic = FALSE)

Arguments

file

the name of the file, which the data is to be read from.

gen

numeric vector specifying the number of generations for each population, see 'Details'.

repl

numeric vector defining how populations should be grouped by replicate, see 'Details'.

polarization

character determining, how allele frequencies should be polarized. If polarization = "minor" (default) allele counts are polarized for the minor allele. If polarization = "rising" or polarization = "reference" then allele counts are polarized for the rising or reference allele, respectively.

keepOnlyBiallelic

specifies if only polymorphic sites should be kept. Combining allele counts of all populations, monomorphic sites will always be removed. If keepOnlyBiallelic = FALSE (default), then also triallelic sites will be kept. Otherwise (keepOnlyBiallelic = TRUE), only biallelic sites will be kept.

Value

read.sync returns an object of class sync. Allelic information, allele frequencies and sequence coverages can be accessed with various functions including af.traj, af and coverage

Author(s)

Thomas Taus

See Also

alleles, polarization, af.traj, af and coverage

Examples

1
#MISSING

ThomasTaus/poolSeq documentation built on Feb. 17, 2020, 1:52 p.m.