| Title: | ECLIPSE: Enhanced CLonotypic Inference via Prediction of Single-cell Expression |
|---|---|
| Description: | This package is used for the analysis of single-cell T cell receptor sequencing data (scTCR-seq). ECLIPSE maps chain pairings across a sample to predict the true clonotype of each cell, unlike other methods which only consider the chains that are sequenced in each cell. Seurat objects and Cell Ranger vdj/multi contig files are required as inputs. |
| Authors: | Ethan Burns [aut, cre] (ORCID: <https://orcid.org/0009-0009-8061-3686>), Zhaochen Ye [ctb] (ORCID: <https://orcid.org/0009-0000-4422-3861>), Kelly Street [ctb] (ORCID: <https://orcid.org/0000-0001-6379-5013>), David Braun [aut, fnd] (ORCID: <https://orcid.org/0000-0003-4543-5553>) |
| Maintainer: | Ethan Burns <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.99.0 |
| Built: | 2026-10-11 15:58:54 UTC |
| Source: | https://github.com/BiocStaging/ECLIPSE |
Analyzes scTCR-seq data and returns results in Seurat object. Specifically, chain pairings across the sample are analyzed to predict chains lost to sequencing dropout and to decipher whether cells with >2 total TCR chains are caused by technical artifacts or true biology.
ECLIPSE( seurat_object, contig_type = "all", contig_folder_paths = NULL, contig_file_paths = NULL, batch, donor, group, original_barcode, format = "Blank", detailedEclipseStats = FALSE, combineTcrArgs = list(FALSE, FALSE, FALSE, TRUE), allowDoubleChains = "both", returnFilteredContigs = FALSE, verbose = TRUE )ECLIPSE( seurat_object, contig_type = "all", contig_folder_paths = NULL, contig_file_paths = NULL, batch, donor, group, original_barcode, format = "Blank", detailedEclipseStats = FALSE, combineTcrArgs = list(FALSE, FALSE, FALSE, TRUE), allowDoubleChains = "both", returnFilteredContigs = FALSE, verbose = TRUE )
seurat_object |
Seurat object that contains scRNA-seq data. |
contig_type |
tells whether contig_folder_paths or contig_file_paths should be used to read in contig files and how. To provide file paths, this should be "manual". To provide folders, this should be "all" or "filtered" to search for all or filtered contig annotations files. |
contig_folder_paths |
vector of paths to directories that contain TCR files. If you use this argument, provide either "all" or "filtered" to contig_type. The order should match the numbers provided in batch. |
contig_file_paths |
vector of TCR file paths. The order should match the numbers provided in batch. The files can have any name, but they must be all_contig_annotations.csv or filtered_contig_annotations.csv format. |
batch |
name of column in Seurat meta.data. The column should contain integers, not characters, that tell which position in the contig_folder/file_path vectors contains the TCR contigs for the cell. |
donor |
name of column in Seurat meta.data. The column should contain the donor, regardless of treatment/timepoint/condition. |
group |
name of column in Seurat meta.data. This column should specify how the final statistics for each clone should be calculated. For example, should they be calculated per sample, per donor, or among all cells? This can and often will be the same column as donor. |
original_barcode |
name of column in Seurat meta.data. This must contain the original 10X barcode for the cell. Typically this will end with -1, but users should check their TCR contig files to be sure. |
format |
default is blank. This tells how missing data is stored in the TCR contig files. Current files likely contain "" so "blank" is the default, but if older contig files are used where any missing data is stored as "None", then "None" should be provided here. |
detailedEclipseStats |
default is FALSE. Provides detailed stats relating to EM assignment in Seurat meta.data for each cell if TRUE. |
combineTcrArgs |
arguments that are provided to scRepertoire combineTCR. This should be a list of 4 logical elements, with the elements corresponding to the combineTCR arguments. 1 is removeNA, 2 is removeMulti, 3 is filterMulti, 4 is filterNonproductive. If no clonotype can be predicted with high confidence, then combineTCR using these arguments will determine the final clonotype. The default is the combineTCR default where only filterNonproductive is TRUE. |
allowDoubleChains |
specifies whether 2 alpha chains, 2 beta chains, or either 2 alpha or 2 beta chains are allowed. Default is both. |
returnFilteredContigs |
specifies if filtered contigs should be returned instead of running the whole ECLIPSE pipeline. Default is FALSE. |
verbose |
specifies whether to print an important QC graph, a small table, and also notes through the pipeline. Default is TRUE. |
A Seurat object with TCR data provided in meta.data.
data(test_seurat) files <- system.file("extdata/examples", package = "ECLIPSE") tcr_paths <- list.files( files, pattern = "\\.csv.gz$", full.names = TRUE) cd8_tcr <- ECLIPSE(test_seurat, contig_file_paths = tcr_paths, contig_type = "manual", batch = "index", donor = "donor", group = "donor", original_barcode = "Cell_Barcode")data(test_seurat) files <- system.file("extdata/examples", package = "ECLIPSE") tcr_paths <- list.files( files, pattern = "\\.csv.gz$", full.names = TRUE) cd8_tcr <- ECLIPSE(test_seurat, contig_file_paths = tcr_paths, contig_type = "manual", batch = "index", donor = "donor", group = "donor", original_barcode = "Cell_Barcode")
Analyzes chain pairings across a sample to find clones with 2 TCR alpha or 2 TCR beta chains. Then, the contigs are modified so that these cells only have 1 alpha and 1 beta contig, with ::: separating each CDR3 sequence. These contigs are then returned.
findThreeChainClones(contigs, chain, mode = "standard", printStats = TRUE)findThreeChainClones(contigs, chain, mode = "standard", printStats = TRUE)
contigs |
tibble of contigs from cellranger all or filtered contig files. |
chain |
"alpha" or "beta". This tells it whether clones with two of which chain should be looked for. |
mode |
"standard" is the default, where modified contigs are returned. If "show" is provided, two tables are returned. The first shows the final set of clones with a double chain of one type, and the second shows how/why some of those clones were called as such. The second is pre-filtering, so some clones may not have been called as having 3 total chains in the end. |
printStats |
specifies whether notes/stats should be printed. Default is TRUE. |
a tibble of modified contigs, except if mode show is selected.
data(post_qc_contigs) modified_contigs <- findThreeChainClones( contigs = post_qc_contigs, chain = "a")data(post_qc_contigs) modified_contigs <- findThreeChainClones( contigs = post_qc_contigs, chain = "a")
Example Post-QC TCR contigs that would be generated within ECLIPSE and passed to findThreeChainClones.
data(post_qc_contigs)data(post_qc_contigs)
A data frame in the all_contig_annotations.csv format that is produced by cellranger vdj.
Example data
Filters out cells with excessive numbers of TCR chains and helps set thresholds for RNA counts based on TCR chain count.
tcrDoubletDetect( object, filter = TRUE, singleChainLimit = 2, totalChainLimit = -1, showPlots = TRUE, verbose = TRUE )tcrDoubletDetect( object, filter = TRUE, singleChainLimit = 2, totalChainLimit = -1, showPlots = TRUE, verbose = TRUE )
object |
Seurat object. |
filter |
logical statement whether cells should be filtered or not. Default is TRUE. |
singleChainLimit |
number of alpha or beta chains that is allowed before filtering occurs. Must be a integer, with a default of 2. |
totalChainLimit |
number of total TCR chains that is allowed before filtering occurs. Must be an integer. Default is no threshold. |
showPlots |
logical statement that determines whether plots are provided that help set additional filtering thresholds based on RNA counts and TCR chain count. Default is TRUE. |
verbose |
specifies whether notes should be printed. Default is TRUE. |
a Seurat object that is filtered if desired.
data(test_seurat_with_tcr) cd8_tcr_filtered <- tcrDoubletDetect( test_seurat_with_tcr, singleChainLimit = 2)data(test_seurat_with_tcr) cd8_tcr_filtered <- tcrDoubletDetect( test_seurat_with_tcr, singleChainLimit = 2)
Example minimal Seurat object without TCR information.
data(test_seurat)data(test_seurat)
A Seurat object.
Example data
Example Seurat object with TCR information generated by running the ECLIPSE function.
data(test_seurat_with_tcr)data(test_seurat_with_tcr)
A Seurat object.
Example data
Example small Seurat object without TCR information.
data(vignette_object)data(vignette_object)
A Seurat object.
Example data