azizilab / decipher

A single-cell analysis toolkit to jointly analyze samples from distinct conditions
18 stars 0 forks source link

Configuring trajectories with dc.tl.TConfig #3

Open lu-r-lu opened 9 months ago

lu-r-lu commented 9 months ago

Hello

I am new to using this type of tools, and I definitely need some help with using dc.tl.trajectories(). Would it be possible to receive a more detailed explanation on how to configure the trajectories using these functions? Especially with the format of the variables to feed into the dc.tl.TConfig function. I've tried to replicate the format used in the tutorial but all I get is errors

Thank you in advance All the best L.

itamarb-cgen commented 9 months ago

Hi,

lu-r-lu commented 9 months ago

Thanks for the reply I actually got something to work, but I am unsure about how to properly control the input to output sequence. So I assume it isn't really an issue with the package version, but rather with myself not fully understanding what goes in in order to get the desired output. Will tune in for the talk later if available on Youtube. Might be useful for my understanding

All the best, L.

itamarb-cgen commented 9 months ago

Something like the following worked for me, where the numbers are the clusters produced by decipher:

dc.tl.cell_clusters(adata1)
dc.pl.decipher(adata1, ["decipher_clusters"],wspace=0.8)

dc.tl.trajectories(
   adata1,
   dc.tl.TConfig("G1", '20', '2', field, "G1"),
   dc.tl.TConfig("G2", '9', '16', "field", "G2"),
)
fig=dc.pl.trajectories(adata1, color=field)
plt.show()
lu-r-lu commented 9 months ago

Thank you. Something similar worked for me, too. What I am still struggling with a bit is setting up trajectories a bit more purposely, but getting there.