Skip to content

Commit

Permalink
Merge pull request #179 from sales-lab/ligand_target_plot_labels
Browse files Browse the repository at this point in the history
Preserve plot labels when only one ligand/target pair is detected
  • Loading branch information
browaeysrobin authored Nov 9, 2022
2 parents 90bce8b + 0acb2df commit 7ca211e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/application_prediction.R
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ nichenet_seuratobj_aggregate = function(receiver, seurat_obj, condition_colname,
order_targets = order_targets %>% intersect(rownames(active_ligand_target_links))
order_ligands = order_ligands %>% intersect(colnames(active_ligand_target_links))

vis_ligand_target = active_ligand_target_links[order_targets,order_ligands] %>% t()
vis_ligand_target = active_ligand_target_links[order_targets,order_ligands,drop=FALSE] %>% t()
p_ligand_target_network = vis_ligand_target %>% make_heatmap_ggplot("Prioritized ligands","Predicted target genes", color = "purple",legend_position = "top", x_axis_position = "top",legend_title = "Regulatory potential") + theme(axis.text.x = element_text(face = "italic")) #+ scale_fill_gradient2(low = "whitesmoke", high = "purple", breaks = c(0,0.006,0.012))
} else {
vis_ligand_target = NULL
Expand Down

0 comments on commit 7ca211e

Please sign in to comment.