dynmethods icon indicating copy to clipboard operation
dynmethods copied to clipboard

Wrap some methods directly in R

Open zouter opened this issue 5 years ago • 6 comments

We don't want to make this list too long, as this will make it hard to maintain in the long run.

Current shortlist:

  • [x] Slingshot
  • [ ] SCORPIUS
  • [ ] Monocle 3

zouter avatar Apr 02 '19 12:04 zouter

y tho

rcannood avatar Apr 02 '19 13:04 rcannood

Wouter and I discussed this in person; it's a good idea to have dynmethods support a few methods out of the box without having to install docker, though I think submitting cran should have a higher priority.

rcannood avatar Apr 02 '19 13:04 rcannood

https://github.com/dynverse/dynmethods/tree/scorpius_package is a first attempt at doing this.

When a user runs ti_scorpius, it will give you a prompt asking whether you want to use the R wrapper or the docker wrapper. When choosing the R wrapper, the dynverse/ti_scorpius package will be installed and run using dynwrap::create_ti_method_r()

zouter avatar Apr 09 '19 14:04 zouter

Wouter and I discussed this in person; it's a good idea to have dynmethods support a few methods out of the box without having to install docker, though I think submitting cran should have a higher priority.

Well I can't submit to CRAN if dynutils is not updated! :grin:

zouter avatar Apr 10 '19 12:04 zouter

@rcannood

You can find an example at https://github.com/dynverse/ti_scorpius/tree/package

definition.yml and example.sh are symlinked. This seemed to me the cleanest way of putting these both in the root directory and the package directory.

The definition.yml contains a "package" section, which describes the package. The only place that this is really used is in dynmethods. In principle, the two values here are not necessary because (1) the remote package can be extracted in dynmethods by checking the git remote and (2) the r_function can be assumed to have the name ti_[method_id].

Testing is included inside the package but this can be quite verbose because I don't want to depend directly dyntoy. So the example dataset is generated first using the package/tests/generate_test_data.sh script which calls the package/inst/example.sh scripts which saves an hdf5 file inside package/inst/example.h5 which is used for testing. Not ideal, perhaps we should depend on dyntoy...

Otherwise, most things are pretty clean, e.g. the run.R directly calls the run function of the package, the version number is extracted from the DESCRIPTION, etc

Any recommendations @rcannood ?

zouter avatar Apr 10 '19 14:04 zouter

dyntoy is now in suggests, which cleans up the testing quite a bit! https://github.com/dynverse/ti_scorpius/commit/0cc4d8a45a0e0671ab570974a40628de483221c6

zouter avatar Apr 17 '19 10:04 zouter