fitSUMmodel: fitSUMmodel

View source: R/fitSUMmodel.R

fitSUMmodelR Documentation

fitSUMmodel

Description

A function to fit sumPH of the observed signal intensities

Usage

fitSUMmodel(
  y,
  x = NULL,
  niter = 10,
  delta = 1,
  restrictDeg = FALSE,
  model = "GA"
)

Arguments

y

Vector with sum peak heights (per loci)

x

Vector with fragment lengths (base pair) (only provided for degradation)

niter

Number of random samples

delta

Standard deviation of normal distribution when drawing random startpoints. Default is 1.

restrictDeg

Whether to restrict degradation param to be less than 1

model

Selected model for the signals (read/peak heights): "GA"=gamma,"NB"=negative binomial

Details

This function is used for fitting a regression model (Gamma or Negative binomial)

Value

Estimated parameters (mean,coefVar,slopePara)

Examples

## Not run: 
th = c(1000,0.3,0.6)
n = 100 #number of samples
x = seq(10,300,l=n)
x = (x-125)/100
y = rgamma(n,shape=2/th[2]^2*th[3]^x,scale=th[1]*th[2]^2)
plot(x,y)
fitSUMmodel(y,x,model="GA")
fitSUMmodel(y,x,model="NB")

## End(Not run)

oyvble/MPSproto documentation built on March 19, 2024, 5:32 a.m.