Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider packaging as R package #2

Open
JEFworks opened this issue Sep 9, 2018 · 2 comments
Open

Please consider packaging as R package #2

JEFworks opened this issue Sep 9, 2018 · 2 comments

Comments

@JEFworks
Copy link

JEFworks commented Sep 9, 2018

Dependencies such as monocle-docker currently source files from this repo as seen here:

library(monocle)
source("/home/traj-converters/src/R/monocle_convert.r")
...

This requires users to maintain a folder explicitly in their home directory, which may not be possible when using shared resources for example.

It would be much easier for users and for Dockerizing if these trajectory converters can simply be loaded as a library:

library(monocle)
library(traj-converters)
...

The Dockerfile will then also be also be modified to add:

RUN R -e 'install.packages(c("devtools"))
devtools::install_github('Stuartlab-UCSC/traj-converters')

Many resources including Hadley's guide for making R packages are available to help you make these conversion functions available as a part of a traj-converters package.

@mrJeppard
Copy link
Collaborator

Thank you, yes that is a future goal.

Please note that the usage of source does not require users to maintain a folder explicitly in their home directory. You may clone traj-converters to any/directory and then source("any/directory/traj-converters/src/R/monocle_convert.r") from R. In the case of monocle-docker /home is where the traj-converters directory is copied inside the container.

@JEFworks
Copy link
Author

Hi Duncan,

Excellent.

I see. I was testing the scripts outside of Docker as it was taking awhile to build. The scripts work fine in the context of the Docker image.

Best,
Jean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants