Summarize Detected TLS Across Samples
summarize_TLS.RdProduces a tidy data.frame with one row per sample summarising the
number of detected TLS, their sizes, and (optionally) ICAT scores.
Arguments
- ldata
Named list of data frames as returned by
detect_TLS(and optionallydetect_tic).- calc_icat_scores
Logical. Should ICAT scores be computed for each TLS and appended as a list-column? Default
FALSE.
Value
A data.frame with columns:
sampleSample name.
n_TLSNumber of TLS detected.
total_cellsTotal cells in the sample.
TLS_cellsNumber of cells assigned to any TLS.
TLS_fractionFraction of all cells that are TLS cells.
mean_TLS_sizeMean cells per TLS (
NAif n_TLS = 0).n_TICNumber of T-cell clusters detected by
detect_tic(NAif not yet run).icat_scoresList-column of ICAT scores per TLS (only when
calc_icat_scores = TRUE).
Examples
data(toy_ldata)
ldata <- detect_TLS("ToySample", k = 30, ldata = toy_ldata)
#> Detected TLS: 2
summarize_TLS(ldata)
#> sample n_TLS total_cells TLS_cells TLS_fraction mean_TLS_size n_TIC
#> 1 ToySample 2 322951 1568 0.004855226 784 NA