Closed Mialn20 closed 9 months ago
Hi @Mialn20
This issue seems to be the same as #10 . Can you check the solution I provided there and close this issue if it works?
Hi @browaeysrobin It seems to have solved the issue!
Can you help me understand how to read the plot or where i can find an elaboration of this explanation: "As last plot, we can generate a ‘systems’ view of these intercellular feedback and cascade processes than can be occuring between the different cell populations involved. In this plot, we will draw links between ligands of sender cell types their ligand/receptor-annotated target genes in receiver cell types. So links are ligand-target links (= gene regulatory links) and not ligand-receptor protein-protein interactions!"
It should be noted that i am just a bachelor student so sorry if this is a very basic question.
Thanks a lot
Hi @Mialn20
It is always recommended to be more specific when you do not understand something. Now, I cannot know which parts of the explanation you don't understand and where I should focus on in a detailed explanation. Everything you need to know is in theory in the NicheNet and MultiNicheNet papper.
I will be closing this issue. You can always send a mail with more specific questions.
Hi multinichenetr team!
I have followed the following vignette and really like the package: https://github.com/saeyslab/multinichenetr/blob/main/vignettes/paired_analysis_SCC.md
Everything has worked perfectly until the last part with "Intercellular regulatory network systems view" This is the code and error.
group_oi = "ASpecificCondition" receiver_oi = "ASpecificCelltype"
prioritized_tbl_oi = get_top_n_lr_pairs(multinichenet_output$prioritization_tables, 150, rank_per_group = FALSE)
lr_target_prior_cor_filtered = multinichenet_output$prioritization_tables$group_prioritization_tbl$group %>% unique() %>% lapply(function(group_oi){ + lr_target_prior_cor_filtered = multinichenet_output$lr_target_prior_cor %>% inner_join(multinichenet_output$ligand_activities_targets_DEgenes$ligand_activities %>% distinct(ligand, target, direction_regulation, contrast)) %>% inner_join(contrast_tbl) %>% filter(group == group_oi) + lr_target_prior_cor_filtered_up = lr_target_prior_cor_filtered %>% filter(direction_regulation == "up") %>% filter( (rank_of_target < top_n_target) & (pearson > 0.50 | spearman > 0.50)) + lr_target_prior_cor_filtered_down = lr_target_prior_cor_filtered %>% filter(direction_regulation == "down") %>% filter( (rank_of_target < top_n_target) & (pearson < -0.50 | spearman < -0.50)) + lr_target_prior_cor_filtered = bind_rows(lr_target_prior_cor_filtered_up, lr_target_prior_cor_filtered_down) + }) %>% bind_rows()
Output i get
Joining with
by = join_by(receiver, ligand, target)
Warning in inner_join(., multinichenet_output$ligand_activities_targets_DEgenes$ligand_activities %>% : Detected an unexpected many-to-many relationship betweenx
andy
. ℹ Row 16 ofx
matches multiple rows iny
. ℹ Row 107338 ofy
matches multiple rows inx
. ℹ If a many-to-many relationship is expected, setrelationship = "many-to-many"
to silence this warning. Joining withby = join_by(contrast)
Joining withby = join_by(receiver, ligand, target)
Warning in inner_join(., multinichenet_output$ligand_activities_targets_DEgenes$ligand_activities %>% : Detected an unexpected many-to-many relationship betweenx
andy
. ℹ Row 16 ofx
matches multiple rows iny
. ℹ Row 107338 ofy
matches multiple rows inx
. ℹ If a many-to-many relationship is expected, setrelationship = "many-to-many"
to silence this warning. Joining withby = join_by(contrast)
I also get error when plotting in the next step: Warning in max(f) : no non-missing arguments to max; returning -Inf Error in
ggraph::geom_edge_loop()
: ! Problem while computing stat. ℹ Error occurred in the 2nd layer. Caused by error inseq_len()
: ! argument must be coercible to non-negative integer Backtrace:<fn>
(x)Error in ggraph::geom_edge_loop(aes(color = direction_regulation), edge_width = 1, : ℹ Error occurred in the 2nd layer. Caused by error in
seq_len()
: ! argument must be coercible to non-negative integer