-
Notifications
You must be signed in to change notification settings - Fork 28
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
Comments
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. |
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?
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 )
The text was updated successfully, but these errors were encountered: