sv_amplicons2: Construct an AmpliconGraph from a BamViews object

View source: R/amplicon-utils.R

sv_amplicons2R Documentation

Construct an AmpliconGraph from a BamViews object

Description

This function constructs an AmpliconGraph from a BamViews object for a single sample. By default, the seeds of the graph are focal amplicons with fold-change of nearly 3 relative to the diploid genome (log2(2.75)). The threshold of seeding amplicons can be adjusted by the ampliconParams function. After seeding the graph with high-copy focal amplicons, both neighboring (flanking) and distant low-copy focal amplicons are added to the graph object. Next, improperly paired reads in which both the first and last read align to any queryRange of the graph object are parsed from the bam file ( this function will throw an error if not all files in bamPaths exist). If 5 or more improperly paired reads bridge a node to another node, these amplicons are grouped. Further, if a low-copy amplicon is bridged to an existing node, the low-copy amplicon will become a node in the graph. Amplicon groups are defined by the edges between nodes, where the edges represent improperly paired reads that support a junction between two amplicons.

Usage

sv_amplicons2(preprocess, amplicon_filters, params = ampliconParams())

Arguments

preprocess

a list of the preprocessed data (see preprocessData)

amplicon_filters

a GRanges object of germline filters. If this argument is not specified then a default set of germline filters will be used from the svfilters.hg19 package if the genome slot in preprocess is set to "hg19" or from the svfilters.hg18 package if it's set to "hg18".

params

a list of parameters for the amplicon analysis. Default parameters are given by AmpliconParams().

Value

an AmpliconGraph object

See Also

See ampliconParams for default parameters. The wrapper sv_amplicon_exp constructs and saves an AmpliconGraph for each sample in an experiment.

Examples

data(pdata)
pdata$bam.file <- system.file("extdata", "cgov44t_revised.bam",
                              package="svbams")
sv_amplicons2(pdata)

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