getBreakpoints: Extract breakpoints

View source: R/getBreakpoints.R

getBreakpointsR Documentation

Extract breakpoints

Description

Extract breakpoints with confidence intervals from an aneuHMM or aneuBiHMM object.

Usage

getBreakpoints(model, fragments = NULL, confint = 0.99)

Arguments

model

An aneuHMM or 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.

confint

Desired confidence interval for breakpoints. Set confint=NULL to disable confidence interval estimation.

Details

Confidence intervals for breakpoints are estimated by going outwards from the breakpoint read by read, and performing a test of getting the observed or a more extreme outcome, given that the reads within the confidence interval belong to the other side of the breakpoint.

Value

A GRanges-class with breakpoint coordinates and confidence interals if fragments was specified.

Examples

## 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)


ataudt/aneufinder documentation built on April 18, 2023, 4:20 a.m.