-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07d16c6
commit 1a23868
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
############################################################################### | ||
# | ||
# Create internal conda envs with all dependencies | ||
# | ||
# AUTHOR: Maciej_Bak | ||
# CONTACT: wsciekly.maciek@gmail.com | ||
# | ||
############################################################################### | ||
|
||
# exit at a first command that exits with a !=0 status | ||
set -eo pipefail | ||
|
||
$CONDA_PREFIX/bin/snakemake \ | ||
--snakefile="workflow/Snakefile" \ | ||
--configfile="tests/localtest/config-template.yml" \ | ||
--config workflow_repo_path="$PWD" workflow_analysis_outdir="$PWD/tests/localtest/output" \ | ||
--use-conda \ | ||
--conda-create-envs-only \ | ||
--conda-frontend=conda \ | ||
--cores 1 \ | ||
--nolock \ | ||
all | ||
|
||
for file in .snakemake/conda/*.yaml; do | ||
if [ -f "$file" ]; then | ||
if grep -q "name: warlock-r" "$file"; then | ||
ENVPATH="${file%.yaml}" | ||
break | ||
fi | ||
fi | ||
done | ||
|
||
eval "$(conda shell.bash hook)" | ||
conda deactivate | ||
conda activate $ENVPATH | ||
|
||
# strange error often appears, installation needs to be called twice | ||
Rscript -e "devtools::install('resources/demonanalysis', upgrade=TRUE)" || true | ||
Rscript -e "devtools::install('resources/demonanalysis', upgrade=TRUE)" || true |