From 957c6af989e3f05fc3e401ee3a3526ae788b573f Mon Sep 17 00:00:00 2001 From: Carl Mathias Kobel Date: Sun, 12 May 2024 15:39:27 +0200 Subject: [PATCH] Add Gapseq (#47417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * init * passes bioconda-utils lint * works too * polishing * final test * ensure correct pinning * minor tweaks * test was too long. * amend * work on tests after package has been published * updates according to bgruening's comments * r-chnosz is now available on conda-forge * amend * reset build number * Update recipes/gapseq/meta.yaml Co-authored-by: Björn Grüning --------- Co-authored-by: Björn Grüning --- recipes/gapseq/build.sh | 41 +++++++++++++++++++++++ recipes/gapseq/meta.yaml | 71 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 recipes/gapseq/build.sh create mode 100644 recipes/gapseq/meta.yaml diff --git a/recipes/gapseq/build.sh b/recipes/gapseq/build.sh new file mode 100644 index 0000000000000..5cf8ec2bdb7b9 --- /dev/null +++ b/recipes/gapseq/build.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Installation instructions taken from https://github.com/jotech/gapseq/blob/master/docs/install.md#conda April 2024 by cmkobel + +# Copy contents to conda prefix +mkdir -p ${PREFIX}/gapseq/ +cp ISSUE_TEMPLATE.MD LICENSE README.md gapseq gapseq_env.yml ${PREFIX}/gapseq/ +cp -r dat/ docs/ src/ toy/ unit/ ${PREFIX}/gapseq/ + + +# Installing the CRAN archived sybilSBML package here requires a bunch of debugging to set the lib paths in R. That time is probably better spend fixing the package (sybilSBML) in the first place. So here is a quick workaround that makes this process a bit easier for the user. SybilSBML is not strictly necessary so I think the priority should be to get the main package (gapseq) working first. +echo '''#!/usr/bin/env bash +wget https://cran.r-project.org/src/contrib/Archive/sybilSBML/sybilSBML_3.1.2.tar.gz +R CMD INSTALL --configure-args=" \ +--with-sbml-include=$CONDA_PREFIX/include \ +--with-sbml-lib=$CONDA_PREFIX/lib" sybilSBML_3.1.2.tar.gz +rm sybilSBML_3.1.2.tar.gz +''' > ${PREFIX}/gapseq/src/install_archived_sybilSBML.sh +chmod +x ${PREFIX}/gapseq/src/install_archived_sybilSBML.sh +# Now the user can "easily" install this after installing the bioconda package with install_archived_sybilSBML.sh (This file will be linked to bin/). + + +# Download reference sequence data +# To install the database, we must call the installed file as it uses its own path to place the files correctly. +bash ${PREFIX}/gapseq/src/update_sequences.sh + + +# Final setup - Make binary available +mkdir -p ${PREFIX}/bin +ln -sr ${PREFIX}/gapseq/gapseq ${PREFIX}/bin/ +ln -sr ${PREFIX}/gapseq/src/update_sequences.sh ${PREFIX}/bin/ +ln -sr ${PREFIX}/gapseq/src/install_archived_sybilSBML.sh ${PREFIX}/bin/ + + +# --- + + +# Build at home with (before submitting to azure): +# conda activate bioconda-utils +# bioconda-utils lint --git-range master +# bioconda-utils build --mulled-test --git-range master diff --git a/recipes/gapseq/meta.yaml b/recipes/gapseq/meta.yaml new file mode 100644 index 0000000000000..b62b67d0b8755 --- /dev/null +++ b/recipes/gapseq/meta.yaml @@ -0,0 +1,71 @@ +{% set version = "1.2" %} + +package: + name: gapseq + version: {{ version }} + +source: + url: https://github.com/jotech/gapseq/archive/refs/tags/v{{ version}}.tar.gz + sha256: 061799f8e0406662450dd3d8d61d824220670fb23231895deecd490a5cbdf7cf + +build: + number: 0 + run_exports: + - {{ pin_subpackage('gapseq', max_pin="x") }} + skip: True # [osx] + +requirements: + run: + - r-base + - perl + - parallel + - gawk + - sed + - grep + - bc + - git + - coreutils + - wget + - openssl + - barrnap + - bedtools + - exonerate + - glpk + - hmmer + - blast + - libsbml + - r-data.table + - r-stringr + - r-stringi + - r-getopt + - r-doParallel + - r-foreach + - r-r.utils + - r-sybil + - r-biocmanager + - bioconductor-biostrings + - r-jsonlite + - r-renv + - r-glpkapi + - r-rcurl + - r-httr + - r-chnosz + build: + - wget + +test: + commands: + - gapseq test + +about: + home: https://github.com/jotech/gapseq + summary: Informed prediction and analysis of bacterial metabolic pathways and genome-scale networks + license_family: GPL + license: AGPL-3.0-only + license_file: LICENSE +extra: + skip-lints: + - should_be_noarch_generic + recipe-maintainers: + - cmkobel +