Commits (3)
......@@ -477,4 +477,38 @@ alias make_igv_session="kscript https://git.io/vyLlj"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
igv(){ ${BIO_BIN_BASE}/IGV_2.4.7/igv.sh "$@"; }
\ No newline at end of file
## create an renv to keep track of R packages specific to the project
create_renv() {
# set -e
to_initiate="$1" ## here renv will go
## initiate bare renv project in PRJ_SCRIPTS
echo "Moving to ${to_initiate} and creating renv"
cd ${to_initiate}
echo "Location is" `pwd`
if [ -d "renv" ]; then
R --slave -e 'renv::init(bare = TRUE)'
echo "Find libraries and install packages from the following directories:"
echo "${@}"
# shift 1
Rscript ${NGS_TOOLS}/common/hydrate_renv.R ${to_initiate} --sourceDirs ${to_source}
echo "renv successfully created."
echo "renv folder already exists. Skipping renv setup."
echo "Make sure that your .Rprofile contains the following code:"
echo "if (Sys.getenv('PRJ_SCRIPTS') != '') { renv::load(project = Sys.getenv('PRJ_SCRIPTS')) }"
echo "This will make sure that everytime we are working on a project the the renv library will be used".
export -f create_renv