add_fusion_reads_alignment: Add fusion reads alignment to fusion object

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

This function lets you add a fusion read alignment file to a fusion object. If you've mapped the reads supporting a fusion against the fusion junction sequence, and have the resulting bamfile, use this function to add the information (as a Gviz::GAlignmentPairs object) to the fusion object.

Usage

1
add_fusion_reads_alignment(fusion, bamfile)

Arguments

fusion

The fusion object to add a genomic alignment to.

bamfile

The bam file containing the fusion reads plotted to the fusion sequence.

Value

An updated fusion object with fusion@fusion_reads_alignment set.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Load data
defuse833ke <- system.file(
  "extdata",
  "defuse_833ke_results.filtered.tsv",
  package="chimeraviz")
fusions <- import_defuse(defuse833ke, "hg19", 1)
# Find the specific fusion we have aligned reads for
fusion <- get_fusion_by_id(fusions, 5267)
# Get reference to the bamfile with the alignment data
bamfile5267 <- system.file(
  "extdata",
  "5267readsAligned.bam",
  package="chimeraviz")
# Add the bam file of aligned fusion reads to the fusion object
fusion <- add_fusion_reads_alignment(fusion, bamfile5267)

chimeraviz documentation built on Jan. 19, 2021, 2 a.m.