potentialImpactAnnotations: Additional result annotations

potentialImpactAnnotationsR Documentation

Additional result annotations

Description

These functions work on the result table and add additional annotations to the reported introns: the type of potential impact on splicing (e.g. exon skipping, exon truncation, ...), potential occurence of frameshift, overlap with UTR regions as well as a flag for introns that are located in blacklist regions of the genome.

annotateIntronReferenceOverlap adds basic annotations to the fds for each intron based on the overlap of the intron's location with the reference annotation. Has to be run before the result table is created so that the new column can be included in it (see examples).

annotatePotentialImpact annotates each intron in the results table with the type of potential impact on splicing and potential occurence of frameshift (likely, unlikely, inconclusive). Can also calculate overlap with annotated UTR regions. Potential impact can be: annotatedIntron_increasedUsage, annotatedIntron_reducedUsage, exonTruncation, exonElongation, exonTruncation&Elongation, exonSkipping, splicingBeyondGene, multigenicSplicing, downstreamOfNearestGene, upstreamOfNearestGene, complex (everything else). Splice sites (theta metric) annotations indicate how the splice site is located with respect to the reference annotation. The annotated types are: annotatedSpliceSite, exonicRegion, intronicRegion.

flagBlacklistRegions flags introns in the results table on whether or not they are located in a blacklist region of the genome. By default, the blacklist regions as reported in Amemiya, Kundaje & Boyle (2019) and downloaded from here are used.

Usage

annotateIntronReferenceOverlap(fds, txdb, BPPARAM = bpparam())

annotatePotentialImpact(
  result,
  txdb,
  fds,
  addPotentialImpact = TRUE,
  addUTRoverlap = TRUE,
  minoverlap = 5,
  BPPARAM = bpparam()
)

flagBlacklistRegions(
  result,
  blacklist_regions = NULL,
  assemblyVersion = c("hg19", "hg38"),
  minoverlap = 5
)

Arguments

fds

A FraserDataSet

txdb

A txdb object providing the reference annotation.

BPPARAM

For controlling parallelization behavior. Defaults to bpparam().

result

A result table as generated by FRASER, including the column annotatedJunction as generated by the function annotateIntronReferenceOverlap.

addPotentialImpact

Logical, indicating if the type of the potential impact should be added to the results table. Defaults to TRUE.

addUTRoverlap

Logical, indicating if the overlap with UTR regions should checked and added to the results table. Defaults to TRUE.

minoverlap

Integer value defining the number of base pairs around the splice site that need to overlap with UTR or blacklist region, respectivly, to be considered matching. Defaults to 5 bp.

blacklist_regions

A BED file that contains the blacklist regions. If NULL (default), the BED files that are packaged with FRASER are used (see Details for more information).

assemblyVersion

Indicates the genome assembly version of the intron coordinates. Only used if blacklist_regions is NULL. For other versions, please provide the BED file containing the blacklist regions directly.

Value

An annotated FraserDataSet or results table, respectively

Functions

  • annotateIntronReferenceOverlap(): This method calculates basic annotations based on overlap with the reference annotation (start, end, none, both) for the full fds. The overlap type is added as a new column annotatedJunction in mcols(fds).

  • annotatePotentialImpact(): This method annotates the splice event type to junctions in the given results table.

  • flagBlacklistRegions(): This method flags all introns and splice sites in the given results table for which at least one splice site (donor or acceptor) is located in a blacklist region. Blacklist regions of the genome are determined from the provided BED file.

Examples

  # get data, fit and compute p-values and z-scores
  fds <- createTestFraserDataSet()
  
  # load reference annotation
  library(TxDb.Hsapiens.UCSC.hg19.knownGene)
  txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene 
    
  # add basic annotations for overlap with the reference annotation
  # run this function before creating the results table
  fds <- annotateIntronReferenceOverlap(fds, txdb) 

  # extract results: for this small example dataset, no cutoffs used 
  # to get some results 
  res <- results(fds, padjCutoff=NA, deltaPsiCutoff=NA)
  
  # annotate the type of potential impact on splicing and UTR overlap
  res <- annotatePotentialImpact(result=res, txdb=txdb, fds=fds)
  
  # annotate overlap with blacklist regions
  res <- flagBlacklistRegions(result=res, assemblyVersion="hg19")
  
  # show results table containing additional annotations
  res
  

c-mertes/FRASER documentation built on April 20, 2024, 4:32 p.m.