quadbio / Pando

Multiome GRN inference.
https://quadbio.github.io/Pando/
MIT License
106 stars 21 forks source link

Error with plot_tf_network #23

Closed Ping-lin14 closed 1 year ago

Ping-lin14 commented 1 year ago

Hi

I'm getting an error running plot_tf_network in my data.

projCD8 <- get_tf_network(projCD8, tf='AHI1', graph='full_graph')
plot_tf_network(projCD8, tf='AHI1', graph='full_graph')
Error in `geom_edge_diagonal()`:
! Problem while computing aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `unique.default()`:
! unique() applies only to vectors
Run `rlang::last_error()` to see where the error occurred.
rlang::last_error()
<error/rlang_error>
Error in `geom_edge_diagonal()`:
! Problem while computing aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `unique.default()`:
! unique() applies only to vectors
---
Backtrace:
  1. base (local) `<fn>`(x)
 19. base::factor(dir)
 21. base::unique.default(x, nmax = nmax)
Run `rlang::last_trace()` to see the full context.

However, when I tried several different TFs, I found that some TFs can run plot_tf_network smoothly. I'm not sure what happened to him.

joschif commented 1 year ago

The issue seems to come from ggraph, so unfortunately I'm not sure what causes it. I can imagine that on a big GRN, plotting this for the full graph might be an issue, so maybe I would try constraning it to a subgraph with get_network_graph