annotate_mut_effect: Annotate splice variants effects with resulting junctions

View source: R/annotate_mut_effect.R

annotate_mut_effectR Documentation

Annotate splice variants effects with resulting junctions

Description

The mutation effects donor loss (DL), donor gain (DG), acceptor loss (AL), and acceptor gain (AG) are annotated with respect to the provided transcripts to build resulting splice junctions. Donor loss (DG) and acceptor loss (AD) are only considered when overlapping with an exon-intron junction in the provided transcripts.

Usage

annotate_mut_effect(
  effect_df,
  transcripts,
  transcripts_gr,
  gene_mapping = FALSE,
  consider_intron_retention = TRUE
)

Arguments

effect_df

a data.frame with variant effects on splicing per row. It should have at least the following columns:

  • chr chromosome

  • pos absolute position of the effect

  • effect an splicing effect class, one of DL, DG, AL, AG. optional column:

  • gene_id ENSEMBL gene id. Is required if gene_mapping is set to TRUE

transcripts

a GRangesList with transcripts defined as GRanges of exons created by GenomicFeatures::exonsBy(txdb, by = c("tx"), use.names = TRUE).

transcripts_gr

a GRanges object with transcript created by GenomicFeatures::transcripts(txdb, columns = c("gene_id", "tx_id", "tx_name"))

gene_mapping

Indicator whether only transcripts related to the gene provided in the gene_id column in effect_df are considered. If gene_mapping is FALSE, all potentially affected transcripts covering the relevant genomic position are considered. If gene_mapping is TRUE, potentially affected transcripts from the gene provided in effect_df that cover the relevant genomic positions are considered.

consider_intron_retention

Indicator whether intron retention events should be considered as splicing event types when building the resulting splice junctions.

Value

A data.frame with with additional rows and columns including the splice junction in the column junc_id.

Examples

spliceai_file <- system.file("extdata", "spliceai_output.vcf", package = "splice2neo")
df_raw <- parse_spliceai(spliceai_file)
effect_df <- format_spliceai(df_raw)

annotate_mut_effect(effect_df, toy_transcripts, toy_transcripts_gr)



TRON-Bioinformatics/splice2neo documentation built on Nov. 9, 2024, 5:28 p.m.