kstreet13 / slingshot

Functions for identifying and characterizing continuous developmental trajectories in single-cell data.
258 stars 42 forks source link

how to analyze with 3 different treatments #235

Closed AndreaYCT closed 6 months ago

AndreaYCT commented 7 months ago

Hi,

I have four treatments in my integrated Seurat and each treatment has 3 replicates. I want to analyze the effect of treatment on lineages.

(1) In my imagination, I should subset only treatment and control to perform slingshot and tradeSeq. In this case, i should analyze the number of knot with this subset Seurat (not all integrated Seurat). Is it correct?

(2) I tried to use:

SingleCellExperiment <- as.SingleCellExperiment(integrated, assay = "RNA") 
saveRDS (SingleCellExperiment, file=paste(CurrentDataSet, "asSingleCellExperiment for tradeSeq.RDS"))
StartCluster <- c("RPC_3")
print(StartCluster)
Slingshot <- slingshot(SingleCellExperiment, clusterLabels = colData(SingleCellExperiment)$ident, reducedDim="UMAP", star.clus=StartCluster)

But this show an error: Error in smooth.spline(lambda, xj, w = w, ..., df = df, tol = tol, keep.data = FALSE, : unused argument (star.clus = "RPC_3") Calls: slingshot ... tryCatch -> tryCatchList -> tryCatchOne -> In addition: There were 19 warnings (use warnings() to see them) Execution halted

Anyone could provide some suggestion for this?

Many thanks!

kstreet13 commented 7 months ago

Hi @AndreaYCT,

The issue here is that you used "star.clus" rather than "start.clus". Fixing that should resolve this error. And I tend to recommend running Slingshot on all the data (treatment and control), so that it's all on the same set of lineages, then you can compare different conditions. We show some examples of this in the condiments package.

Best, Kelly

AndreaYCT commented 7 months ago

@kstreet13

Thank you! I still got warning msg:

warnings() Warning messages: 1: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 2: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 3: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 4: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 5: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 6: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 7: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 8: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 9: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 10: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 11: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 12: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 13: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 14: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 15: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 16: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE. 17: useNames = NA is deprecated. Instead, specify either useNames = TRUE or useNames = TRUE.

Not sure if it affects the result.

I will take a look your suggestion!

kstreet13 commented 7 months ago

Hi @AndreaYCT,

That shouldn't affect the results. It's related to row/column names and I think it's been resolved in recent updates, but regardless, it should be safe to ignore it.

Best, Kelly

AndreaYCT commented 7 months ago

@kstreet13

Thank you!

Hi @AndreaYCT,

That shouldn't affect the results. It's related to row/column names and I think it's been resolved in recent updates, but regardless, it should be safe to ignore it.

Best, Kelly