The first element of the normalisation factors is assumed to be fixed and equal 1. The rest of normalisation factors (i.e. without the first one) are assumed as variable parameters for the likelihood function.

llnormFactors(par, pulseData)

Arguments

par

a named list with parameter values (including the size parameter for the negative binomial distribution, see dnbinom)

pulseData

a PulseData object

Value

a function with the following arguments:

  • x, a numeric vector which correspods to the records in pulseData$interSampleCoeffs, but without the first element, i.e. unlist(pulseData$interSampleCoeffs)[-1]

  • counts, a numeric matrix with read counts for every gene/isoform and for every sample

The created function returns a logarithm of the likelihood function calculated on the basis of the negative binomial distribution for the provided counts, normalisation factors and parameters.