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

Persistent Error in get_ligand_signaling_path Function - Ligands Not Found in ligand_tf_matrix #308

Open
dyedye97 opened this issue Oct 25, 2024 · 1 comment

Comments

@dyedye97
Copy link

I am currently working on a cell-cell communication analysis using NicheNet and have encountered a persistent error when attempting to use the get_ligand_signaling_path function. Despite following the recommended steps, I keep receiving an error message stating that the ligand is not found in the ligand_tf_matrix. I am seeking your guidance on how to resolve this issue.

Here’s a brief summary of my workflow and the specific problem:

Context of the Analysis:
I am analyzing cell-to-cell communication between cluster 13 (Neutrophils) and cluster 7 (Neurons) using the NicheNet package.
Lrg1 is my ligand of interest, expressed in cluster 13 (sender cells).
Ptgds is the target gene, expressed in cluster 7 (receiver cells).
I have subsetted my Seurat object to correctly identify the sender and receiver cells.
The ligand expression data is available in ligand_tf_matrix, and Ptgds is confirmed to be present in the matrix.
Code and Issue:
I attempted the following steps:

Defined my ligand and target as follows:

r
Copy code
ligands_all <- "Lrg1"
targets_all <- c("Il6", "Pparg")
Called the get_ligand_signaling_path function:

r
Copy code
active_signaling_network <- get_ligand_signaling_path(
ligand_tf_matrix = ligand_tf_matrix,
ligands_all = ligands_all,
targets_all = targets_all,
weighted_networks = weighted_networks
)
However, I consistently receive this error message:

javascript
Copy code
Error: ligands should be in ligand_tf_matrix
Steps Taken to Troubleshoot:
I have verified that Ptgds and Lrg1 are indeed present in ligand_tf_matrix using:

r
Copy code
if ("Ptgds" %in% rownames(ligand_tf_matrix)) {
print("Ptgds is present in ligand_tf_matrix")
}
Additionally, I have confirmed that Ptgds is correctly identified as a row in the ligand-target matrix, and no duplicates are present.

I also tried passing both a single ligand and multiple ligands but received the same error.

Request for Assistance:
Could you please provide further insights into the following:

Are there specific requirements for the format of the ligands in ligand_tf_matrix that I might be missing?
Is there any debugging or diagnostic step I could take to better understand why the ligand is not being recognized?
Could this issue be related to the structure of my Seurat object or how the expression data is extracted?
I would greatly appreciate any advice or suggestions you can offer on how to resolve this persistent error.

Thank you for your time and assistance!

Best regards,
Rahma

@ryanhchung
Copy link

Same issue!

Any solutions? @csangara

Thank you!

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