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

Condition_colname is not used for subsetting in nichenet_seuratobj_aggregate #271

Closed
singlecellfan opened this issue May 23, 2024 · 2 comments

Comments

@singlecellfan
Copy link

Hi,

first of all thank you for the great package and the really good documentation!

I am running unfortunately into a very similar problem as described here:
#220

I am running the "nichenet_seuratobj_aggregate" function and have specified the "condition_colname" as well as the "condition_oi" and the "condition_reference". However when I later check the DE results, it became obvious that the DE genes/ligands were not actually coming from the "condition_oi".

I have version 2.1.0 of nichenetr installed.

Have you encountered this error before?
Any way to fix this?
Thank you much in advance!

@csangara
Copy link
Member

Thanks for using our package!

I'd first like to ask some clarifications on your issue, as the function you are running comes before the one referenced in issue #220.

Let us refer to the output from nichenet_seuratobj_aggregate() as nichenet_output. Do you mean that the DE genes you retrieved from nichenet_output$geneset_oi and the top ligands from nichenet_output$top_ligands are not specific to "condition_oi"?

If that is the case, then it's not an error, but the way the package was designed. For the gene set of interest (geneset_oi), all DE genes between the two conditions are considered. If you would like to only include upregulated genes in the condition of interest, you may use the argument geneset="up" in the function .

As for the ligands: by default, potential ligands are defined as genes expressed in at least 10% of the sender cell type (both conditions considered together) whose cognate receptors are also expressed in at least 10% of the receiver cell type. So this does not have any condition specificity in the function you are running. If you would like to only consider upregulated ligands in the analysis, you can follow the approach suggested here, or you can follow the prioritization approach here (which was the one referenced to in #220).

Hope this helps; feel free to reply to this issue if I misunderstood or if you have any further questions! 😄

@singlecellfan
Copy link
Author

Thanks for getting back to so quickly! Much appreciated.

I see, I must have misunderstood the first part. In fact I was only interested in the upregulated genes in the condition of interest. This is way I was a bit confused about the results.

I will try your suggestions and follow the other approaches linked.
Thank you very much!

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