Learn R Programming

kmeRtone (version 1.0)

calPWM: Calculate position weight matrix of overlapping sequences. Simulation of human population is based on single nucleotide variation.

Description

Calculate position weight matrix of overlapping sequences. Simulation of human population is based on single nucleotide variation.

Usage

calPWM(
  kmers,
  pseudo.num = 0,
  bg.prop = c(a = 0.295, c = 0.205, g = 0.205, t = 0.295),
  output = "PWM"
)

Value

A position count/probability/weight matrix.

Arguments

kmers

A vector of k-mers to overlap.

pseudo.num

Pseudo-number to avoid numerical instability due to lack of base at a position. Default is zero i.e. no pseudo-number.

bg.prop

Background proportion of bases. Default is c(a = 0.295, c = 0.205, g = 0.205, t = 0.295) which is observed in human genome.

output

Output matrix type. Options are PCM, PPM, and PWM which refer to position count/probability/weight matrix. Default is PWM.