pinellolab / STREAM

STREAM: Single-cell Trajectories Reconstruction, Exploration And Mapping of single-cell data
http://stream.pinellolab.org
GNU Affero General Public License v3.0
168 stars 45 forks source link

plot function: branch or leaf #116

Open MingBit opened 3 years ago

MingBit commented 3 years ago

Hey!

Thanks again for the great tool! I am still stick with it. :-) I noticed that the trajectory looks slight different in terms of different functions (st.plot_stream_sc vs st.plot_stream). As you can see, the pink cluster C5 is the branch point in fig.1 (stream plot) but becomes a leaf in fig.2 (stream plot at single cell level)

I checked the dimension_reduction fig.3.. Is it supposed to be a leaf. :-) As illustrated in dimension_reduction figure, the branch point looks like somewhere in C4 Any idea how to adjust it? Thank you in advance.

image image image

huidongchen commented 3 years ago

Sorry about the confusion. They are actually the same.

Re C5, the difference you are seeing is due to the way STREAM plot visualizes the branching event. More specifically, in STREAM plot, around the branching point, the main branch(S3_S0) will take into consideration the cells of its sub-branches in order to highlight the proportion of cells of this cell type going into two sub-branches.

As you see in stream plot around the branching point, the main branch is split into a much larger proportion of C5 cells going to the upper branch and a tiny proportion of C5 cells going downwards, which is consistent with single-cell-level stream plot.

But this distribution can be alleviated by increasing the number of windows in stream plot (factor_num_win)

MingBit commented 3 years ago

Perfect!! It works! :+1: