Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gapseq #47417

Merged
merged 17 commits into from
May 12, 2024
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it not noarch: generic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the linter gives this error, even though it is not noarch_generic (doesn't work on macos).

recipe-maintainers:
- cmkobel