This can be used to liftOver junctions to personalized genome coordinates.
liftover_junc_id(junc_df, chain_file)
a data.frame with at least one column junc_id
containing junction IDs
path to a chain file for the UCSC liftOver tool. See also liftOver
a data.frame like the input junc_df
with the following additional columns:
liftover_successful
a logical vector indicating if the liftOver was successful and lifted junction positions build valid genomic intervals and not single positions.
liftover_unique
a logical vector indicating if the liftOver was unique (1-to-1 correspondence).
junc_id_lifted_collapsed
a character vector with the lifted junction IDs.
Multiple IDs are separated by |
.
NA represent junc_ids that could not be lifted.
junc_id_lifted
a character vector with a unique lifted junction IDs.
Potentially multiple lifted IDs are combined by the minimal start and maximal
end coordinate. NA represent junc_ids that could not be lifted.
chain_file = system.file(package="liftOver", "extdata", "hg38ToHg19.over.chain")
junc_df <- toy_junc_df
liftover_junc_id(junc_df, chain_file)
#> # A tibble: 17 × 6
#> junc_id tx_id liftover_successful liftover_unique junc_id_lifted_colla…¹
#> <chr> <chr> <lgl> <lgl> <chr>
#> 1 chr2:152389… ENST… TRUE TRUE chr2:153246510-153248…
#> 2 chr2:152389… ENST… TRUE TRUE chr2:153246510-153247…
#> 3 chr2:152389… ENST… TRUE TRUE chr2:153246469-153246…
#> 4 chr2:152388… ENST… TRUE TRUE chr2:153244924-153248…
#> 5 chr2:152388… ENST… TRUE TRUE chr2:153244924-153247…
#> 6 chr2:179415… ENST… TRUE TRUE chr2:180280708-180281…
#> 7 chr2:179415… ENST… TRUE TRUE chr2:180280714-180280…
#> 8 chr2:179415… ENST… TRUE TRUE chr2:180279727-180281…
#> 9 chr2:179445… ENST… TRUE TRUE chr2:180310063-180310…
#> 10 chr2:179446… ENST… TRUE TRUE chr2:180310952-180310…
#> 11 chr2:179445… ENST… TRUE TRUE chr2:180310063-180311…
#> 12 chr2:179642… ENST… TRUE TRUE chr2:180506771-180506…
#> 13 chr2:179642… ENST… TRUE TRUE chr2:180506873-180506…
#> 14 chr2:179642… ENST… TRUE TRUE chr2:180506771-180507…
#> 15 chr2:152226… ENST… TRUE TRUE chr2:153083047-153083…
#> 16 chr2:152222… ENST… TRUE TRUE chr2:153079245-153079…
#> 17 chr2:152388… ENST… TRUE TRUE chr2:153244924-153244…
#> # ℹ abbreviated name: ¹junc_id_lifted_collapsed
#> # ℹ 1 more variable: junc_id_lifted <chr>