R/choose_tx.R
choose_tx.Rd
All possible affected transcripts are required and can be annotated with add_tx()
choose_tx(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 of possibly affected transcripts
tx_lst
a list of GRanges
with the transcript
A data.frame as with relevant transcript and junction combinations. If tx_id is NA in the input data.frame such rows are removed from the output data.frame.
This function selects transcripts that are more likely to be affected to reduce the amount of junction and transcript combinations. The function excludes transcripts for which both junction positions are located in an intron. Junctions in a given transcript must either represent an exon skipping, intron retention, exitron, or alternative splice site event or have both junction positions in an exon. Other junction-transcript combinations are also excluded. This function may loose relevant or keep irrelevant junction-transcripts in particular in regions with multiple isoforms with distinct splicing pattern.
junc_df <- tibble::tibble(
junc_id = c("chr2:152389996-152392205:-", "chr2:152389996-152390729:-",
"chr2:152389955-152389956:-")
)
junc_df <- add_tx(junc_df, toy_transcripts)
choose_tx(junc_df)
#> # A tibble: 19 × 4
#> junc_id tx_id tx_lst putative_event_type
#> <chr> <chr> <named list> <chr>
#> 1 chr2:152389996-152392205:- ENST00000409198 <GRanges> ASS
#> 2 chr2:152389996-152392205:- ENST00000172853 <GRanges> ASS
#> 3 chr2:152389996-152392205:- ENST00000397345 <GRanges> ASS
#> 4 chr2:152389996-152392205:- ENST00000427231 <GRanges> ASS
#> 5 chr2:152389996-152392205:- ENST00000618972 <GRanges> ASS
#> 6 chr2:152389996-152392205:- ENST00000413693 <GRanges> ASS
#> 7 chr2:152389996-152392205:- ENST00000603639 <GRanges> ASS
#> 8 chr2:152389996-152392205:- ENST00000604864 <GRanges> ASS
#> 9 chr2:152389996-152392205:- ENST00000420924 <GRanges> ASS
#> 10 chr2:152389996-152390729:- ENST00000409198 <GRanges> ASS
#> 11 chr2:152389996-152390729:- ENST00000172853 <GRanges> ASS
#> 12 chr2:152389996-152390729:- ENST00000427231 <GRanges> ASS
#> 13 chr2:152389996-152390729:- ENST00000618972 <GRanges> ASS
#> 14 chr2:152389996-152390729:- ENST00000413693 <GRanges> ASS
#> 15 chr2:152389996-152390729:- ENST00000604864 <GRanges> ASS
#> 16 chr2:152389955-152389956:- ENST00000397345 <GRanges> IR
#> 17 chr2:152389955-152389956:- ENST00000618972 <GRanges> IR
#> 18 chr2:152389955-152389956:- ENST00000603639 <GRanges> IR
#> 19 chr2:152389955-152389956:- ENST00000420924 <GRanges> IR