Question: How to display TCR data in tsne space via seurat object
0
gravatar for jennifer.bridge8
13 months ago by
jennifer.bridge80 wrote:

Hi Guys,

I am trying to work out how I can display by VDJ usage within my tsne plot for some 10x data. I added everything to the Seurat object and tried to do a feature plot to the gene of interest but it can not find them. Do I need to set something as the metadata column name?

Cheers,

J

seurat R • 1.1k views
ADD COMMENTlink modified 13 months ago by jared.andrews077.1k • written 13 months ago by jennifer.bridge80

Looks like you're working with the Seurat package. That should be a tag in your question. Please edit your question and add the tag, and in the future, be more thoughtful. Tags are how experts find questions that they can answer.

ADD REPLYlink written 13 months ago by RamRS30k

How did you add the VDJ data? Or are you just looking for expression of VDJ genes? Did you check to make sure your Seurat object has your gene of interest (e.g. "mygene" %in% rownames(seurat))?

ADD REPLYlink written 13 months ago by jared.andrews077.1k

I added the VDJ data via add metadata. I attempted a dim plot but can only plot all of them, not just one or two. A feature plot won't work at all.

ADD REPLYlink modified 13 months ago • written 13 months ago by jennifer.bridge80

$ FeaturePlot(tcr_testing,feature = c("TRAV13D-1") , pt.size = 0.5)

$ Error: None of the requested features were found: TRAV13D-1 in slot data

ADD REPLYlink written 13 months ago by jennifer.bridge80
2
gravatar for jared.andrews07
13 months ago by
jared.andrews077.1k
Memphis, TN
jared.andrews077.1k wrote:

There isn't a great way to do this, but the best way I've found is something like:

tester <- subset(scrna, subset = cdr3s_aa == "TRA:CAVAQAGTALIF;TRB:CSALGESYEQYF")
cells <- Cells(tester)
DimPlot(scrna, cells.highlight = cells)

Or as a one-liner:

DimPlot(scrna, cells.highlight = Cells(subset(scrna, subset = cdr3s_aa
== "TRA:CAVAQAGTALIF;TRB:CSALGESYEQYF")))

Substitute your metadata column and TCR info of interest as needed.

ADD COMMENTlink modified 13 months ago • written 13 months ago by jared.andrews077.1k

Amazing. Thank you very much!!

ADD REPLYlink written 13 months ago by jennifer.bridge80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1558 users visited in the last hour