Closed lmassenet-regad closed 11 months ago
Hi @lmassenet-regad
Question 1 is hard to answer in general. As long as you have between 50 and 500 genes for a background of 5000-25000 genes it is fine.
Question 2: https://github.com/saeyslab/nichenetr/blob/master/vignettes/model_construction.md shows you how to make your own model wth own databases. But end of April/May, we will release an updated version of the NicheNet ligand-receptor and ligand-target matrix
Dear browaeysrobin,
Thank you for your answer. I tried to add my own databases to build a new ligand_target_matrix. I succeeded in computing weighted_networks objects with the new database, but I have trouble to compute the ligand_target_matrix.
I ran the following command lines :
ligands = as.list(unique(new_lr_network$from))
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks = weighted_networks, ligands = ligands, algorithm = "PPR", damping_factor = hyperparameter_list$damping_factor, ltf_cutoff = hyperparameter_list$ltf_cutoff)
And I came up with this error message : Erreur dans igraph::page_rank(G, algo = c("prpack"), vids = igraph::V(G), : At core/centrality/prpack.cpp:63 : The sum of the elements in the reset vector must not be zero. Invalid value
Do you have any idea how to solve this error? Thank you in advance for your help !
Hi @lmassenet-regad
Can you compare the exact output of your code ligands = as.list(unique(new_lr_network$from))
to what is done in the github vignette?
Hello, Below is the comparison of ligands, which for me is similar to what is done in the GitHub vignette, if I understood well.
head(ligands)
[[1]] [1] "CXCL1"
[[2]] [1] "CXCL2"
[[3]] [1] "CXCL3"
[[4]] [1] "CXCL5"
[[5]] [1] "PPBP"
[[6]] [1] "CXCL6"
head(ligands_vignette) # what is done in the vignette
[[1]] [1] "TNF"
[[2]] [1] "TNF" "IL6"
By investigating a bit, it seems that the error message come from this command line (inside the function construct_ligand_tf_matrix) :
complete_matrix = lapply(ligands, PPR_wrapper, E, signaling_igraph, damping_factor, id2allgenes, ltf_cutoff)
Error in igraph::page_rank(G, algo = c("prpack"), vids = igraph::V(G), : At core/centrality/prpack.cpp:63 : The sum of the elements in the reset vector must not be zero. Invalid value
I hope it can help...!
Hi @browaeysrobin,
I finally figured out what happened. Some 'ligands' from my lists are not included in the weighted_networks$lr_sig$from, explaining the error message (most of them are pseudogene such as HLA-DPA3 or HLA-DQB3). The command below is running well:
ligands = unique(new_lr_network$from)
ligands = ligands[ligands%in%weighted_networks$lr_sig$from] %>% as.list()
ligand_target_matrix = construct_ligand_target_matrix(weighted_networks = weighted_networks, ligands = ligands, algorithm = "PPR", damping_factor = hyperparameter_list$damping_factor, ltf_cutoff = hyperparameter_list$ltf_cutoff)
Thank you for your help! Best
Question 2: https://github.com/saeyslab/nichenetr/blob/master/vignettes/model_construction.md shows you how to make your own model wth own databases. But end of April/May, we will release an updated version of the NicheNet ligand-receptor and ligand-target matrix
Hi again, I was wondering if you had release a updated version of the NicheNet ligand-receptor and ligand-target matrix, as mentioned a year ago. I was not able to find any related news.
Would you have advices on how I can check that a new model created with own databases has good predictions performance ?
Hi, sorry for the delay, you can find the updated matrices here: https://zenodo.org/record/7074291
Hi, Thank you for this useful tool. I applied to some data and I have two independant questions:
I used my DEG (between 2 experimental conditions) of the receiver cell type as geneses of interest. But the ligand_activities results differs significantly (not same ligands in the top gene lists) when I use different filters of logFC average (to filter the DEG). What would be your recommendation concerning the number of DEG to be considered as geneset_oi ? Having a bigger list of genes or less genes but with more differences in average logFC ?
I would like to use my own ligand/receptor database, but some ligands I am considering are not included in the current ligand_target matrix. Is it possible to create its own ligand_target for the ligand that would be missing ? Or, an extended version of the ligand_target matrix is part of the next updates ?
Thanks you in advance for your help, Kind regards
Lucile