Skip to content

Commit

Permalink
Add Gapseq (bioconda#47417)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

---------

Co-authored-by: Björn Grüning <[email protected]>
  • Loading branch information
cmkobel and bgruening authored May 12, 2024
1 parent 10cfea0 commit 957c6af
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
41 changes: 41 additions & 0 deletions recipes/gapseq/build.sh
Original file line number Diff line number Diff line change
@@ -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
71 changes: 71 additions & 0 deletions recipes/gapseq/meta.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 957c6af

Please sign in to comment.