Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

liana_tensor_c2c batch effects #139

Open
daymecita opened this issue Feb 12, 2024 · 1 comment
Open

liana_tensor_c2c batch effects #139

daymecita opened this issue Feb 12, 2024 · 1 comment

Comments

@daymecita
Copy link

daymecita commented Feb 12, 2024

I just recently tested tensor-cell2cell with LIANA following the R tutorial from here: https://saezlab.github.io/liana/articles/liana_cc2tensor.html.
I have 10 samples, 7 disease and 3 healthy. I had integrated all of them using Seurat and next annotated the cell types.
I first ran liana_bysample using the sca method. Then I ran liana_tensor_c2c. My sce (converted from Seurat) object doesn't have corrected counts. I did log normalized the counts, though. The issue is that I am getting only one signicant factor (factor 2) that seems to be capturing batch effects, since the samples PsA6 and 7 were processed along with the HD 1,2, and 3 and they cluster together according to the loadings (see image below). Do we need to use corrected counts in tensor-c2c? How does it account for batch effects?

Contexts_heatmap_tensor

This is my code:

sce <- liana_bysample(sce = sce, sample_col = "context", idents_col = "CellID_l1", method = "sca", # we use SingleCellSignalR's score alone expr_prop = 0, # expression proportion threshold inplace=TRUE, # saves inplace to sce return_all = FALSE # whether to return non-expressed interactions )
sce <- liana_tensor_c2c(sce = sce, score_col = 'LRscore', rank = 7, # set to None to estimate for you data! how='outer', # defines how the tensor is built conda_env = NULL, # used to pass an existing conda env with cell2cell use_available = FALSE # detect & load cell2cell if available )

@dbdimitrov
Copy link
Collaborator

Hi @daymecita,

You could perform batch correction with e.g. scVI or COMBAT prior to running LIANA+ on the normalised counts. Though, it is also possible that these approaches might also remove some of the biological signal.

We (@hmbaghdassarian) showcase scVI in this supplementary note: https://ccc-protocols.readthedocs.io/en/latest/notebooks/ccc_R/S1_Batch_Correction.html; along with a series of detailed workflows detailing LIANA and Tensor-cell2cell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants