# Possible to distinguish directionality per condition in cytotrace?

**URL:** <https://discourse.scverse.org/t/possible-to-distinguish-directionality-per-condition-in-cytotrace/1367>\
**Category:** cellrank\
**Created:** [May 1, 2023, 9:32pm UTC](https://discourse.scverse.org/t/possible-to-distinguish-directionality-per-condition-in-cytotrace/1367 "2023-05-01T21:32:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ater153](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/ater153/32/846_2.png) [@ater153](https://discourse.scverse.org/u/ater153)\
**Post date:** [May 1, 2023, 9:32pm UTC](https://discourse.scverse.org/t/possible-to-distinguish-directionality-per-condition-in-cytotrace/1367/1 "2023-05-01T21:32:04Z")

</div>

Hello,  
I’ve been using the cytoTRACE tutorial to visualize pseudo RNA velocity (directed transition matrix). My dataset is composed of time points for 2 conditions and I was wondering if it’s possible to distinguish the contributing directionality per condition, that is, visualize directionality for condition 1 vs condition 2 on the same tsne plot?  
Thank you!

---

<div class="post-metadata">

**Author:** ![Marius1311](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/marius1311/32/193_2.png) [@Marius1311](https://discourse.scverse.org/u/Marius1311)\
**Post date:** [May 2, 2023, 3:19pm UTC](https://discourse.scverse.org/t/possible-to-distinguish-directionality-per-condition-in-cytotrace/1367/2 "2023-05-02T15:19:45Z")

</div>

Hey @ater153, I guess you could just subset your data, and recompute the k-NN graph on the data subset for visualization.

---

<div class="post-metadata">

**Author:** ![ater153](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/ater153/32/846_2.png) [@ater153](https://discourse.scverse.org/u/ater153)\
**Post date:** [May 2, 2023, 5:51pm UTC](https://discourse.scverse.org/t/possible-to-distinguish-directionality-per-condition-in-cytotrace/1367/3 "2023-05-02T17:51:26Z")

</div>

Hi @Marius1311,

Thank you for your reply, I subsetted the adata taking cells from the 2 conditions. Condition 1 has more cells (2543), condition 2 has 961 cells. All works with adata condition 1 but when I run ctk.compute\_transition\_matrix(threshold\_scheme=“soft”, nu=0.5) for adata condition 2, I get the following error: NetworkXError: Adjacency matrix not square: nx,ny=(961, 960)  
Could it be because there needs to be a minimum number of cells?  
(If I add cells from naive condition then it works again although graph looks strange).

Thank you so much in advance.
