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

Strange complex subunit #162

Open
HMU-lyz opened this issue Jul 18, 2024 · 2 comments
Open

Strange complex subunit #162

HMU-lyz opened this issue Jul 18, 2024 · 2 comments

Comments

@HMU-lyz
Copy link

HMU-lyz commented Jul 18, 2024

Your work is wonderful
I encountered some problems when using it, which may not be technical reasons, but misunderstandings. When I opened the running results of liana_pipe, I found that there was only one corresponding gene for the complex subunit.
Looking further at the source code, I found that in the recomplexify function, a flag was marked for each complex subunit. I don’t understand the principle of executing this step. In the subsequent steps, the FLASE row in the flag column will be removed, and then my problem arises.
Here is the sample code I ran and it still exhibits this behavior:

library(tidyverse)
library(magrittr)
library(liana)

liana_path <- system.file(package = "liana")
testdata <-
  readRDS(file.path(liana_path , "testdata", "input", "testdata.rds"))

sce <- liana_prep(testdata)

# Obtain LR summary res with CellPhoneDB and dissociate complexes
lr_res <- liana_pipe(sce,
                     op_resource = select_resource("CellPhoneDB")[[1]] %>%
                       liana:::decomplexify(),
                     base = exp(1) # here we assume log-transformation
                     # of the library-normalized counts
) %>%
  glimpse()
# 
aa = get_sca(lr_res, complex_policy="mean",
        expr_prop=liana_defaults()[["expr_prop"]],
        return_all=FALSE) %>% glimpse

This picture shows the problem when I run my own seurat:
image
When I use the sample data, I still have similar problems, so I suspect it is a deviation in my understanding:
image

@dbdimitrov
Copy link
Collaborator

Hi @HMU-lyz,

I'm not sure I understand the issue 100%, but I assume you wonder why the receptor is set to FALSE given that the expression proportion for ERBB2 is high?

In this case, likely this complex is getting filtered because while EGFR is found and sufficiently expressed, while ERBB2 likely isn't present in the dataset and is hence set to false.

See, I use two steps in which, first I check if the genes from a complex are sufficiently expressed (I just consider whatever is the minimum expression), and I also check if all of the genes are actually found in the matrix.

I hope this answers the question, if you think that this is not the case, I'd be happy to explore the issue further.

Thanks for the kind words and for using liana 😉

@HMU-lyz
Copy link
Author

HMU-lyz commented Aug 10, 2024

Thank you for your answer, my problem is solved

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