From f0180d74669203383385986e92291306f8e75d4f Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Tue, 5 Jun 2018 21:05:34 +0200 Subject: [PATCH 01/31] Add NGSPlotDB-hg19-data recipe --- recipes/r-ngsplot-hg19/meta.yaml | 29 ++++++++++++++++++ recipes/r-ngsplot-hg19/post-link.sh | 44 ++++++++++++++++++++++++++++ recipes/r-ngsplot-hg19/pre-unlink.sh | 1 + 3 files changed, 74 insertions(+) create mode 100644 recipes/r-ngsplot-hg19/meta.yaml create mode 100644 recipes/r-ngsplot-hg19/post-link.sh create mode 100644 recipes/r-ngsplot-hg19/pre-unlink.sh diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml new file mode 100644 index 0000000000000..078a464595630 --- /dev/null +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -0,0 +1,29 @@ +{% set version = "3.00" %} +{% set name = "ngsplotdb-hg19" %} + +package: + name: 'ngsplotdb-{{ name|lower }}' + version: '{{ version }}' +source: + fn: '{{ name }}_{{ version }}.tar.gz' + url: + - 'https://doc-0g-a0-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/jiksn2m41cm3dbspq0nqt102h6m6eo1o/1528221600000/01382619737792242945/*/0B5hDZ2BucCI6SURYWW5XdUxnbW8?e=download' + sha256: a3ad6daceec383f88faf3d3ee899f2bef37b3be2658ee9afa01e86404c0c92bd +build: + number: 0 + rpaths: + - lib/R/lib/ + - lib/ +requirements: + build: + - 'r-ngsplot' + - r-base + run: + - 'r-ngsplot' + - r-base + - wget + +about: + home: 'https://github.com/shenlab-sinai/ngsplot' + license: GPL-2.0 + summary: 'Quick mining and visualization of NGS data by integrating genomic databases' diff --git a/recipes/r-ngsplot-hg19/post-link.sh b/recipes/r-ngsplot-hg19/post-link.sh new file mode 100644 index 0000000000000..68a317a42aac8 --- /dev/null +++ b/recipes/r-ngsplot-hg19/post-link.sh @@ -0,0 +1,44 @@ +#!/bin/bash +FN="ngsplotdb_hg19_75_3.00.tar.gz" +URLS=( + "https://doc-0g-a0-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/jiksn2m41cm3dbspq0nqt102h6m6eo1o/1528221600000/01382619737792242945/*/0B5hDZ2BucCI6SURYWW5XdUxnbW8?e=download" +) +sha256="a3ad6daceec383f88faf3d3ee899f2bef37b3be2658ee9afa01e86404c0c92bd" + +# Use a staging area in the conda dir rather than temp dirs, both to avoid +# permission issues as well as to have things downloaded in a predictable +# manner. +STAGING=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM +mkdir -p $STAGING +TARBALL=$STAGING/$FN + +SUCCESS=0 +for URL in ${URLS[@]}; do + wget -O- -q $URL > $TARBALL + [[ $? == 0 ]] || continue + + # Platform-specific md5sum checks. + if [[ $(uname -s) == "Linux" ]]; then + if md5sum -c <<<"$MD5 $TARBALL"; then + SUCCESS=1 + break + fi + else if [[ $(uname -s) == "Darwin" ]]; then + if [[ $(md5 $TARBALL | cut -f4 -d " ") == "$MD5" ]]; then + SUCCESS=1 + break + fi + fi +fi +done + +if [[ $SUCCESS != 1 ]]; then + echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:" + printf '%s\n' "${URLS[@]}" + exit 1 +fi + +# Install and clean up +ngsplotdb.py install ngsplotdb_hg19_75_3.00.tar.gz +rm $TARBALL +rmdir $STAGING \ No newline at end of file diff --git a/recipes/r-ngsplot-hg19/pre-unlink.sh b/recipes/r-ngsplot-hg19/pre-unlink.sh new file mode 100644 index 0000000000000..d5a8311cd5e2c --- /dev/null +++ b/recipes/r-ngsplot-hg19/pre-unlink.sh @@ -0,0 +1 @@ +ngsplotdb.py remove hg19 \ No newline at end of file From f4d66f2d1ea03019a481dbfc4e85673a386cd651 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Tue, 5 Jun 2018 21:12:02 +0200 Subject: [PATCH 02/31] Okay, lets test this --- recipes/r-ngsplot-hg19/meta.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index 078a464595630..3fe4a60d1927a 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -22,7 +22,9 @@ requirements: - 'r-ngsplot' - r-base - wget - +test: + commands: + - 'ngsplotdb.py install ngsplotdb-hg19_3.00.tar.gz | true' about: home: 'https://github.com/shenlab-sinai/ngsplot' license: GPL-2.0 From 1975340d5eeb6a590a33c8268f6448d954b7d92f Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 10:46:39 +0200 Subject: [PATCH 03/31] Add fix for ngsplot recipe --- recipes/r-ngsplot/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/r-ngsplot/meta.yaml b/recipes/r-ngsplot/meta.yaml index 9c570c1f1de8f..4ab9fac8987bb 100644 --- a/recipes/r-ngsplot/meta.yaml +++ b/recipes/r-ngsplot/meta.yaml @@ -9,7 +9,6 @@ source: build: number: 0 - skip: True rpaths: - lib/R/lib/ - lib/ From e9bd34b4f0c66a4f20d9a7af96267ed354a881f0 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 12:27:57 +0200 Subject: [PATCH 04/31] Removed --- recipes/r-ngsplot-hg19/meta.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index 3fe4a60d1927a..9d30ef21f0838 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -11,9 +11,6 @@ source: sha256: a3ad6daceec383f88faf3d3ee899f2bef37b3be2658ee9afa01e86404c0c92bd build: number: 0 - rpaths: - - lib/R/lib/ - - lib/ requirements: build: - 'r-ngsplot' From 3d214fbb222c68abc17c38e39686d6ef41581684 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 12:30:20 +0200 Subject: [PATCH 05/31] Added @mbargull 's suggestions --- recipes/r-ngsplot-hg19/meta.yaml | 7 ++----- recipes/r-ngsplot-hg19/post-link.sh | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index 9d30ef21f0838..53f259bfd8c4e 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -8,20 +8,17 @@ source: fn: '{{ name }}_{{ version }}.tar.gz' url: - 'https://doc-0g-a0-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/jiksn2m41cm3dbspq0nqt102h6m6eo1o/1528221600000/01382619737792242945/*/0B5hDZ2BucCI6SURYWW5XdUxnbW8?e=download' - sha256: a3ad6daceec383f88faf3d3ee899f2bef37b3be2658ee9afa01e86404c0c92bd + md5: 172a6a93de3d1ae8a3ad6d6d79e911f7 build: number: 0 requirements: - build: - - 'r-ngsplot' - - r-base run: - 'r-ngsplot' - r-base - wget test: commands: - - 'ngsplotdb.py install ngsplotdb-hg19_3.00.tar.gz | true' + - ngsplotdb.py install "${TARBALL}" > "${PREFIX}/.messages.txt" 2>&1 about: home: 'https://github.com/shenlab-sinai/ngsplot' license: GPL-2.0 diff --git a/recipes/r-ngsplot-hg19/post-link.sh b/recipes/r-ngsplot-hg19/post-link.sh index 68a317a42aac8..a3093047de37d 100644 --- a/recipes/r-ngsplot-hg19/post-link.sh +++ b/recipes/r-ngsplot-hg19/post-link.sh @@ -39,6 +39,6 @@ if [[ $SUCCESS != 1 ]]; then fi # Install and clean up -ngsplotdb.py install ngsplotdb_hg19_75_3.00.tar.gz +ngsplotdb.py install "${TARBALL}" > "${PREFIX}/.messages.txt" 2>&1 rm $TARBALL rmdir $STAGING \ No newline at end of file From e486e499c5b60b0e84d0b461ee04d08190f6012a Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 12:30:59 +0200 Subject: [PATCH 06/31] More suggestions --- recipes/r-ngsplot-hg19/pre-unlink.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/r-ngsplot-hg19/pre-unlink.sh b/recipes/r-ngsplot-hg19/pre-unlink.sh index d5a8311cd5e2c..5112073d6de92 100644 --- a/recipes/r-ngsplot-hg19/pre-unlink.sh +++ b/recipes/r-ngsplot-hg19/pre-unlink.sh @@ -1 +1 @@ -ngsplotdb.py remove hg19 \ No newline at end of file +ngsplotdb.py remove hg19 > "${PREFIX}/.messages.txt" 2>&1 \ No newline at end of file From f5af8a98905225b9a5da70dcd56941a0dc1cd1b2 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 12:31:37 +0200 Subject: [PATCH 07/31] Add suggestions of @mbargull --- recipes/r-ngsplot-hg19/post-link.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/r-ngsplot-hg19/post-link.sh b/recipes/r-ngsplot-hg19/post-link.sh index a3093047de37d..d24691281ac40 100644 --- a/recipes/r-ngsplot-hg19/post-link.sh +++ b/recipes/r-ngsplot-hg19/post-link.sh @@ -33,8 +33,8 @@ fi done if [[ $SUCCESS != 1 ]]; then - echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:" - printf '%s\n' "${URLS[@]}" + echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:" > "${PREFIX}/.messages.txt" 2>&1 + printf '%s\n' "${URLS[@]}" > "${PREFIX}/.messages.txt" 2>&1 exit 1 fi From 3ead683ff9566784d9662194e34d1c4c287723f0 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 12:58:42 +0200 Subject: [PATCH 08/31] Adjusted build.sh script --- recipes/r-ngsplot/build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index 63d91bc0bcbe9..7210960b7481e 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -4,8 +4,7 @@ mkdir -p $outdir mkdir -p $PREFIX/bin cp -R * $outdir #Set up links for -for f in $outdir/*; do - ln -s $outdir/* $PREFIX/bin +for f in ${outdir}/bin/*; do + ln -s ${f} ${PREFIX}/bin fbname=$(basename "$f") - chmod 0755 ${PREFIX}/bin/$fbname done \ No newline at end of file From b1ae4754bb2f5095f90bd7b9be74a1af5dcaebfb Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 13:03:35 +0200 Subject: [PATCH 09/31] Removed source, as this is provided by post-link --- recipes/r-ngsplot-hg19/meta.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index 53f259bfd8c4e..f9240e6c2d92b 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -5,9 +5,6 @@ package: name: 'ngsplotdb-{{ name|lower }}' version: '{{ version }}' source: - fn: '{{ name }}_{{ version }}.tar.gz' - url: - - 'https://doc-0g-a0-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/jiksn2m41cm3dbspq0nqt102h6m6eo1o/1528221600000/01382619737792242945/*/0B5hDZ2BucCI6SURYWW5XdUxnbW8?e=download' md5: 172a6a93de3d1ae8a3ad6d6d79e911f7 build: number: 0 From cf5079427dd9edec73c8ee914cfc917b7bd89e13 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 13:16:07 +0200 Subject: [PATCH 10/31] Hopefully more permant file URL --- recipes/r-ngsplot-hg19/meta.yaml | 2 +- recipes/r-ngsplot-hg19/post-link.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index f9240e6c2d92b..335590ae044aa 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -19,4 +19,4 @@ test: about: home: 'https://github.com/shenlab-sinai/ngsplot' license: GPL-2.0 - summary: 'Quick mining and visualization of NGS data by integrating genomic databases' + summary: 'HG19 genome database for NGSplot' diff --git a/recipes/r-ngsplot-hg19/post-link.sh b/recipes/r-ngsplot-hg19/post-link.sh index d24691281ac40..fed10174ce8b0 100644 --- a/recipes/r-ngsplot-hg19/post-link.sh +++ b/recipes/r-ngsplot-hg19/post-link.sh @@ -1,7 +1,7 @@ #!/bin/bash FN="ngsplotdb_hg19_75_3.00.tar.gz" URLS=( - "https://doc-0g-a0-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/jiksn2m41cm3dbspq0nqt102h6m6eo1o/1528221600000/01382619737792242945/*/0B5hDZ2BucCI6SURYWW5XdUxnbW8?e=download" + "https://drive.google.com/uc?export=download&id=0B5hDZ2BucCI6SURYWW5XdUxnbW8" ) sha256="a3ad6daceec383f88faf3d3ee899f2bef37b3be2658ee9afa01e86404c0c92bd" From ae6e95af55ac60c1c02dc432521ef0d7d35e5d78 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 13:45:40 +0200 Subject: [PATCH 11/31] Double check --- recipes/r-ngsplot-hg19/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index 335590ae044aa..a5e3f82db1c1d 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -4,7 +4,6 @@ package: name: 'ngsplotdb-{{ name|lower }}' version: '{{ version }}' -source: md5: 172a6a93de3d1ae8a3ad6d6d79e911f7 build: number: 0 From 159081417ceab9e5a574cce010d1450eae927718 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 14:40:27 +0200 Subject: [PATCH 12/31] Add check for hg19 database, removed sha256 --- recipes/r-ngsplot-hg19/meta.yaml | 3 +-- recipes/r-ngsplot-hg19/post-link.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index a5e3f82db1c1d..f3ca75fc92579 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -4,7 +4,6 @@ package: name: 'ngsplotdb-{{ name|lower }}' version: '{{ version }}' - md5: 172a6a93de3d1ae8a3ad6d6d79e911f7 build: number: 0 requirements: @@ -14,7 +13,7 @@ requirements: - wget test: commands: - - ngsplotdb.py install "${TARBALL}" > "${PREFIX}/.messages.txt" 2>&1 + - ngsplotdb.py list | grep "hg19" > "${PREFIX}/.messages.txt" 2>&1 about: home: 'https://github.com/shenlab-sinai/ngsplot' license: GPL-2.0 diff --git a/recipes/r-ngsplot-hg19/post-link.sh b/recipes/r-ngsplot-hg19/post-link.sh index fed10174ce8b0..63951db12efe9 100644 --- a/recipes/r-ngsplot-hg19/post-link.sh +++ b/recipes/r-ngsplot-hg19/post-link.sh @@ -3,7 +3,7 @@ FN="ngsplotdb_hg19_75_3.00.tar.gz" URLS=( "https://drive.google.com/uc?export=download&id=0B5hDZ2BucCI6SURYWW5XdUxnbW8" ) -sha256="a3ad6daceec383f88faf3d3ee899f2bef37b3be2658ee9afa01e86404c0c92bd" +md5="172a6a93de3d1ae8a3ad6d6d79e911f7" # Use a staging area in the conda dir rather than temp dirs, both to avoid # permission issues as well as to have things downloaded in a predictable From e4eb39ec9c7a0e8992f0b174fe40bace966f7241 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 21:38:32 +0200 Subject: [PATCH 13/31] Better tests for ngsplot --- recipes/r-ngsplot/meta.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/r-ngsplot/meta.yaml b/recipes/r-ngsplot/meta.yaml index 4ab9fac8987bb..e06081f22c04e 100644 --- a/recipes/r-ngsplot/meta.yaml +++ b/recipes/r-ngsplot/meta.yaml @@ -25,10 +25,8 @@ requirements: test: commands: - - ngsplotdb.py list | true - - ngs.plot.r 2>&1 | true - - replot.r 2>&1 | true - - plotCorrGram.r 2>&1 | true + - ngsplotdb.py list + - ngs.plot.r | grep -q "Visit https://github.com/shenlab-sinai/ngsplot/wiki/ProgramArguments101 for details" about: license: GPL-2.0 From 721e3a2cb6933a12d4b1c0621f9f0107df111b11 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 21:42:39 +0200 Subject: [PATCH 14/31] More specific copying --- recipes/r-ngsplot/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index 7210960b7481e..f84c136aa0248 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -2,9 +2,9 @@ outdir=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM mkdir -p $outdir mkdir -p $PREFIX/bin -cp -R * $outdir +cp -R {bin,database,example,galaxy,lib,webings,LICENSE} ${outdir}/ #Set up links for for f in ${outdir}/bin/*; do ln -s ${f} ${PREFIX}/bin fbname=$(basename "$f") -done \ No newline at end of file +done From 054a918140cbedf0752773f9bae56e678f7d3983 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 21:43:00 +0200 Subject: [PATCH 15/31] Post and Pre Unlink scripts for r-ngsplot-hg19 updated --- recipes/r-ngsplot-hg19/post-link.sh | 6 +++--- recipes/r-ngsplot-hg19/pre-unlink.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/r-ngsplot-hg19/post-link.sh b/recipes/r-ngsplot-hg19/post-link.sh index 63951db12efe9..6e90b62cd4f35 100644 --- a/recipes/r-ngsplot-hg19/post-link.sh +++ b/recipes/r-ngsplot-hg19/post-link.sh @@ -14,7 +14,7 @@ TARBALL=$STAGING/$FN SUCCESS=0 for URL in ${URLS[@]}; do - wget -O- -q $URL > $TARBALL + wget -O- -q ${URL} > $TARBALL [[ $? == 0 ]] || continue # Platform-specific md5sum checks. @@ -33,7 +33,7 @@ fi done if [[ $SUCCESS != 1 ]]; then - echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:" > "${PREFIX}/.messages.txt" 2>&1 + echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:" >> "${PREFIX}/.messages.txt" 2>&1 printf '%s\n' "${URLS[@]}" > "${PREFIX}/.messages.txt" 2>&1 exit 1 fi @@ -41,4 +41,4 @@ fi # Install and clean up ngsplotdb.py install "${TARBALL}" > "${PREFIX}/.messages.txt" 2>&1 rm $TARBALL -rmdir $STAGING \ No newline at end of file +rmdir $STAGING diff --git a/recipes/r-ngsplot-hg19/pre-unlink.sh b/recipes/r-ngsplot-hg19/pre-unlink.sh index 5112073d6de92..8e02599860ec6 100644 --- a/recipes/r-ngsplot-hg19/pre-unlink.sh +++ b/recipes/r-ngsplot-hg19/pre-unlink.sh @@ -1 +1 @@ -ngsplotdb.py remove hg19 > "${PREFIX}/.messages.txt" 2>&1 \ No newline at end of file +ngsplotdb.py remove hg19 > "${PREFIX}/.messages.txt" 2>&1 From a76b66851420820b81cde8bf03d56687ac9e15f1 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 21:55:39 +0200 Subject: [PATCH 16/31] No need for images in there --- recipes/r-ngsplot/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index f84c136aa0248..dc83fe21de966 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -2,7 +2,7 @@ outdir=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM mkdir -p $outdir mkdir -p $PREFIX/bin -cp -R {bin,database,example,galaxy,lib,webings,LICENSE} ${outdir}/ +cp -R {bin,database,example,galaxy,lib,LICENSE} ${outdir}/ #Set up links for for f in ${outdir}/bin/*; do ln -s ${f} ${PREFIX}/bin From 2a7f5e4be8bd1844635d9eadcdcba2edf03f9ce8 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 22:06:21 +0200 Subject: [PATCH 17/31] Fixing tests --- recipes/r-ngsplot/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/r-ngsplot/meta.yaml b/recipes/r-ngsplot/meta.yaml index e06081f22c04e..d37ab94e9ceb3 100644 --- a/recipes/r-ngsplot/meta.yaml +++ b/recipes/r-ngsplot/meta.yaml @@ -25,7 +25,7 @@ requirements: test: commands: - - ngsplotdb.py list + - ngsplotdb.py list | grep -q "your ngs.plot database may be corrupted." - ngs.plot.r | grep -q "Visit https://github.com/shenlab-sinai/ngsplot/wiki/ProgramArguments101 for details" about: From 484b1f2a8e6c9c6ac23b6d97a7342028ac791afa Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 22:15:52 +0200 Subject: [PATCH 18/31] Fixing tests --- recipes/r-ngsplot/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/r-ngsplot/meta.yaml b/recipes/r-ngsplot/meta.yaml index d37ab94e9ceb3..78998ce26ac67 100644 --- a/recipes/r-ngsplot/meta.yaml +++ b/recipes/r-ngsplot/meta.yaml @@ -25,7 +25,7 @@ requirements: test: commands: - - ngsplotdb.py list | grep -q "your ngs.plot database may be corrupted." + - ngsplotdb.py list 2>&1 | grep -q "your ngs.plot database may be corrupted." - ngs.plot.r | grep -q "Visit https://github.com/shenlab-sinai/ngsplot/wiki/ProgramArguments101 for details" about: From e16b59724d33ba82fb0db956771a174d381beb4b Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Wed, 6 Jun 2018 22:25:25 +0200 Subject: [PATCH 19/31] Updated Build Script --- recipes/r-ngsplot/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index dc83fe21de966..4936901cfd560 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -8,3 +8,6 @@ for f in ${outdir}/bin/*; do ln -s ${f} ${PREFIX}/bin fbname=$(basename "$f") done + +#Setting environment variable NGSPLOT as requested by authors readme +export NGSPLOT=${outdir} From 95efbc3c71d8b420e1034dfca96a7f5666ecfd79 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Fri, 8 Jun 2018 14:17:07 +0200 Subject: [PATCH 20/31] Add Activate / Deactivate scripts for ENV variable --- recipes/r-ngsplot/build.sh | 9 +++++++-- recipes/r-ngsplot/scripts/activate.sh | 3 +++ recipes/r-ngsplot/scripts/deactivate.sh | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 recipes/r-ngsplot/scripts/activate.sh create mode 100644 recipes/r-ngsplot/scripts/deactivate.sh diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index 4936901cfd560..2ee37005e3a61 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -9,5 +9,10 @@ for f in ${outdir}/bin/*; do fbname=$(basename "$f") done -#Setting environment variable NGSPLOT as requested by authors readme -export NGSPLOT=${outdir} +#Activate/Deactivate dir +ACTIVATE_DIR=$PREFIX/etc/conda/activate.d +DEACTIVATE_DIR=$PREFIX/etc/conda/deactivate.d +mkdir -p $ACTIVATE_DIR +mkdir -p $DEACTIVATE_DIR +cp $RECIPE_DIR/scripts/activate.sh $ACTIVATE_DIR/ngsplot-activate.sh +cp $RECIPE_DIR/scripts/deactivate.sh $DEACTIVATE_DIR/ngsplot-deactivate.sh \ No newline at end of file diff --git a/recipes/r-ngsplot/scripts/activate.sh b/recipes/r-ngsplot/scripts/activate.sh new file mode 100644 index 0000000000000..6750655473d4e --- /dev/null +++ b/recipes/r-ngsplot/scripts/activate.sh @@ -0,0 +1,3 @@ +#!/bin/bash +export NGSPLOT=$(pwd)/plugins +export _CONDA_SET_NGSPLOT_ENV=1 diff --git a/recipes/r-ngsplot/scripts/deactivate.sh b/recipes/r-ngsplot/scripts/deactivate.sh new file mode 100644 index 0000000000000..9dd8e8e66515e --- /dev/null +++ b/recipes/r-ngsplot/scripts/deactivate.sh @@ -0,0 +1,4 @@ +if [[ -n "$_CONDA_SET_NGSPLOT_ENV" ]]; then + unset NGSPLOT + unset _CONDA_SET_NGSPLOT_ENV +fi \ No newline at end of file From 9c444978c7c817e6cd4af86431a5222642576eb5 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Fri, 8 Jun 2018 14:22:09 +0200 Subject: [PATCH 21/31] Wrong path --- recipes/r-ngsplot/scripts/activate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/r-ngsplot/scripts/activate.sh b/recipes/r-ngsplot/scripts/activate.sh index 6750655473d4e..56980d78fd8d9 100644 --- a/recipes/r-ngsplot/scripts/activate.sh +++ b/recipes/r-ngsplot/scripts/activate.sh @@ -1,3 +1,3 @@ #!/bin/bash -export NGSPLOT=$(pwd)/plugins +export NGSPLOT=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM export _CONDA_SET_NGSPLOT_ENV=1 From b35f91a21ac3ba154cf0e05a7ac7e23d64d164b5 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Fri, 8 Jun 2018 16:00:58 +0200 Subject: [PATCH 22/31] Removing unrequired fbname --- recipes/r-ngsplot/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index 2ee37005e3a61..20bb0f676c984 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -6,7 +6,6 @@ cp -R {bin,database,example,galaxy,lib,LICENSE} ${outdir}/ #Set up links for for f in ${outdir}/bin/*; do ln -s ${f} ${PREFIX}/bin - fbname=$(basename "$f") done #Activate/Deactivate dir From 05101faf04e7b308a9309d242ff37d3699a50827 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Fri, 8 Jun 2018 16:04:32 +0200 Subject: [PATCH 23/31] Add exact name of package --- recipes/r-ngsplot/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index 20bb0f676c984..78190d5f37848 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -13,5 +13,5 @@ ACTIVATE_DIR=$PREFIX/etc/conda/activate.d DEACTIVATE_DIR=$PREFIX/etc/conda/deactivate.d mkdir -p $ACTIVATE_DIR mkdir -p $DEACTIVATE_DIR -cp $RECIPE_DIR/scripts/activate.sh $ACTIVATE_DIR/ngsplot-activate.sh -cp $RECIPE_DIR/scripts/deactivate.sh $DEACTIVATE_DIR/ngsplot-deactivate.sh \ No newline at end of file +cp $RECIPE_DIR/scripts/activate.sh $ACTIVATE_DIR/${PKG_NAME}-activate.sh +cp $RECIPE_DIR/scripts/deactivate.sh $DEACTIVATE_DIR/${PKG_NAME}-deactivate.sh \ No newline at end of file From 8fb135d8b6aae908b746f3ca75267cd02ec80155 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Fri, 8 Jun 2018 16:05:46 +0200 Subject: [PATCH 24/31] Fixing pipes --- recipes/r-ngsplot-hg19/post-link.sh | 4 ++-- recipes/r-ngsplot-hg19/pre-unlink.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/r-ngsplot-hg19/post-link.sh b/recipes/r-ngsplot-hg19/post-link.sh index 6e90b62cd4f35..633457f04f2a8 100644 --- a/recipes/r-ngsplot-hg19/post-link.sh +++ b/recipes/r-ngsplot-hg19/post-link.sh @@ -34,11 +34,11 @@ done if [[ $SUCCESS != 1 ]]; then echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:" >> "${PREFIX}/.messages.txt" 2>&1 - printf '%s\n' "${URLS[@]}" > "${PREFIX}/.messages.txt" 2>&1 + printf '%s\n' "${URLS[@]}" >> "${PREFIX}/.messages.txt" 2>&1 exit 1 fi # Install and clean up -ngsplotdb.py install "${TARBALL}" > "${PREFIX}/.messages.txt" 2>&1 +ngsplotdb.py install "${TARBALL}" >> "${PREFIX}/.messages.txt" 2>&1 rm $TARBALL rmdir $STAGING diff --git a/recipes/r-ngsplot-hg19/pre-unlink.sh b/recipes/r-ngsplot-hg19/pre-unlink.sh index 8e02599860ec6..c7a0f8a7e486d 100644 --- a/recipes/r-ngsplot-hg19/pre-unlink.sh +++ b/recipes/r-ngsplot-hg19/pre-unlink.sh @@ -1 +1 @@ -ngsplotdb.py remove hg19 > "${PREFIX}/.messages.txt" 2>&1 +ngsplotdb.py remove hg19 >> "${PREFIX}/.messages.txt" 2>&1 From 30d2a97d1c4cc23981d67feba3cbc5f74d70d483 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Fri, 8 Jun 2018 16:26:04 +0200 Subject: [PATCH 25/31] Get rid of old activate script --- recipes/r-ngsplot/scripts/activate.sh | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 recipes/r-ngsplot/scripts/activate.sh diff --git a/recipes/r-ngsplot/scripts/activate.sh b/recipes/r-ngsplot/scripts/activate.sh deleted file mode 100644 index 56980d78fd8d9..0000000000000 --- a/recipes/r-ngsplot/scripts/activate.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -export NGSPLOT=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM -export _CONDA_SET_NGSPLOT_ENV=1 From 9b168e62a31ab8bdc9925d2b68add31835cc11a0 Mon Sep 17 00:00:00 2001 From: Alexander Peltzer Date: Fri, 8 Jun 2018 16:26:15 +0200 Subject: [PATCH 26/31] Add patch for environment variable in R script --- recipes/r-ngsplot/build.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index 78190d5f37848..61b519ff5c7c5 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -13,5 +13,13 @@ ACTIVATE_DIR=$PREFIX/etc/conda/activate.d DEACTIVATE_DIR=$PREFIX/etc/conda/deactivate.d mkdir -p $ACTIVATE_DIR mkdir -p $DEACTIVATE_DIR -cp $RECIPE_DIR/scripts/activate.sh $ACTIVATE_DIR/${PKG_NAME}-activate.sh -cp $RECIPE_DIR/scripts/deactivate.sh $DEACTIVATE_DIR/${PKG_NAME}-deactivate.sh \ No newline at end of file +cp $RECIPE_DIR/scripts/deactivate.sh $DEACTIVATE_DIR/${PKG_NAME}-deactivate.sh +#Create activate.sh script +echo > "${ACTIVATE_DIR}/${PKG_NAME}-activate.sh" < Date: Sat, 9 Jun 2018 08:37:04 +0200 Subject: [PATCH 27/31] r-ngsplot: patch all scripts, avoid activation script --- recipes/r-ngsplot/build.sh | 26 ++++++++++--------------- recipes/r-ngsplot/scripts/deactivate.sh | 4 ---- 2 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 recipes/r-ngsplot/scripts/deactivate.sh diff --git a/recipes/r-ngsplot/build.sh b/recipes/r-ngsplot/build.sh index 61b519ff5c7c5..3ec522d58bca1 100644 --- a/recipes/r-ngsplot/build.sh +++ b/recipes/r-ngsplot/build.sh @@ -3,23 +3,17 @@ outdir=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM mkdir -p $outdir mkdir -p $PREFIX/bin cp -R {bin,database,example,galaxy,lib,LICENSE} ${outdir}/ -#Set up links for +# Set up links for for f in ${outdir}/bin/*; do ln -s ${f} ${PREFIX}/bin done -#Activate/Deactivate dir -ACTIVATE_DIR=$PREFIX/etc/conda/activate.d -DEACTIVATE_DIR=$PREFIX/etc/conda/deactivate.d -mkdir -p $ACTIVATE_DIR -mkdir -p $DEACTIVATE_DIR -cp $RECIPE_DIR/scripts/deactivate.sh $DEACTIVATE_DIR/${PKG_NAME}-deactivate.sh -#Create activate.sh script -echo > "${ACTIVATE_DIR}/${PKG_NAME}-activate.sh" < Date: Sat, 9 Jun 2018 18:55:20 +0200 Subject: [PATCH 28/31] r-ngsplot: debugging: show output if test failed --- recipes/r-ngsplot-hg19/meta.yaml | 2 +- recipes/r-ngsplot/meta.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index f3ca75fc92579..e307901860a15 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -13,7 +13,7 @@ requirements: - wget test: commands: - - ngsplotdb.py list | grep "hg19" > "${PREFIX}/.messages.txt" 2>&1 + - ngsplotdb.py list | grep -qF "hg19" || ngsplotdb.py list about: home: 'https://github.com/shenlab-sinai/ngsplot' license: GPL-2.0 diff --git a/recipes/r-ngsplot/meta.yaml b/recipes/r-ngsplot/meta.yaml index 78998ce26ac67..6ac386d65d58d 100644 --- a/recipes/r-ngsplot/meta.yaml +++ b/recipes/r-ngsplot/meta.yaml @@ -25,8 +25,8 @@ requirements: test: commands: - - ngsplotdb.py list 2>&1 | grep -q "your ngs.plot database may be corrupted." - - ngs.plot.r | grep -q "Visit https://github.com/shenlab-sinai/ngsplot/wiki/ProgramArguments101 for details" + - ngsplotdb.py list 2>&1 | grep -qF "your ngs.plot database may be corrupted." || ngsplotdb.py list + - ngs.plot.r | grep -qF "Visit https://github.com/shenlab-sinai/ngsplot/wiki/ProgramArguments101 for details" || ngs.plot.r about: license: GPL-2.0 From f0970689e58e3579a0a20b03c099a0ae9e965810 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Sat, 9 Jun 2018 19:29:30 +0200 Subject: [PATCH 29/31] r-ngsplot: try || in subshells --- recipes/r-ngsplot-hg19/meta.yaml | 2 +- recipes/r-ngsplot/meta.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index e307901860a15..f30535e04aa0a 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -13,7 +13,7 @@ requirements: - wget test: commands: - - ngsplotdb.py list | grep -qF "hg19" || ngsplotdb.py list + - (ngsplotdb.py list | grep -qF "hg19" || ngsplotdb.py list) about: home: 'https://github.com/shenlab-sinai/ngsplot' license: GPL-2.0 diff --git a/recipes/r-ngsplot/meta.yaml b/recipes/r-ngsplot/meta.yaml index 6ac386d65d58d..cb6afb9bdecb4 100644 --- a/recipes/r-ngsplot/meta.yaml +++ b/recipes/r-ngsplot/meta.yaml @@ -25,8 +25,8 @@ requirements: test: commands: - - ngsplotdb.py list 2>&1 | grep -qF "your ngs.plot database may be corrupted." || ngsplotdb.py list - - ngs.plot.r | grep -qF "Visit https://github.com/shenlab-sinai/ngsplot/wiki/ProgramArguments101 for details" || ngs.plot.r + - (ngsplotdb.py list 2>&1 | grep -qF "your ngs.plot database may be corrupted." || ngsplotdb.py list) + - (ngs.plot.r | grep -qF "Visit https://github.com/shenlab-sinai/ngsplot/wiki/ProgramArguments101 for details" || ngs.plot.r) about: license: GPL-2.0 From de5d1a6dc0c4f17fd6fad802e80d219aecabcc62 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Sat, 9 Jun 2018 19:44:44 +0200 Subject: [PATCH 30/31] r-ngsplot: add missing python dependency --- recipes/r-ngsplot/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/r-ngsplot/meta.yaml b/recipes/r-ngsplot/meta.yaml index cb6afb9bdecb4..051f862e86057 100644 --- a/recipes/r-ngsplot/meta.yaml +++ b/recipes/r-ngsplot/meta.yaml @@ -22,6 +22,7 @@ requirements: - bioconductor-rsamtools - bioconductor-bsgenome - bioconductor-shortread + - python <3.0a0 test: commands: From 88af4ed923c5cafa77eb10096ad2bb32c79680a9 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Sat, 9 Jun 2018 20:07:57 +0200 Subject: [PATCH 31/31] r-ngsplot-hg19: fix variable name in post-link.sh --- recipes/r-ngsplot-hg19/meta.yaml | 2 +- recipes/r-ngsplot-hg19/post-link.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/r-ngsplot-hg19/meta.yaml b/recipes/r-ngsplot-hg19/meta.yaml index f30535e04aa0a..da53714010baa 100644 --- a/recipes/r-ngsplot-hg19/meta.yaml +++ b/recipes/r-ngsplot-hg19/meta.yaml @@ -8,7 +8,7 @@ build: number: 0 requirements: run: - - 'r-ngsplot' + - r-ngsplot - r-base - wget test: diff --git a/recipes/r-ngsplot-hg19/post-link.sh b/recipes/r-ngsplot-hg19/post-link.sh index 633457f04f2a8..dd917be921667 100644 --- a/recipes/r-ngsplot-hg19/post-link.sh +++ b/recipes/r-ngsplot-hg19/post-link.sh @@ -3,7 +3,7 @@ FN="ngsplotdb_hg19_75_3.00.tar.gz" URLS=( "https://drive.google.com/uc?export=download&id=0B5hDZ2BucCI6SURYWW5XdUxnbW8" ) -md5="172a6a93de3d1ae8a3ad6d6d79e911f7" +MD5="172a6a93de3d1ae8a3ad6d6d79e911f7" # Use a staging area in the conda dir rather than temp dirs, both to avoid # permission issues as well as to have things downloaded in a predictable