dynverse / dyno

Inferring, interpreting and visualising trajectories using a streamlined set of packages 🦕
https://dynverse.github.io/dyno
Other
166 stars 32 forks source link

Selecting expression value for infer_trajectory #39

Closed m-zaki closed 5 years ago

m-zaki commented 5 years ago

Dear authors,

Thanks for the great package.

I was wondering if there is a way to select for the expression values while using infer_trajectory Please find an example below;

Creating the dataset (sce referes to SingleCellExperiment object)

RawCount <- t(assay(sce, "logcounts"))
NormExprs <-  t(assay(sce, "norm_exprs"))

dataset <- wrap_expression(
  counts = RawCount,
  expression = NormExprs)

After selecting the guidelines with the shinyapp, proceed to infer trajectory

model <- infer_trajectory(dataset, "slingshot", verbose=TRUE")

Which returns the following.

Executing 'slingshot' on '20190226_084323__data_wrapper__SETXwUVAWV' With parameters: list(shrink = 1, reweight = TRUE, reassign = TRUE, thresh = 0.001, maxit = 10L, stretch = 2, smoother = "smooth.spline", shrink.method = "cosine") And inputs: counts, start_id

I was wondering, how could we selct for a different expression input for slingshot? Specifcally if I want to use the normalised expression that has been log-transformed. Therefore I would like to skip the default log transformation.

Many thanks again for the great package

Best Zaki

zouter commented 5 years ago

Hi Zaki

You have a valid point, although this is not yet supported. For our benchmark the main idea was that the developer of a method decides what normalisation is most appropriate for their method. From a user perspective, this is perhaps not always the most desirable behaviour... At the moment, we're redesigning the way each method is wrapped, so I can't easily add this behaviour now, but will have another look in a couple of weeks once these updates are integrated!

Thanks for trying out the package Wouter