From 61b8990bc9aadcb3ce4d397a1e5e8a84a93e9125 Mon Sep 17 00:00:00 2001 From: Giulio Centorame Date: Wed, 23 Oct 2024 12:04:35 +1000 Subject: [PATCH 1/8] Add recipe for CRAN package locuszoomr --- recipes/r-locuszoomr/build.sh | 5 +++ recipes/r-locuszoomr/meta.yaml | 78 ++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 recipes/r-locuszoomr/build.sh create mode 100644 recipes/r-locuszoomr/meta.yaml diff --git a/recipes/r-locuszoomr/build.sh b/recipes/r-locuszoomr/build.sh new file mode 100644 index 0000000000000..58079ecdbd994 --- /dev/null +++ b/recipes/r-locuszoomr/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +export DISABLE_AUTOBREW=1 +mv DESCRIPTION DESCRIPTION.old +grep -va '^Priority: ' DESCRIPTION.old > DESCRIPTION +${R} CMD INSTALL --build . ${R_ARGS} diff --git a/recipes/r-locuszoomr/meta.yaml b/recipes/r-locuszoomr/meta.yaml new file mode 100644 index 0000000000000..ee22ab7c12d23 --- /dev/null +++ b/recipes/r-locuszoomr/meta.yaml @@ -0,0 +1,78 @@ +{% set version = '0.3.5' %} + +package: + name: r-locuszoomr + version: {{ version|replace("-", "_") }} + +source: + url: + - {{ cran_mirror }}/src/contrib/locuszoomr_{{ version }}.tar.gz + - {{ cran_mirror }}/src/contrib/Archive/locuszoomr/locuszoomr_{{ version }}.tar.gz + sha256: 92c8bb3a84ceed82e3cf142129eb83c21a1eb780cd6c0fb4b084e099917c2c3d + +build: + merge_build_host: True # [win] + number: 0 + + rpaths: + - lib/R/lib/ + - lib/ + +requirements: + host: + - r-base + - r-annotationfilter + - r-biocgenerics + - r-genomeinfodb + - r-genomicranges + - r-iranges + - r-ldlinkr + - r-cowplot + - r-dplyr + - r-ensembldb + - r-gggrid + - r-ggplot2 + - r-ggrepel + - r-memoise + - r-plotly + - r-rlang + - r-rtracklayer + - r-zoo + + run: + - r-base + - r-annotationfilter + - r-biocgenerics + - r-genomeinfodb + - r-genomicranges + - r-iranges + - r-ldlinkr + - r-cowplot + - r-dplyr + - r-ensembldb + - r-gggrid + - r-ggplot2 + - r-ggrepel + - r-memoise + - r-plotly + - r-rlang + - r-rtracklayer + - r-zoo + +test: + commands: + - $R -e "library('locuszoomr')" + +about: + home: https://github.com/myles-lewis/locuszoomr + license: GPL-3 + summary: Publication-ready regional gene locus plots similar to those produced by the web interface + 'LocusZoom' , but running locally in R. Genetic or genomic + data with gene annotation tracks are plotted via R base graphics, 'ggplot2' or 'plotly', + allowing flexibility and easy customisation including laying out multiple locus + plots on the same page. It uses the 'LDlink' API + to query linkage disequilibrium data from the 1000 Genomes Project and can overlay + this on plots. + license_family: GPL3 + license_file: + - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3' From 853135264864ad89789b1a44384ef443a3289df2 Mon Sep 17 00:00:00 2001 From: Giulio Centorame Date: Wed, 23 Oct 2024 13:39:26 +1000 Subject: [PATCH 2/8] Make build script executable --- recipes/r-locuszoomr/build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 recipes/r-locuszoomr/build.sh diff --git a/recipes/r-locuszoomr/build.sh b/recipes/r-locuszoomr/build.sh old mode 100644 new mode 100755 From d5130a78353b81910979dcfba20d524e11c49ef3 Mon Sep 17 00:00:00 2001 From: Giulio Centorame <46871438+GiulioCentorame@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:44:30 +1000 Subject: [PATCH 3/8] Add error handling for DESCRIPTION Following the suggestion in [this comment](https://github.com/bioconda/bioconda-recipes/pull/51580#discussion_r1811667065) Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- recipes/r-locuszoomr/build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes/r-locuszoomr/build.sh b/recipes/r-locuszoomr/build.sh index 58079ecdbd994..03cb951f643eb 100755 --- a/recipes/r-locuszoomr/build.sh +++ b/recipes/r-locuszoomr/build.sh @@ -1,5 +1,9 @@ #!/bin/bash export DISABLE_AUTOBREW=1 -mv DESCRIPTION DESCRIPTION.old -grep -va '^Priority: ' DESCRIPTION.old > DESCRIPTION +if [ ! -f DESCRIPTION ]; then + echo "Error: DESCRIPTION file not found" + exit 1 +fi +mv DESCRIPTION DESCRIPTION.old || exit 1 +grep -va '^Priority: ' DESCRIPTION.old > DESCRIPTION || exit 1 ${R} CMD INSTALL --build . ${R_ARGS} From b75b9ba0f95b3036ff8c128cf0d1995268d71837 Mon Sep 17 00:00:00 2001 From: Giulio Centorame Date: Wed, 23 Oct 2024 14:28:24 +1000 Subject: [PATCH 4/8] Add `run_export` statement --- recipes/r-locuszoomr/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/r-locuszoomr/meta.yaml b/recipes/r-locuszoomr/meta.yaml index ee22ab7c12d23..c47826f978e63 100644 --- a/recipes/r-locuszoomr/meta.yaml +++ b/recipes/r-locuszoomr/meta.yaml @@ -11,6 +11,8 @@ source: sha256: 92c8bb3a84ceed82e3cf142129eb83c21a1eb780cd6c0fb4b084e099917c2c3d build: + run_exports: + - {{ pin_subpackage("myrecipe", max_pin="x.x") }} merge_build_host: True # [win] number: 0 From 73d15b16ad04a5bb5964b50c9dba3c8163283337 Mon Sep 17 00:00:00 2001 From: Giulio Centorame Date: Wed, 23 Oct 2024 14:40:40 +1000 Subject: [PATCH 5/8] Build as noarch --- recipes/r-locuszoomr/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/r-locuszoomr/meta.yaml b/recipes/r-locuszoomr/meta.yaml index c47826f978e63..16ed85190497f 100644 --- a/recipes/r-locuszoomr/meta.yaml +++ b/recipes/r-locuszoomr/meta.yaml @@ -13,6 +13,7 @@ source: build: run_exports: - {{ pin_subpackage("myrecipe", max_pin="x.x") }} + noarch: generic merge_build_host: True # [win] number: 0 From 18f8ddad65aa4c2f4723baff90ed8c44da885312 Mon Sep 17 00:00:00 2001 From: Giulio Centorame <46871438+GiulioCentorame@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:42:25 +1000 Subject: [PATCH 6/8] Fix recipe name in `run_exports` Whoops Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- recipes/r-locuszoomr/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/r-locuszoomr/meta.yaml b/recipes/r-locuszoomr/meta.yaml index 16ed85190497f..7761741b26d48 100644 --- a/recipes/r-locuszoomr/meta.yaml +++ b/recipes/r-locuszoomr/meta.yaml @@ -12,7 +12,7 @@ source: build: run_exports: - - {{ pin_subpackage("myrecipe", max_pin="x.x") }} + - {{ pin_subpackage("r-locuszoomr", max_pin="x.x") }} noarch: generic merge_build_host: True # [win] number: 0 From 3dc71082e3f6c0ae2b38dca1aebf249e75f91fac Mon Sep 17 00:00:00 2001 From: Giulio Centorame Date: Wed, 23 Oct 2024 14:47:41 +1000 Subject: [PATCH 7/8] Add additional tests --- recipes/r-locuszoomr/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/r-locuszoomr/meta.yaml b/recipes/r-locuszoomr/meta.yaml index 7761741b26d48..8224fc68aa36d 100644 --- a/recipes/r-locuszoomr/meta.yaml +++ b/recipes/r-locuszoomr/meta.yaml @@ -65,6 +65,8 @@ requirements: test: commands: - $R -e "library('locuszoomr')" + - $R -e "packageVersion('locuszoomr')" + - $R -e "help(package = 'locuszoomr')" about: home: https://github.com/myles-lewis/locuszoomr From cec608c57cc65d1618083e08461d59b08a9bda96 Mon Sep 17 00:00:00 2001 From: Giulio Centorame Date: Wed, 23 Oct 2024 15:06:00 +1000 Subject: [PATCH 8/8] Fix recipe names for Bioconductor dependencies --- recipes/r-locuszoomr/meta.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/recipes/r-locuszoomr/meta.yaml b/recipes/r-locuszoomr/meta.yaml index 8224fc68aa36d..10a955fc63a37 100644 --- a/recipes/r-locuszoomr/meta.yaml +++ b/recipes/r-locuszoomr/meta.yaml @@ -24,42 +24,42 @@ build: requirements: host: - r-base - - r-annotationfilter - - r-biocgenerics - - r-genomeinfodb - - r-genomicranges - - r-iranges + - bioconductor-annotationfilter + - bioconductor-biocgenerics + - bioconductor-genomeinfodb + - bioconductor-genomicranges + - bioconductor-iranges - r-ldlinkr - r-cowplot - r-dplyr - - r-ensembldb + - bioconductor-ensembldb - r-gggrid - r-ggplot2 - r-ggrepel - r-memoise - r-plotly - r-rlang - - r-rtracklayer + - bioconductor-rtracklayer - r-zoo run: - r-base - - r-annotationfilter - - r-biocgenerics - - r-genomeinfodb - - r-genomicranges - - r-iranges + - bioconductor-annotationfilter + - bioconductor-biocgenerics + - bioconductor-genomeinfodb + - bioconductor-genomicranges + - bioconductor-iranges - r-ldlinkr - r-cowplot - r-dplyr - - r-ensembldb + - bioconductor-ensembldb - r-gggrid - r-ggplot2 - r-ggrepel - r-memoise - r-plotly - r-rlang - - r-rtracklayer + - bioconductor-rtracklayer - r-zoo test: