S1_selection: Signatures of selection in S1 populations

View source: R/S1_selection.R

S1_selectionR Documentation

Signatures of selection in S1 populations

Description

Signatures of selection in S1 populations

Usage

S1_selection(data, alpha = 0.05)

Arguments

data

data frame with columns: marker, chrom, position, AA, AB, BB. Columns 4-6 have count data.

alpha

significance level

Details

Genotypes must be coded based on the S1 parental haplotypes, not markers.

The null hypothesis is no selection, in which case the expected frequency of genotypes is (AA = 1/4, AB = 1/2, BB = 1/4). Two alternate hypotheses are tested for gametic selection: 1.selection in one sex, 2.selection in both sexes. Two models of zygotic selection are also tested: 1.selection against one homozygote, 2.selection against both homozygotes. The selection coefficient equals the sum of the absolute differences between the observed and expected frequencies. Positive values correspond to selection against A or AA, negative values for selection against B or BB. For zygotic2, positive (negative) values represent selection against (for) homozygotes.

P-values are computed based on the likelihood ratio test; in other words, the change in deviance is assumed to be chi-squared distributed under the null hypothesis.

Value

list with "plot" and "table" of results:

model

name of best model

s

selection coefficient

score

-log10(p) value


jendelman/MapRtools documentation built on April 12, 2025, 12:46 p.m.