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

Scripts will be installed with package #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ryanrichholt
Copy link

As noted in #33, Following the install instructions here: https://github.com/broadinstitute/ichorCNA/wiki/Installation results in the runIchorCNA.R launcher script not being installed.

Moving the scripts into inst/ will mean they get installed with the package. Making them executable, and adding the shebang, means they can be added to the system PATH. Just add the package bin directory to your path after installing:

If you're uncertain where the package was installed you can find it with R system.file

> system.file('bin/', package='ichorCNA')
[1] "/usr/local/lib/R/3.4/site-library/ichorCNA/bin/"

Then you can that directory to your path (via .bashrc etc..), and the script can be called from anywhere:

$ export PATH="$PATH:/usr/local/lib/R/3.4/site-library/ichorCNA/bin/"
$ runIchorCNA.R -h
Usage: /usr/local/lib/R/3.4/site-library/ichorCNA/bin/runIchorCNA.R [options]
...

@jurhoades
Copy link
Collaborator

Thanks for the suggestion and sorry for the delayed response. Would you be able to resolve the conflicts so we can get this merged?

@ryanrichholt
Copy link
Author

I think I've got it merged with the latest commit now. Thanks for checking it out

@ju-cheng
Copy link

ju-cheng commented Feb 2, 2021

HI @ryanrichholt , I tried to look for the package. The system seemed not able to locate it.

library('devtools')
Loading required package: usethis
library('ichorCNA')
system.file('bin/',package='ichorCNA')
[1] ""

@ryanrichholt
Copy link
Author

@ju-cheng This PR was never merged, so that command will fail because the bin directory is not created when installing this package. If you search for a different item, it will probably work. For example,

> system.file('bin', package='ichorCNA')
[1] ""
> system.file('', package='ichorCNA')
[1] "C:/Users/rrichholt/Documents/R/win-library/3.6/ichorCNA"
> system.file('html', package='ichorCNA')
[1] "C:/Users/rrichholt/Documents/R/win-library/3.6/ichorCNA/html"

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

Successfully merging this pull request may close these issues.

3 participants