Skip to contents
Data loading and wrangling
add_metadata()
Add missing metadata to a TIRTLseqData object.
filter_dataset()
Subset a TIRTLseqData object to only the requested samples
load_tirtlseq()
Load paired-TCR and pseudo-bulk data from TIRTLseq experiments into a TIRTLseqData object
reorder_samples()
Change the order of samples in a TIRTLseqData object
Data processing and cleaning
TIRTL_process()
Run the other data processing functions in a sequence (add_single_chain_data, clean_pairs, and identify_paired)
add_single_chain_data()
Add alpha- and beta-chain read counts and read fractions to the paired TCR data
clean_pairs()
Clean paired TCR data, keeping at most one beta-chain partner for each individual alpha-chain and at most two alpha-chain partners for each individual beta-chain
identify_non_functional_seqs()
Identify TCRs that contain non-functional CDR3 sequences, i.e. those that contain stop codons (*) or frame shifts (_)
identify_paired()
Identify which alpha and beta chains were able to be paired and which were not paired
prep_for_tcrdist()
Prepares paired TCRs for TCRdist calculation, adding alleles to V-segments (i.e. "*01") if they are missing and removing TCRs with unrecognized V-segments or non-functional CDR3 sequences
remove_duplicates()
Removes duplicate paired TCRs (by default, paired TCRs are listed twice if they were called by both pairing algorithms)
TCRdist()
GPU implementation of TCRdist, a distance/similarity metric for pairs of TCRs
TCRdist_cpp()
Parallelized C++ implementation of TCRdist (no GPU required)
calculate_diversity()
diversity()
Calculate TCR repertoire diversity metrics (Shannon diversity index, Simpson diversity index, etc.)
cluster_tcrs()
Cluster TCRs (using the Leiden algorithm) based on their pairwise TCRdist values
get_all_div_metrics()
Returns all diversity metric options for `calculate_diversity()`
get_all_tcrs()
Returns all of the paired TCRs from all samples in a dataset
get_pair_stats()
Count the number of alpha chains and beta chains that were paired by each pairing algorithm
get_paired_by_read_fraction_range()
Calculates the number and fraction of single chains that were paired within different read fraction ranges for each sample.
summarize_data()
Creates a summary table with number of reads and unique alpha/beta chains observed for each sample
create_thimble_df()
Convert paired TCRs to a "thimble" data frame for stitching together TCR nucleotide coding sequences with the Stitchr Python package
write_stitchr_tsv()
Write a tab-separated "thimble" text file for use with Stitchr
Well-level data functions
params
Table of permissible amino acids and V-segments for TCRdist
submat
Substitution penalty matrix for TCRdist amino acids and V-segments
Single-cell TIRTLseq data
clean_scTIRTLseq()
Imputes missing alpha and beta chains where possible for single-cell TIRTLseq data
summarize_scTIRTLseq()
Returns a summary of single-cell TIRTLseq data, printing the total number of wells with data, number of wells missing an alpha/beta chain, number of wells with a second alpha chain, etc.