sv_amplicons: Construct an AmpliconGraph from a BamViews object

View source: R/amplicon-utils.R

sv_ampliconsR 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_amplicons(bview, segs, amplicon_filters, params, transcripts)

Arguments

bview

a BamViews object

segs

a GRanges object of segments with log2 fold-changes consistent with amplification

amplicon_filters

a list of filters

params

a list of parameters for the amplicon analysis

transcripts

a GRanges object of transcripts

Details

REFACTORING: needs an example to step through. Perhaps an initial graph object and then keep updating the graph object and associated visualization with each step. Each of the low level functions in sv_deletions should be exported to more fully document this procedure.

See Also

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


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