SegAnnotBasesC: SegAnnotBasesC

Description Usage Arguments Author(s) Examples

Description

C implementation of mapping bases to indices.

Usage

1
SegAnnotBasesC(y, base, starts, ends)

Arguments

y

The vector of observations to segment.

base

Position of each observation in base pairs.

starts

Starts of the 1-annotated regions in base pairs.

ends

Ends of the 1-annotated regions in base pairs.

Author(s)

Guillem Rigaill, Toby Dylan Hocking

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(SegAnnot)
data(profiles,package="SegAnnot")
if(interactive()){
  for(info in profiles){
    ann <- subset(info$ann, annotation=="1breakpoint")
    pro <- info$pro
    fit <- SegAnnotBases(pro$log, pro$pos, ann$min, ann$max)
    fitc <- SegAnnotBasesC(pro$log, pro$pos, ann$min, ann$max)
    for(must.be.equal in c("sR","eR","change","cost")){
      stopifnot(all(fit[[must.be.equal]] == fitc[[must.be.equal]]))
    }
  }
}

SegAnnot documentation built on May 2, 2019, 5:22 p.m.