Biowulf High Performance Computing at the NIH
dyno: inferring single-cell trajectories

dyno is a meta package that installs several other packages from the dynverse.
It comprises a set of R packages to construct and interpret single-cell trajectories.


Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program. Sample session:

[user@biowulf ~]$ sinteractive --mem=12g -c4 --gres=lscratch:10 --tunnel
On Linux/MacOS, open a terminal and run:

    ssh  -L 33521:localhost:33521
Store the port number you get (in this case: 33521)
On your local system (PC or Mac), open a (second) terminal/linux shell and type:
ssh -t -L 33521:localhost:33521" 
(make sure to use the port number you stored instead of 33521).
Now return to the original (first) terminal/linux shell.
[user@cn0868 ~]$ module load dyno
[+] Loading dyno  20210709  on cn0973
[+] Loading singularity  3.8.0  on cn0973
[+] Loading HDF5  1.8.13

[user@cn0868 ~]$ mkdir -p /data/$USER/singularity
[user@cn0868 ~]$ export SINGULARITY_CACHEDIR=/data/$USER/singularity
[user@cn0868 ~]$ export SINGULARITY_TMPDIR=/data/$USER/singularity

[user@cn0868 ~]$ R
>  .libPaths(c(Sys.getenv("R_LIBS"), .libPaths())) 
>  library(dyno) 
Loading required package: dynfeature
Loading required package: dynguidelines
Loading required package: dynmethods
Loading required package: dynplot
Loading required package: dynwrap
>  dynwrap::test_singularity_installation(detailed = TRUE) 
✔ Singularity is installed
✔ Singularity is at correct version (>=3.0): 3.8.0 is installed
INFO:    Creating SIF file...
✔ Singularity can pull and run a container from Dockerhub
INFO:    Using cached SIF image
✔ Singularity can mount temporary volumes
✔ Singularity test successful ------------------------------------------------------------
[1] TRUE
>  data("fibroblast_reprogramming_treutlein")  
>  dataset <- wrap_expression(counts = fibroblast_reprogramming_treutlein$counts, expression = fibroblast_reprogramming_treutlein$expression) 
>  guidelines <- guidelines_shiny(dataset, port=33521, launch.browser=F) 
Loading required package: shiny

Listening on
Warning: All elements of `...` must be named.
Did you want `renderers = c(column_id, renderer, label, title, style, default, name, trajectory_type,
    category_old, scaling_type)`?
Loading required namespace: akima

On your local system (PC or Mac), open a web browser or new tab on it, and navigate to:
(make sure to use the port number you stored instead of 33521)

Select method(s) to be used, then close the browser window/tab, or click on "Close & use"
>  methods_selected <- guidelines$methods_selected 
>  methods_selected 
[1] "slingshot" "paga_tree" "scorpius"  "angle"
>  model <- infer_trajectory(dataset, methods_selected[1]) 
Running singularity exec 'docker://dynverse/ti_slingshot:v1.0.3' echo hi
Running /usr/local/current/singularity/3.8.0/bin/singularity exec \
  --containall -B \
  '/tmp/RtmppFshCi/file941a3d4b0be4/:/copy_mount,/tmp/RtmppFshCi/file941a8f3b018/tmp:/tmp2' \
  'docker://dynverse/ti_slingshot:v1.0.3' cp /code/definition.yml \
(the computation may take a few minutes)
>  library(magrittr) 
>  model <- model %>% add_dimred(dyndimred::dimred_mds, expression_source = dataset$expression)
>  plot_dimred(model, expression_source = dataset$expression, grouping = fibroblast_reprogramming_treutlein$grouping )  
Coloring by grouping
Loading required namespace: RColorBrewer

>  q() 
[user@cn0868 ~]$ exit
salloc.exe: Relinquishing job allocation 49998864

[user@biowulf ~]$