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

Allow installations with customisable env names #371

Merged
merged 4 commits into from
Nov 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions conda/environments/pipelines-ide.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# This environment will include other dependencies to assist with the development and running of pipelines

name: cgat-p

channels:
- bioconda
- conda-forge
- defaults

dependencies:
- sphinx_bootstrap_theme
- rstudio
- spyder
- multiqc

46 changes: 40 additions & 6 deletions install-CGAT-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ else

fi # if travis install

# set installation folder
CONDA_INSTALL_DIR=$CGAT_HOME/conda-install
CONDA_INSTALL_ENV="cgat-p"

# set conda environment name
[[ ${CONDA_INSTALL_ENV} ]] || CONDA_INSTALL_ENV="cgat-p"

} # get_cgat_env

Expand Down Expand Up @@ -244,10 +247,7 @@ if [[ "$OS" != "travis" ]] ; then
if [[ $INSTALL_DEVEL ]] || [[ $INSTALL_PRODUCTION ]] ; then

# install extra deps
wget -O env-extra-pipelines.yml https://raw.githubusercontent.com/CGATOxford/CGATPipelines/${TRAVIS_BRANCH}/conda/environments/pipelines-extra.yml
conda env update --quiet --name ${CONDA_INSTALL_ENV} --file env-extra-pipelines.yml
wget -O env-extra-scripts.yml https://raw.githubusercontent.com/CGATOxford/cgat/${SCRIPTS_BRANCH}/conda/environments/scripts-extra.yml
conda env update --quiet --name ${CONDA_INSTALL_ENV} --file env-extra-scripts.yml
install_extra_deps

# make sure you are in the CGAT_HOME folder
cd $CGAT_HOME
Expand Down Expand Up @@ -326,6 +326,27 @@ fi # if travis install
} # conda install


# install extra dependencies
install_extra_deps() {

log "install extra deps"

wget -O env-extra-pipelines.yml https://raw.githubusercontent.com/CGATOxford/CGATPipelines/${TRAVIS_BRANCH}/conda/environments/pipelines-extra.yml
wget -O env-extra-scripts.yml https://raw.githubusercontent.com/CGATOxford/cgat/${SCRIPTS_BRANCH}/conda/environments/scripts-extra.yml

conda env update --quiet --name ${CONDA_INSTALL_ENV} --file env-extra-pipelines.yml
conda env update --quiet --name ${CONDA_INSTALL_ENV} --file env-extra-scripts.yml

if [[ $INSTALL_IDE ]] ; then

wget -O env-ide.yml https://raw.githubusercontent.com/CGATOxford/CGATPipelines/${TRAVIS_BRANCH}/conda/environments/pipelines-ide.yml

conda env update --quiet --name ${CONDA_INSTALL_ENV} --file env-ide.yml

fi

}

# need to install the CGAT Code Collection as well
install_cgat_scripts() {

Expand Down Expand Up @@ -608,7 +629,10 @@ SCRIPTS_BRANCH="master"
# type of installation
CONDA_INSTALL_TYPE_PIPELINES=
CONDA_INSTALL_TYPE_SCRIPTS=

# rename conda environment
CONDA_INSTALL_ENV=
# install additional IDEs
INSTALL_IDE=

# parse input parameters
# https://stackoverflow.com/questions/402377/using-getopts-in-bash-shell-script-to-get-long-and-short-command-line-options
Expand Down Expand Up @@ -684,6 +708,16 @@ case $key in
shift 2
;;

--ide)
INSTALL_IDE=1
shift
;;

--env-name)
CONDA_INSTALL_ENV="$2"
shift 2
;;

*)
help_message
;;
Expand Down