exon_in_intron: Annotate if there is an exon within an intron

View source: R/exon_in_intron.R

exon_in_intronR Documentation

Annotate if there is an exon within an intron

Description

Annotate if there is an exon within an intron

Usage

exon_in_intron(df, transcripts)

Arguments

df

A data.frame with splice junctions in rows and at least the columns:

  • junc_id junction id consisting of genomic coordinates

  • tx_id transcript id consisting of genomic coordinates

transcripts

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

Value

A data.frame as the input but with potentially multiple rows and with the additional column(s): - exon_free: Boolean indicating if the given IR junctions is exon-free. Will return NA for non-intron retentions.

Examples


library(dplyr)

toy_tx <- GenomicRanges::GRangesList(list(
tx1 = GenomicRanges::GRanges(
 c("1", "1", "1"),
IRanges::IRanges(
   c(2, 15, 27),
 c(8, 23, 35),
),
strand = c("+", "+", "+")
),
tx1a = GenomicRanges::GRanges(
 c("1" ),
IRanges::IRanges(
 c(3),
 c(10),
),
strand = c("+")
)))

df <- tibble(
 junc_id = c("1:8-9:+", "1:14-15:+"),
 tx_id = c("tx1", "tx1")
)
df1 <- df %>%
 exon_in_intron(transcripts = toy_tx)


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