addFocalDupsFlankingAmplicon: Add focal amplicons that flank an amplicon seed

View source: R/amplicon-utils.R

addFocalDupsFlankingAmpliconR Documentation

Add focal amplicons that flank an amplicon seed

Description

Amplicons selected to seed a graph have a fold change of at least log2(2.75), or nearly 3-fold the diploid genome. Lower-copy amplicons flanking the seed amplicons are added to the graph if they have a fold change of at least log2(1.75), or nearly 2-fold the diploid genome. To assess whether a low-copy amplicon is 'flanking' an amplicon seed, all read pairs that aligned to the amplicon seeds (see get_readpairs) are passed to this function in object rp. The read pairs are converted to segments by readPairsAsSegments and an assessment of whether flanking duplications are linked is given by linkedDuplicatedRanges. In particular, this function checks whether there are at least minimum_count fragments that connect the amplicon seeds to the flanking regions. Finally, the flanks are added to the graph by the addFlanks function.

Usage

addFocalDupsFlankingAmplicon(object, rp, params)

Arguments

object

a AmpliconGraph

rp

a GAlignmentPairs object

params

a list of parameters for amplicon analyses

Details

REFACTORING: overly complicated with many abstractions. Needs an example to step through

See Also

ampliconParams

Examples

## Not run: 
  path <- file.path(system.file(package="trellis"), "tests/testthat")
  ag <- readRDS(file.path(path, "addFocalDups.ffab104.rds"))
  params <- ampliconParams()
  ag <- addFocalDupsFlankingAmplicon(ag, rp, params)

## End(Not run)

cancer-genomics/trellis documentation built on Aug. 20, 2024, 5:48 p.m.