Slingshot method does not detect groups_id and dimred prior information
I am trying to run Slingshot (latest master build) with prior information (groups_id and dimred) however neither of these arguments are detected by the relevant method:
mod <- infer_trajectory(dat, ti_slingshot(), give_priors = c("groups_id", "dimred"), verbose = TRUE, debug = TRUE)
Executing 'slingshot' on '20200328_223607__data_wrapper__f5hbVLafKb'
With parameters: list(cluster_method = "pam", ndim = 20L, shrink = 1L, reweight = TRUE, reassign = TRUE, thresh = 0.001, maxit = 10L, stretch = 2L, smoother = "smooth.spline", shrink.method = "cosine")
inputs: expression
priors :
Input saved to /tmp/folders/5r/s597hc5j3w93_x8_tn57w3g80000gn/T//RtmpLdSW89/file44e357c0b05f/ti
Running method using babelwhale
Use this command to enter the container:
/usr/local/bin/docker run --entrypoint bash --rm -it --name 20200328_225620__container__Eg6EyZfTQZ -e TMPDIR=/tmp2 --workdir /ti/workspace -v /tmp/folders/5r/s597hc5j3w93_x8_tn57w3g80000gn/T//RtmpLdSW89/file44e357c0b05f/ti:/ti -v /tmp/folders/5r/s597hc5j3w93_x8_tn57w3g80000gn/T//RtmpLdSW89/file44e32b7b59fb/tmp:/tmp2 dynverse/ti_slingshot:v1.0.3
Running /usr/local/bin/docker run --entrypoint bash --rm --name 20200328_225620__container__Eg6EyZfTQZ -e \
'TMPDIR=/tmp2' --workdir /ti/workspace -v \
'/tmp/folders/5r/s597hc5j3w93_x8_tn57w3g80000gn/T//RtmpLdSW89/file44e357c0b05f/ti:/ti' -v \
'/tmp/folders/5r/s597hc5j3w93_x8_tn57w3g80000gn/T//RtmpLdSW89/file44e32b7b59fb/tmp:/tmp2' \
'dynverse/ti_slingshot:v1.0.3'
Output saved to /tmp/folders/5r/s597hc5j3w93_x8_tn57w3g80000gn/T//RtmpLdSW89/file44e357c0b05f/ti/output.h5
Attempting to read in output with hdf5
The ti_slingshot.R code itself can handle these two arguments being passed into the function: https://github.com/dynverse/ti_slingshot/blob/master/package/R/ti_slingshot.R
I wonder if it's because neither of these arguments is listed in the "wrapper_input_optional" field for the method:
subset(dynmethods::methods, method_id == "slingshot")$wrapper_input_optional
[[1]]
[1] "start_id" "end_id"
Thanks, James
Hi, I have the same problem. I tried to modify the wrapper_input_optional adding "groups_id" and "dimred" but it didn't work
Massimo
Hi all, Has anybody solved this issue? I have tried exploring maxlarosa's approach with no luck.
Thanks, Nacho Z
EDIT: in case this helps someone else. The add_prior_information function helps define the prior information (i.e. dimred, start_id, etc), whereas the give_priors indicates which of the define prior information to be used in the inference. Only when using these two functions, slingshot accepted them.
Note that there is also add_dimred and add_grouping that will also add them under the prior information slot of the wrapper.