View source: R/amplicon-utils.R
addFocalDupsFlankingAmplicon | R Documentation |
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.
addFocalDupsFlankingAmplicon(object, rp, params)
object |
a |
rp |
a |
params |
a list of parameters for amplicon analyses |
REFACTORING: overly complicated with many abstractions. Needs an example to step through
ampliconParams
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.