From 2e91a73a76dfbcd8d6a5f8b118a4780e3d88f430 Mon Sep 17 00:00:00 2001 From: Pekka Ristola Date: Tue, 24 Oct 2023 00:37:15 +0300 Subject: [PATCH] r-mariner: init --- BioArchLinux/r-mariner/PKGBUILD | 77 +++++++++++++++++++ .../r-mariner/fix-test-snapshot.patch | 67 ++++++++++++++++ BioArchLinux/r-mariner/lilac.py | 14 ++++ BioArchLinux/r-mariner/lilac.yaml | 40 ++++++++++ 4 files changed, 198 insertions(+) create mode 100644 BioArchLinux/r-mariner/PKGBUILD create mode 100644 BioArchLinux/r-mariner/fix-test-snapshot.patch create mode 100644 BioArchLinux/r-mariner/lilac.py create mode 100644 BioArchLinux/r-mariner/lilac.yaml diff --git a/BioArchLinux/r-mariner/PKGBUILD b/BioArchLinux/r-mariner/PKGBUILD new file mode 100644 index 0000000000..e53b0ce0dd --- /dev/null +++ b/BioArchLinux/r-mariner/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: Pekka Ristola + +_pkgname=mariner +_pkgver=1.0.0 +pkgname=r-${_pkgname,,} +pkgver=${_pkgver//-/.} +pkgrel=1 +pkgdesc="Mariner: Explore the Hi-Cs" +arch=(any) +url="https://bioconductor.org/packages/${_pkgname}" +license=(GPL3) +depends=( + r-abind + r-assertthat + r-biocgenerics + r-biocmanager + r-biocparallel + r-colourvalues + r-data.table + r-dbscan + r-delayedarray + r-genomeinfodb + r-genomicranges + r-glue + r-hdf5array + r-interactionset + r-iranges + r-magrittr + r-plotgardener + r-plyranges + r-progress + r-purrr + r-rcolorbrewer + r-rhdf5 + r-rlang + r-s4vectors + r-strawr + r-summarizedexperiment +) +checkdepends=( + r-marinerdata + r-testthat +) +optdepends=( + r-dplyr + r-experimenthub + r-knitr + r-marinerdata + r-rmarkdown + r-testthat +) +source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz" + "fix-test-snapshot.patch") +md5sums=('8e7440b7a29afb6f325512a65653b3b9' + 'd0928c3ea11234e2200f31c9b4ff4ade') +sha256sums=('90b4563ca30ca8658bf75321ec5940caae3612fbbfe135c4ea82cf6670bb048b' + 'd4828f9f6fd94b8f60d8a2dd6d093fd5aa1120ccf81426cf0189ccc384d6b00c') + +prepare() { + # fix snapshot test + patch -Np1 -i fix-test-snapshot.patch +} + +build() { + mkdir -p build + R CMD INSTALL "$_pkgname" -l build +} + +check() { + cd "$_pkgname/tests" + R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R +} + +package() { + install -d "$pkgdir/usr/lib/R/library" + cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library" +} diff --git a/BioArchLinux/r-mariner/fix-test-snapshot.patch b/BioArchLinux/r-mariner/fix-test-snapshot.patch new file mode 100644 index 0000000000..9359df6e98 --- /dev/null +++ b/BioArchLinux/r-mariner/fix-test-snapshot.patch @@ -0,0 +1,67 @@ +diff --git a/mariner/tests/testthat/_snaps/InteractionArray.md b/mariner/tests/testthat/_snaps/InteractionArray.md +index 492df25..e6645e7 100644 +--- a/mariner/tests/testthat/_snaps/InteractionArray.md ++++ b/mariner/tests/testthat/_snaps/InteractionArray.md +@@ -3,7 +3,7 @@ + Code + counts(iarr, TRUE) + Output +- <11 x 11 x 10 x 2> array of class DelayedArray and type "double": ++ <11 x 11 x 10 x 2> DelayedArray object of type "double": + ,,1,FS + 14740000 14745000 14750000 ... 14785000 14790000 + 14435000 0 0 0 . 0 0 +@@ -39,7 +39,7 @@ + Code + counts(iarr[1:3, 1:2]) + Output +- <11 x 11 x 3 x 2> array of class DelayedArray and type "double": ++ <11 x 11 x 3 x 2> DelayedArray object of type "double": + ,,1,FS + [,1] [,2] [,3] ... [,10] [,11] + [1,] 0 0 0 . 0 0 +@@ -64,7 +64,7 @@ + Code + counts(iarr[3:4, 1]) + Output +- <11 x 11 x 2 x 1> array of class DelayedArray and type "double": ++ <11 x 11 x 2 x 1> DelayedArray object of type "double": + ,,1,FS + [,1] [,2] [,3] ... [,10] [,11] + [1,] 0 0 0 . 0 0 +@@ -87,7 +87,7 @@ + Code + counts(iarr[1:7, 1:2]) + Output +- <11 x 11 x 7 x 2> array of class DelayedArray and type "double": ++ <11 x 11 x 7 x 2> DelayedArray object of type "double": + ,,1,FS + [,1] [,2] [,3] ... [,10] [,11] + [1,] 0 0 0 . 0 0 +@@ -112,7 +112,7 @@ + Code + counts(iarr[1:7, 1]) + Output +- <11 x 11 x 7 x 1> array of class DelayedArray and type "double": ++ <11 x 11 x 7 x 1> DelayedArray object of type "double": + ,,1,FS + [,1] [,2] [,3] ... [,10] [,11] + [1,] 0 0 0 . 0 0 +@@ -137,7 +137,7 @@ + Code + counts(iarr[1, 1:2]) + Output +- <11 x 11 x 1 x 2> array of class DelayedArray and type "double": ++ <11 x 11 x 1 x 2> DelayedArray object of type "double": + ,,1,FS + [,1] [,2] [,3] ... [,10] [,11] + [1,] 0 0 0 . 0 0 +@@ -160,7 +160,7 @@ + Code + counts(iarr[1, 1]) + Output +- <11 x 11 x 1 x 1> array of class DelayedArray and type "double": ++ <11 x 11 x 1 x 1> DelayedArray object of type "double": + ,,1,FS + [,1] [,2] [,3] ... [,10] [,11] + [1,] 0 0 0 . 0 0 diff --git a/BioArchLinux/r-mariner/lilac.py b/BioArchLinux/r-mariner/lilac.py new file mode 100644 index 0000000000..b5cdb057c5 --- /dev/null +++ b/BioArchLinux/r-mariner/lilac.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +from lilaclib import * + +import os +import sys +sys.path.append(os.path.normpath(f'{__file__}/../../../lilac-extensions')) +from lilac_r_utils import r_pre_build + +def pre_build(): + r_pre_build(_G) + +def post_build(): + git_pkgbuild_commit() + update_aur_repo() diff --git a/BioArchLinux/r-mariner/lilac.yaml b/BioArchLinux/r-mariner/lilac.yaml new file mode 100644 index 0000000000..acf93758af --- /dev/null +++ b/BioArchLinux/r-mariner/lilac.yaml @@ -0,0 +1,40 @@ +build_prefix: extra-x86_64 +maintainers: +- github: pekkarr + email: pekkarr@protonmail.com +repo_depends: +- r-abind +- r-assertthat +- r-biocgenerics +- r-biocmanager +- r-biocparallel +- r-colourvalues +- r-data.table +- r-dbscan +- r-delayedarray +- r-genomeinfodb +- r-genomicranges +- r-glue +- r-hdf5array +- r-interactionset +- r-iranges +- r-magrittr +- r-plotgardener +- r-plyranges +- r-progress +- r-purrr +- r-rcolorbrewer +- r-rhdf5 +- r-rlang +- r-s4vectors +- r-strawr +- r-summarizedexperiment +repo_makedepends: +- r-marinerdata +- r-testthat +update_on: +- source: rpkgs + pkgname: mariner + repo: bioc + md5: true +- alias: r