Git Product home page Git Product logo

Comments (9)

kstreet13 avatar kstreet13 commented on July 21, 2024

Hi @tiagobrc,

Thanks and great question! This is something that I've sort of gone back and forth on, but I think the best answer (for now) is to separate the groups of cells that shouldn't be connected and run Slingshot separately on each group. Slingshot technically has the ability to handle these cases, but it requires careful specification of the omega parameter in getLineages (which sets the maximum allowable distance for connecting clusters). Since the distances between clusters are based on the covariance matrices of the clusters (and not just standard euclidean distances), I think this parameter is not very intuitive.

Another consideration is that separating the cell types may actually improve the resolution of your dimensionality reduction. When it doesn't have to account for the big differences between T cells and B cells, UMAP may be able to recover more detailed structure within each group (note: I'm not an expert on UMAP, but my understanding is that it attempts to preserve some global structure, so I think this principle should apply).

Hope this helps!

from slingshot.

tiagobrc avatar tiagobrc commented on July 21, 2024

Thanks for your help!

from slingshot.

Yale73 avatar Yale73 commented on July 21, 2024

Hi @tiagobrc,

Thanks for such a powerful and easy-to-learn package. I have two similar questions and hope you can help me.

First, I also found different cell types (e.g. APC and T) have lineages when running slingshot. I am not sure whether it suggests the potential interaction, like APCs will act on T cells? Is it possible or you think it is fake lineage?

Second, we ran the slingshot for different T cell subsets. For big clusters (1-17), I got 7 lineages. We know clusters 5 and 6 are very close from umap and marker genes, but we didn't get lineages in this way.

lnes@lineages
$Lineage1
[1] "10" "9" "15" "8" "7" "1" "13" "5"
$Lineage2
[1] "10" "9" "15" "8" "7" "12" "3" "14"
$Lineage3
[1] "10" "9" "15" "8" "7" "1" "13" "6"
$Lineage4
[1] "10" "9" "15" "8" "7" "11" "2"
$Lineage5
[1] "10" "9" "15" "8" "7" "11" "16"
$Lineage6
[1] "10" "9" "15" "8" "7" "1" "17"
$Lineage7
[1] "10" "9" "15" "8" "7" "4"

Then we just ran 5 and 6 and found they have a lineage.

lineages: 1 
Lineage1: 6  5  

curves: 1 
Curve1: Length: 26.513	Samples: 189

Do you think the lineage between 5 and 6 is real? How to explain the discrepancy results from big clusters (1-17) and small clusters (5-6)?

Thanks,
Yale

from slingshot.

kstreet13 avatar kstreet13 commented on July 21, 2024

Hi @Yale73,

I can't tell how you ran it, but if you want to be able to pick up multiple, disconnected trajectories, you need to set omega = TRUE when running slingshot (or getLineages). You can also use a specific value to manually set the maximum allowable distance between clusters. Without this option, slingshot will always try to connect everything into one trajectory (as would most trajectory inference methods). I would recommend inspecting the dimensionality reduction to determine whether or not this is appropriate.

Similarly, I think this explains your second issue. When you run slingshot (or most any other TI method) on just two clusters, it will always say that they form a trajectory (again, unless you set the omega argument).

Best,
Kelly

from slingshot.

Yale73 avatar Yale73 commented on July 21, 2024

Hi @kstreet13,

Thanks,
I set the omega = TRUE,
lnes <- getLineages(reducedDim(TA.se,"PCA"), TA.se$clusters, omega = TRUE, omega_scale=1.5)
but still get the curve even though they are not supposed to have a trajectory.

See the following PC plot and slingshot curve.
PC plot
Rplot

Whether it means we cannot only depend on lineages and curves?

Thanks,
Yale

from slingshot.

kstreet13 avatar kstreet13 commented on July 21, 2024

If you know a priori that they shouldn't share a trajectory, then it sounds like there's no reason to keep them together when running slingshot. Based on this plot, however, the three clusters look to share a considerable amount of overlap, so it's not surprising that slingshot is unable to detect any separation between them.

Also, on a slightly different note, there doesn't appear to be any clear trajectory structure in any of the clusters; they all just kind of look like Gaussian noise. Unfortunately, I think that whatever combination of clusters you select, it's likely that you will get a similarly uninformative curve.

from slingshot.

Yale73 avatar Yale73 commented on July 21, 2024

We run irrelevant ones for a sanity check, as we also want to use trajectory to validate our hypothesis.

Thanks for your time and patience. One last question, as you said, whether I can summarize If two clusters are relevant and the diffusion map doesn't show any overlap, while the slingshot finds the lineage and curve, then I can say it is a real trajectory? Like the following two clusters, they have a trajectory, right?

New Microsoft PowerPoint Presentation

Thanks again,
Yale

from slingshot.

kstreet13 avatar kstreet13 commented on July 21, 2024

Unfortunately, trajectory inference is like clustering in the sense that there is no way to know the truth. There's no computational way to determine if a trajectory is "real."

For what it's worth, I don't see anything that looks like a convincing trajectory structure here. The fact that the clusters are separated doesn't tell us much (clustering algorithms will always find clusters) and the overall distribution looks like it's mostly noise.

from slingshot.

Yale73 avatar Yale73 commented on July 21, 2024

OK, I see. Thanks again!

All the best,
Yale

from slingshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.