id_recombination_events: Identify crossover points from state sequences and snp...

Description Usage Arguments Value Author(s) See Also Examples

Description

This is a simple function that takes a vector of parental states along a chromosome and identifies where states have changed.

Usage

1
id_recombination_events(snps_genotypes_df)

Arguments

snps_genotypes_df

a data.frame with two columns:

  • snps a vector of ordered snp locations (in bps)

  • states a vector of corresponding inferred states, either haploid (2 states = 0 or 1) or diploid with three states possible (0,1,2)

Value

a data.frame containing the midpoint between focal snp i and snp i-1 and whether their states were the same (0) or different (1).

Author(s)

Tyler D. Hether

See Also

fb_haploid, fb_diploid

Examples

1
2
3
df <- data.frame(snps=100*(1:10),
   states=c(rep(0,4), rep(1,6)))
id_recombination_events(df)

tylerhether/HMMancestry documentation built on May 3, 2019, 1:53 p.m.