write_fusion_reference {chimeraviz} | R Documentation

## Write fusion junction sequence to a fasta file

### Description

This function will write the fusion sequence to a fasta file, using Biostring::writeXStringSet() .

### Usage

    write_fusion_reference(fusion, filename)

### Arguments

`fusion` | The Fusion object we want to create a fasta file from.
`filename` | The filename to write to.

### Value

Writes the fusion junction sequence to the given filename.

### Examples

    # Import the filtered defuse results
    defuse833keFiltered <- system.file(
      "extdata",
      "defuse_833ke_results.filtered.tsv",
      package="chimeraviz")
    fusions <- import_defuse(defuse833keFiltered, "hg19", 1)
    # Get a specific fusion
    fusion <- get_fusion_by_id(fusions, 5267)
    # Create temporary file to hold the fusion sequence
    fastaFileOut <- tempfile(pattern = "fusionSequence", tmpdir = tempdir())
    # Write fusion sequence to file
    write_fusion_reference(fusion, fastaFileOut)

[Package chimeraviz version 1.8.5 Index]