loglik_linesearch: Calculates the log likelihood of the data, given some...

Description Usage Arguments Value Author(s)

Description

Given the kmers, set of peaks and parameters, this returns the log likelihood.

Usage

1
2
loglik_linesearch(kmers_win, params, grad, alphas, peaks, win_size, chrom_loc,
  warp_ = NULL)

Arguments

kmers_win

is a vector of integers of any length representing kmers in a region

grad

is a vector of length equal to the total number of kmers, representing the gradient of the log likelihood at that point

alphas

is a vector of alphas, giving us the values for the line search, this will test loglik at params + alpha*grad for each alpha

peaks

is a matrix giving the locations of the peaks on the chromosome, the first column is starts, second is ends, inclusive, indexed from 1

win_size

is the length of the sliding window we are using

chrom_loc

is the position of the first kmer along the chromosome - this avoids indexing errors when splitting up the data //' @param warp is a vector of length as long as the kmer vector, with the multiplicative weights for how much to warp the entry

paras

is a vector of length equal to the total number of kmers

Value

A double, representing the log likelihood

Author(s)

Tom Mayo t.mayo@ed.ac.uk


TomMayo/kmermods documentation built on May 9, 2019, 4:53 p.m.