addTCR | R Documentation |
This functions adds a TCR contig metadata to existing Seurat or ExpressionSet object.
addTCR(exsc, tcrmeta)
exsc |
SatijaLab’s Seurat Class or Bioconductor’s ExpressionSet Class |
tcrmeta |
TCR clonotype metadata with rownames as barcodes (i.e. output of function "getTCR"). Barcodes must match that of @param exsc |
Reads output directory of Cellranger VDJ (or multi) to output clonotype metadata (TCR chains, VDJ genes, reads, umis).
If extra info on T cell metadata is available (clonotypes.csv), it will be joined to the clonotype metadata.
Example dataset:
https://www.10xgenomics.com/resources/datasets/human-t-cells-from-a-healthy-donor-1-k-cells-multi-v-2-2-standard-5-0-0
https://www.10xgenomics.com/resources/datasets/human-pbmc-from-a-healthy-donor-10-k-cells-multi-v-2-2-standard-5-0-0
Seurat Object or ExpressionSet with metadata updated with TCR clonotypes
# library library(Seurat) library(Biobase) # Read h5 data and create a Seurat object seu.data <- Read10X_h5(filename = system.file("extdata", "sc5p_v2_hs_T_1k_multi_5gex_t_count_filtered_feature_bc_matrix.h5", package="VDJChef")) seu <- CreateSeuratObject(counts=seu.data) meta <- seu@meta.data meta$barcode <- rownames(meta) # Create an ExpressionSet object eset <- ExpressionSet(as.matrix(seu@assays$RNA@counts)) pData(eset) <- seu@meta.data # import TCR metadata tcrmeta <- getTCR(system.file("extdata", "1kcells-multi/vdj_t/", package="VDJChef")) seu <- addTCR(seu, tcrmeta) eset <- addTCR(eset, tcrmeta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.