pkgdown/extra.css

Skip to contents

[Experimental] This function tabulates the number of TCR pairs called for each sample by the MAD-HYPE algorithm, the T-SHELL algorithm, or both. It is used in the plot_paired() function.

Usage

get_pair_stats(data, verbose = TRUE)

Arguments

data

a TIRTLseqDataSet object

verbose

(optional) whether to print progress of the function (default is TRUE).

Value

A data frame with the number of pairs called by each algorithm for each sample.

Details

The function can count the number of alpha chains paired, or beta chains, or the number of pairs overall. By default, it counts the number of pairs overall.

Examples

folder = system.file("extdata/SJTRC_TIRTL_seq_longitudinal", package = "TIRTLtools")
ts_data = load_tirtlseq(folder, meta_columns = c("marker", "timepoint", "version"), sep = "_", verbose = FALSE)

get_pair_stats(ts_data)
#> Calculating pairing stats for sample 1
#> Calculating pairing stats for sample 2
#> Calculating pairing stats for sample 3
#> Calculating pairing stats for sample 4
#> Calculating pairing stats for sample 5
#> Calculating pairing stats for sample 6
#> # A tibble: 66 × 8
#>    category         Freq chain  sample_id  marker timepoint version label       
#>    <fct>           <int> <chr>  <chr>      <chr>  <chr>     <chr>   <chr>       
#>  1 MAD-HYPE only   25327 paired cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#>  2 T-SHELL only     2498 paired cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#>  3 both            20003 paired cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#>  4 MAD-HYPE only   14343 alpha  cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#>  5 T-SHELL only     1991 alpha  cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#>  6 both            19137 alpha  cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#>  7 neither       1936905 alpha  cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#>  8 MAD-HYPE only   11058 beta   cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#>  9 T-SHELL only     1633 beta   cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#> 10 both            16254 beta   cd4_tp1_v2 cd4    tp1       v2      marker: cd4…
#> # ℹ 56 more rows