reduce_to_events: Reduce chiasmata vector to crossovers that this gamete...

Description Usage Arguments Details Value

View source: R/utility_Functions.R

Description

For internal use.

Usage

1
reduce_to_events(gamete_haplo, chias_locations)

Arguments

gamete_haplo

Numeric vector. The inherited haplotype.

chias_locations

Numeric vector. Chiasmata locations.

Details

For example, if coded allele vector was c(1, 1, 2), then this gamete did not participate in the first crossover, hence the list of chiasmata event locations, say c(40, 80), would be reduced to c(80), and the coded allele vector would be reduced to c(1, 2). That is, there is only one crossover from haplotype 1 to 2 at position 80.

We don't actually return the coded vector at this point. We only need the code for the first haplotype, after applying this function every crossover will be meaningful. That is the coded vector will never contain repeats after this function runs.

Value

The locations of crossovers


SimRVSequences documentation built on July 1, 2020, 6:03 p.m.