This can be used to liftOver junctions to personalized genome coordinates.

liftover_junc_id(junc_df, chain_file)

Arguments

junc_df

a data.frame with at least one column junc_id containing junction IDs

chain_file

path to a chain file for the UCSC liftOver tool. See also liftOver

Value

a data.frame like the input junc_df with the following additional columns:

  • junc_id_lifted_is_unique a logical vector indicating if the liftOver was successful and 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 minmal start and maximal end coordinate. NA represent junc_ids that could not be lifted.

Examples


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 × 5
#>    junc_id    tx_id junc_id_lifted_is_un…¹ junc_id_lifted_colla…² junc_id_lifted
#>    <chr>      <chr> <lgl>                  <chr>                  <chr>         
#>  1 chr2:1523… ENST… TRUE                   chr2:153246510-153248… chr2:15324651…
#>  2 chr2:1523… ENST… TRUE                   chr2:153246510-153247… chr2:15324651…
#>  3 chr2:1523… ENST… TRUE                   chr2:153246469-153246… chr2:15324646…
#>  4 chr2:1523… ENST… TRUE                   chr2:153244924-153248… chr2:15324492…
#>  5 chr2:1523… ENST… TRUE                   chr2:153244924-153247… chr2:15324492…
#>  6 chr2:1794… ENST… TRUE                   chr2:180280708-180281… chr2:18028070…
#>  7 chr2:1794… ENST… TRUE                   chr2:180280714-180280… chr2:18028071…
#>  8 chr2:1794… ENST… TRUE                   chr2:180279727-180281… chr2:18027972…
#>  9 chr2:1794… ENST… TRUE                   chr2:180310063-180310… chr2:18031006…
#> 10 chr2:1794… ENST… TRUE                   chr2:180310952-180310… chr2:18031095…
#> 11 chr2:1794… ENST… TRUE                   chr2:180310063-180311… chr2:18031006…
#> 12 chr2:1796… ENST… TRUE                   chr2:180506771-180506… chr2:18050677…
#> 13 chr2:1796… ENST… TRUE                   chr2:180506873-180506… chr2:18050687…
#> 14 chr2:1796… ENST… TRUE                   chr2:180506771-180507… chr2:18050677…
#> 15 chr2:1522… ENST… TRUE                   chr2:153083047-153083… chr2:15308304…
#> 16 chr2:1522… ENST… TRUE                   chr2:153079245-153079… chr2:15307924…
#> 17 chr2:1523… ENST… TRUE                   chr2:153244924-153244… chr2:15324492…
#> # ℹ abbreviated names: ¹​junc_id_lifted_is_unique, ²​junc_id_lifted_collapsed