broadinstitute / ichorCNA

Estimating tumor fraction in cell-free DNA from ultra-low-pass whole genome sequencing.
GNU General Public License v3.0
160 stars 87 forks source link

Scripts will be installed with package #38

Open ryanrichholt opened 6 years ago

ryanrichholt commented 6 years ago

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 commented 5 years ago

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 commented 5 years ago

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

ju-cheng commented 3 years ago

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 commented 3 years ago

@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"