Modify transcript by introducing splice junctions

modify_tx(tx, jx)

Arguments

tx

transcripts a named GRangesList with transcripts defined as GRanges of exons.

jx

splice junctions as GRanges objects with the same length as tx.

Value

a GRangesList with altered transcripts.

Examples

tx <- GenomicRanges::GRangesList(
  list(GenomicRanges::GRanges(c(
     "1:2-3:+",
     "1:5-6:+",
     "1:10-15:+"
  )))
)

jx <- GenomicRanges::GRanges(c("1:3-10:+"))

modify_tx(tx, jx)
#> GRangesList object of length 1:
#> [[1]]
#> GRanges object with 2 ranges and 0 metadata columns:
#>       seqnames    ranges strand
#>          <Rle> <IRanges>  <Rle>
#>   [1]        1       2-3      +
#>   [2]        1     10-15      +
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
#>