diff --git a/README.md b/README.md index 795d33917367b7fd4381a818067d24e4d3b979e6..9fbd72fdc0a3af64ba960e437ac114843a034823 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ To get the last commits from this repository into your fork use the following co git remote add upstream gitlab_lbmc:pipelines/nextflow.git git pull upstream master ``` +If you created your `.config` file before version `0.4.0` you need to run the script `src/.update_config.sh` to use the latest docker, singularity and conda configuration (don't forget to check your config files afterward for typos). ## Getting Started diff --git a/src/.update_config.sh b/src/.update_config.sh new file mode 100644 index 0000000000000000000000000000000000000000..8d66be127de642ba1b3a4075d14cb12574e40cad --- /dev/null +++ b/src/.update_config.sh @@ -0,0 +1,18 @@ +# update docker url +fd ".*config" -E "nf_modules" src/ -x perl -0777pe 's|container = "|container = "lbmc/|g' -i {} + +# update singularity url +fd ".*config" -E "nf_modules" src/ -x perl -pe 's|container = "lbmc/file://bin/(.*).img"|container = "lbmc/\1"|g' -i {} + +# update singularity config +fd ".*config" -E "nf_modules" src/ -x perl -0777pe 's|\n\s*singularity {\n\s*singularity.enabled = true|\n singularity {\n singularity.enabled = true\n singularity.cacheDir = "./bin/"|mg' -i {} + +# update in2p3 config +fd ".*config" -E "nf_modules" src/ -x perl -0777pe 's|\n\s*ccin2p3 {\n\s*singularity.enabled = true|\n ccin2p3 {\n singularity.enabled = true\n singularity.cacheDir = "/sps/lbmc/common/singularity/"|mg' -i {} +fd ".*config" src/ -x perl -pe 's|container = "lbmc//sps/lbmc/common/singularity/(.*).img"|container = "lbmc/\1"|g' -i {} + +# we remove the ccin2p3_conda section +fd ".*config" -E "nf_modules" src/ -x perl -0777pe "s|\s*ccin2p3_conda {.*ccin2p3 {\n|\n ccin2p3 {\n|msg" -i {} + +# we update the psmn module to conda +fd ".*config" -E "nf_modules" src/ -x perl -0777pe 's|beforeScript = "source /usr/share/lmod/lmod/init/bash; module use ~/privatemodules"\n\s*module = "(.*)/(.*)"|beforeScript = "source \$baseDir/.conda_psmn.sh"\n conda = "\$baseDir/.conda_envs/\L\1_\2"|mg' -i {}