refineBreakpoints: Refine breakpoints

Description Usage Arguments Details Value Examples

View source: R/getBreakpoints.R

Description

Refine breakpoints with confidence intervals from an initial estimate (from getBreakpoints).

Usage

1
2
refineBreakpoints(model, fragments, breakpoints = model$breakpoints,
  confint = 0.99)

Arguments

model

An aneuBiHMM object or a file that contains such an object.

fragments

A GRanges-class object with read fragments or a file that contains such an object.

breakpoints

A GRanges-class object with breakpoints and confidence intervals, as returned by function getBreakpoints.

confint

Desired confidence interval for breakpoints.

Details

Breakpoints are refined by shifting the breakpoint within its initial confidence interval read by read and maximizing the probability of observing the left-right read distribution.

Value

An aneuBiHMM with adjusted breakpoint coordinates and confidence interals, bins and segments.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Get an example BED file with single-cell-sequencing reads
bedfile <- system.file("extdata", "KK150311_VI_07.bam.bed.gz", package="AneuFinderData")
## Bin the data into bin size 1Mp
readfragments <- binReads(bedfile, assembly='mm10', binsize=1e6,
                  chromosomes=c(1:19,'X','Y'), reads.return=TRUE)
binned <- binReads(bedfile, assembly='mm10', binsize=1e6,
                  chromosomes=c(1:19,'X','Y'))
## Fit the Hidden Markov Model
model <- findCNVs.strandseq(binned[[1]])
## Add confidence intervals
breakpoints <- getBreakpoints(model, readfragments)
## Refine breakpoints
refined.model <- refineBreakpoints(model, readfragments, breakpoints)

AneuFinder documentation built on Nov. 8, 2020, 7:44 p.m.