getCombinedDataSet-data.frame-Seurat-method: Combine scTCR-seq and scRNA-seq data

getCombinedDataSet,data.frame,Seurat-methodR Documentation

Combine scTCR-seq and scRNA-seq data

Description

This function attaches the immune receptor information to metadata of the seurat object

Usage

## S4 method for signature 'data.frame,Seurat'
getCombinedDataSet(TCR, seurat, ...)

Arguments

seurat

A seurat object

scTCRseq

The preprocessed scTCR-seq data. See details

Details

The input scTCR-seq needs to be a data frame, and alpha chain and beta chain need to be paired. If you have multiple sets of scTCR-seq from more than one sample, the data needs to be combined into a single data frame. It should contain a column named 'barcode' and a column named 'CTaa'. The 'barcode' column corresponds to the cell barcodes(potentially prefixed with sample name). The 'CTaa' column holds the scTCR-seq information for cells. Paired alpha-beta chain amino acid sequence is prefered, yet users are free to provide any related information that can be used to define a clonotype. For instance, you can put CDR3 alpha chain, or beta chain, or paired alpha-beta chain amino acid sequence in this column. If provide paired alpha-beta chain amino acide sequence, the alpha chain and beta chain should be separated by '_'. If you want to check the V and J gene usage pattern, you need to provide another column named 'CTgene', with alpha chain gene and beta chain gene separated by '_'.

The seurat object must contain clustering results saved as 'clusters', and must have cell barcodes saved as 'barcode'. The seurat object also needs to have an assay named 'RNA', which stores the raw count data. #' The barcodes from scTCR-seq data and seurat object must have the same naming style. For instance, if barcodes from seurat/scTCR-seq are prefixed with sample name, then the barcodes from scTCR-seq/seurat must also have prefix.

Value

A object of class CombinedDataSet with clonotype information as well as scRNA-seq information. The assay slot of this object is essentially an updated seurat object, with clonotype information attached.

Examples

TCR <-read.csv("/PATH/TO/YOUR/scTCR-seqData/",header=T)
load('Mice.sub.rda')
getCombinedDataSet(TCR,Mice.sub)


JuanXie19/LRT documentation built on April 14, 2025, 7:09 p.m.