Skip to contents

Read a per-read charging likelihood file produced by the tRNA sequencing pipeline and binarize it at ml_threshold. Unlike read_charging(), which returns per-tRNA aggregate counts, this returns one row per read and is the input required by compute_charging_odds_ratios().

Usage

read_charging_calls(path, ml_threshold = 200)

Arguments

path

Path to a {sample}.charging_prob.tsv.gz file, with columns read_id, tRNA, and charging_likelihood.

ml_threshold

Minimum charging_likelihood (the CL tag) for a read to be called charged. Default 200, matching the pipeline default.

Value

A tibble with columns read_id, ref, and charged (0/1).

Examples

path <- clover_example("ecoli/charging_calls.tsv.gz")
read_charging_calls(path)
#> # A tibble: 15 × 3
#>    read_id ref                   charged
#>    <chr>   <chr>                   <int>
#>  1 read_1  host-tRNA-Glu-TTC-1-1       1
#>  2 read_2  host-tRNA-Glu-TTC-1-1       1
#>  3 read_3  host-tRNA-Glu-TTC-1-1       1
#>  4 read_4  host-tRNA-Glu-TTC-1-1       0
#>  5 read_5  host-tRNA-Glu-TTC-1-1       1
#>  6 read_6  host-tRNA-Glu-TTC-1-1       0
#>  7 read_7  host-tRNA-Glu-TTC-1-1       0
#>  8 read_8  host-tRNA-Glu-TTC-1-1       1
#>  9 read_9  host-tRNA-Glu-TTC-1-1       0
#> 10 read_10 host-tRNA-Glu-TTC-1-1       0
#> 11 read_11 host-tRNA-Glu-TTC-1-1       0
#> 12 read_12 host-tRNA-Glu-TTC-1-1       0
#> 13 read_13 host-tRNA-Glu-TTC-1-1       0
#> 14 read_14 host-tRNA-Glu-TTC-1-1       1
#> 15 read_15 host-tRNA-Glu-TTC-1-1       0