satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.28k stars 910 forks source link

FindTransferAnchors() for Integrated scRNA Reference and SCT spatial Query #7291

Closed me-orlov closed 1 year ago

me-orlov commented 1 year ago

Dear Seurat developers and community,

My question is related to issues #1972 and #3937. However, I am still confused, so thought I'd ask. I am trying to use FindTransferAnchors and TransferData on the following query and reference, and am confused how to handle the normalization method. 1) Query: spatial data with SCT applied. The SCT is a necessity here and I don't want to use log-normalization. 2) Reference: control and treatment scRNA datasets that were individually processed with SCT and then integrated.

I'd like to run the FindTransferAnchors between the "integrated" assay of the reference and the "SCT" spatial query, with normalization.method = "SCT". However, I am reading in the prior issues that this is impossible?

I can't use the original "SCT" assay slot of my single cell object in FindTransferAnchors because it consists of 21 separate SCT models (which get used for the integration). I would really like some way of working with the integrated single cell data in the downstream processing. I'm very new to this so I would appreciate if someone could help me get my bearings.

Thank you in advance.

me-orlov commented 1 year ago

My apologies! I seem to have confused myself. I believe I have found the answer in issue #6064 - I'll leave my question in case others are looking. From my understanding, it is totally fine to use the "integrated" assay here.

As a follow-up question, when I use the integrated assay for the scRNAseq data and the SCT normalized spatial data, with

anchors <- FindTransferAnchors(reference = IntegratedscData, query = spatial.M, normalization.method = "SCT", npcs = 50, reference.assay = "integrated", query.assay = "SCT")

it runs through, but I get the following warning: Warning: Adding image data that isn't associated with any assay present

I get this warning four times, from what I assume are four merged spatial SCT-transformed datasets. Is it something I should be concerned about?

Furthermore, what would be more advisable? To use the integrated assay or the merged SCT assay for the single cell data in FindTransferAnchors?

Thank you for your valuable time and patience!

saketkc commented 1 year ago

It is totally fine to use the integrated assay for your reference here. Nothing to be concerned about the warning here.

Zack-G-123 commented 1 year ago

It is totally fine to use the integrated assay for your reference here. Nothing to be concerned about the warning here.

Hi @saketkc , I had a closely related question. In v5, after IntegrateLayers() on an object with multiple samples (layers) normalized using SCTransform to generate an integrated CCA reduction for clustering and umap vizualization, an 'integrated' assay isn't generated. However, since the SCT assay has 4 SCT models I get the following error:

Error: Given reference assay (SCT) has 4 reference sct models. Please provide a reference assay with a  single reference sct model.

I see from #6064 that @yuhanH also recommended using the integrated assay to get around the error. Do we need to perform the old SCTransform integration pipeline to generate an 'integrated' assay with 1 SCT model for reference mapping, or is there a way to perform FindTransferAnchors() after using IntegrateLayers() for multiple sample integration in v5?

greensii commented 11 months ago

It is totally fine to use the integrated assay for your reference here. Nothing to be concerned about the warning here.

Hi @saketkc , I had a closely related question. In v5, after IntegrateLayers() on an object with multiple samples (layers) normalized using SCTransform to generate an integrated CCA reduction for clustering and umap vizualization, an 'integrated' assay isn't generated. However, since the SCT assay has 4 SCT models I get the following error:

Error: Given reference assay (SCT) has 4 reference sct models. Please provide a reference assay with a  single reference sct model.

I see from #6064 that @yuhanH also recommended using the integrated assay to get around the error. Do we need to perform the old SCTransform integration pipeline to generate an 'integrated' assay with 1 SCT model for reference mapping, or is there a way to perform FindTransferAnchors() after using IntegrateLayers() for multiple sample integration in v5?

i have this same question! with seurat5, an 'integrated' assay is not stored after integration.

Aggarwal-Ayush commented 9 months ago

I have the same query. Has anyone been able to find a solution for this? @saketkc

It is totally fine to use the integrated assay for your reference here. Nothing to be concerned about the warning here.

Hi @saketkc , I had a closely related question. In v5, after IntegrateLayers() on an object with multiple samples (layers) normalized using SCTransform to generate an integrated CCA reduction for clustering and umap vizualization, an 'integrated' assay isn't generated. However, since the SCT assay has 4 SCT models I get the following error:

Error: Given reference assay (SCT) has 4 reference sct models. Please provide a reference assay with a  single reference sct model.

I see from #6064 that @yuhanH also recommended using the integrated assay to get around the error. Do we need to perform the old SCTransform integration pipeline to generate an 'integrated' assay with 1 SCT model for reference mapping, or is there a way to perform FindTransferAnchors() after using IntegrateLayers() for multiple sample integration in v5?

i have this same question! with seurat5, an 'integrated' assay is not stored after integration.

saketkc commented 8 months ago

Hi @Aggarwal-Ayush, can you open a new issue and provide a reproducible example along with sessionInfo()? thanks!