Skip to content

Commit

Permalink
Add recipe for CRAN package locuszoomr (#51580)
Browse files Browse the repository at this point in the history
* Add recipe for CRAN package locuszoomr

* Make build script executable

* Add error handling for DESCRIPTION

Following the suggestion in [this comment](#51580 (comment))

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add `run_export` statement

* Build as noarch

* Fix recipe name in `run_exports`

Whoops

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add additional tests

* Fix recipe names for Bioconductor dependencies

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
GiulioCentorame and coderabbitai[bot] authored Nov 16, 2024
1 parent 072d656 commit b4557b6
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
9 changes: 9 additions & 0 deletions recipes/r-locuszoomr/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
export DISABLE_AUTOBREW=1
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}
83 changes: 83 additions & 0 deletions recipes/r-locuszoomr/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{% 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:
run_exports:
- {{ pin_subpackage("r-locuszoomr", max_pin="x.x") }}
noarch: generic
merge_build_host: True # [win]
number: 0

rpaths:
- lib/R/lib/
- lib/

requirements:
host:
- r-base
- bioconductor-annotationfilter
- bioconductor-biocgenerics
- bioconductor-genomeinfodb
- bioconductor-genomicranges
- bioconductor-iranges
- r-ldlinkr
- r-cowplot
- r-dplyr
- bioconductor-ensembldb
- r-gggrid
- r-ggplot2
- r-ggrepel
- r-memoise
- r-plotly
- r-rlang
- bioconductor-rtracklayer
- r-zoo

run:
- r-base
- bioconductor-annotationfilter
- bioconductor-biocgenerics
- bioconductor-genomeinfodb
- bioconductor-genomicranges
- bioconductor-iranges
- r-ldlinkr
- r-cowplot
- r-dplyr
- bioconductor-ensembldb
- r-gggrid
- r-ggplot2
- r-ggrepel
- r-memoise
- r-plotly
- r-rlang
- bioconductor-rtracklayer
- r-zoo

test:
commands:
- $R -e "library('locuszoomr')"
- $R -e "packageVersion('locuszoomr')"
- $R -e "help(package = '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' <https://my.locuszoom.org>, 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 <https://ldlink.nih.gov/?tab=apiaccess>
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'

0 comments on commit b4557b6

Please sign in to comment.