annotate_fusion_calls: Function to annotate fusion calls

View source: R/annotate_fusion_calls.R

annotate_fusion_callsR Documentation

Function to annotate fusion calls

Description

Function to annotate fusion calls

Usage

annotate_fusion_calls(
  standardFusioncalls,
  geneListReferenceDataTab,
  fusionReferenceDataTab,
  checkReciprocal = TRUE
)

Arguments

standardFusioncalls

A dataframe from star fusion or arriba standardized to run through the filtering steps

geneListReferenceDataTab

A dataframe with column 1 as GeneName 2 source file 3 type; collapse to summarize type

fusionReferenceDataTab

A dataframe with column 1 as FusionName 2 source file 3 type; collapse to summarize type

checkReciprocal

Logical value to check if fusion also has reciprocal fusion in Sample, default to TRUE

Value

Standardized fusion calls annotated with gene list and fusion list provided in reference folder. If checkReciprocal ==TRUE reciprocal status of fusion is also provided .

Examples

# standardize
fusionfileArriba <- read_arriba_calls(
  system.file("extdata", "arriba_example.tsv", package = "annoFuseData")
)
fusionfileStarFusion <- read_starfusion_calls(
  system.file("extdata", "starfusion_example.tsv", package = "annoFuseData")
)
formattedArriba <- fusion_standardization(fusionfileArriba,
  caller = "ARRIBA",
  tumorID = "tumorID"
)
formattedStarFusion <- fusion_standardization(fusionfileStarFusion,
  caller = "STARFUSION",
  tumorID = "tumorID"
)
# merge standardized fusion calls
standardFusioncalls <- as.data.frame(rbind(formattedStarFusion, formattedArriba))
fusionQCFiltered <- fusion_filtering_QC(
  standardFusioncalls = standardFusioncalls,
  readingFrameFilter = "in-frame|frameshift|other",
  artifactFilter = "GTEx_Recurrent|DGD_PARALOGS|Normal|BodyMap|ConjoinG",
  junctionReadCountFilter = 1,
  spanningFragCountFilter = 10,
  readthroughFilter = TRUE
)
# annotated from gene and fusion refrence list
# read in gene and fusion reference tab
geneListReferenceDataTab <- read.delim(
  system.file("extdata", "genelistreference.txt", package = "annoFuseData"),
  stringsAsFactors = FALSE
)
# column 1 as FusionName 2 source file 3 type; collapse to summarize type
fusionReferenceDataTab <- read.delim(
  system.file("extdata", "fusionreference.txt", package = "annoFuseData"),
  stringsAsFactors = FALSE
)

filteredFusionAnnotated <- annotate_fusion_calls(
  standardFusioncalls = fusionQCFiltered,
  geneListReferenceDataTab = geneListReferenceDataTab,
  fusionReferenceDataTab = fusionReferenceDataTab,
  checkReciprocal = TRUE
)

d3b-center/annoFuse documentation built on Feb. 21, 2023, 1:06 a.m.