Learn R Programming

diemr (version 1.5.2)

unbiasedWeightedStateChoice: Select the weighted mode of genomic states

Description

Determines the most frequent genomic state in a given interval, weighted by Laplace-scaled probabilities.

Usage

unbiasedWeightedStateChoice(genomicStates, laplaceWeights)

Value

A character representing the most probable genomic state.

Arguments

genomicStates

A character vector of genomic states.

laplaceWeights

A numeric vector of weights.

Details

In case of ties, states are ranked by:

  1. Total sum of weights (higher is preferred).

  2. Highest single weight assigned to any occurrence of the state (higher is preferred).

  3. Lexicographic order (earlier in the alphabet is preferred).