From a75ce87420fff0e153998160b3ac30499c7993c6 Mon Sep 17 00:00:00 2001 From: BiocondaBot <47040946+BiocondaBot@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:10:22 +0000 Subject: [PATCH 1/8] Update ncbi-amrfinderplus to 4.0.3 --- recipes/ncbi-amrfinderplus/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/ncbi-amrfinderplus/meta.yaml b/recipes/ncbi-amrfinderplus/meta.yaml index 1e8066c9c665a..c171b2c3ae577 100644 --- a/recipes/ncbi-amrfinderplus/meta.yaml +++ b/recipes/ncbi-amrfinderplus/meta.yaml @@ -1,5 +1,5 @@ -{% set version = "3.12.8" %} -{% set sha256 = "a199bc332877bad9033a7620bc5e8e849db1f19a9ba8b7357ec5451a6a283aa0" %} +{% set version = "4.0.3" %} +{% set sha256 = "80ad1e217c78024633aa6e11052f6290b445414251372e4379c373915768564d" %} package: name: ncbi-amrfinderplus From 22d91be51726daf9b8bbfa00527ea3070613340e Mon Sep 17 00:00:00 2001 From: Arjun Prasad Date: Tue, 29 Oct 2024 15:30:46 -0400 Subject: [PATCH 2/8] Try switching to git for checkout We need to enable the submodule so I'm going to try using git for checkout. --- recipes/ncbi-amrfinderplus/meta.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/ncbi-amrfinderplus/meta.yaml b/recipes/ncbi-amrfinderplus/meta.yaml index c171b2c3ae577..478d520016c85 100644 --- a/recipes/ncbi-amrfinderplus/meta.yaml +++ b/recipes/ncbi-amrfinderplus/meta.yaml @@ -6,16 +6,19 @@ package: version: {{ version }} source: - url: https://github.com/ncbi/amr/archive/amrfinder_v{{ version }}.tar.gz + git_url: https://github.com/ncbi/amr.git + git_rev: {{ version }} sha256: {{ sha256 }} + git_depth: 10 build: - number: 0 + number: 1 run_exports: - {{ pin_subpackage('ncbi-amrfinderplus', max_pin="x") }} requirements: build: + - git - make - {{ compiler('cxx') }} host: From 67f4b31c13e36394d582bb609275130cde1e1976 Mon Sep 17 00:00:00 2001 From: Arjun Prasad Date: Tue, 29 Oct 2024 15:31:44 -0400 Subject: [PATCH 3/8] Add git submodule update --init --- recipes/ncbi-amrfinderplus/build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/ncbi-amrfinderplus/build.sh b/recipes/ncbi-amrfinderplus/build.sh index 67becc82bc7d9..68bec62e7f64f 100755 --- a/recipes/ncbi-amrfinderplus/build.sh +++ b/recipes/ncbi-amrfinderplus/build.sh @@ -12,6 +12,9 @@ echo $PREFIX # fix error because of gnu++17 features. Suggested by https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" +# Get StxTyper source as well +git submodule update --init + # note that for version 3.7 the make command should be: make CXX="$CXX $LDFLAGS" CPPFLAGS="$CXXFLAGS" PREFIX="$PREFIX" CONDA_DB_DIR="$CONDA_PREFIX/share/amrfinderplus/data" From 76a0736d4d0f45a6818d1c2c5b8f98286555f749 Mon Sep 17 00:00:00 2001 From: Arjun Prasad Date: Tue, 29 Oct 2024 15:42:20 -0400 Subject: [PATCH 4/8] Reset build number to zero and remove sha hash --- recipes/ncbi-amrfinderplus/meta.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/ncbi-amrfinderplus/meta.yaml b/recipes/ncbi-amrfinderplus/meta.yaml index 478d520016c85..1bfa78798e338 100644 --- a/recipes/ncbi-amrfinderplus/meta.yaml +++ b/recipes/ncbi-amrfinderplus/meta.yaml @@ -8,11 +8,10 @@ package: source: git_url: https://github.com/ncbi/amr.git git_rev: {{ version }} - sha256: {{ sha256 }} git_depth: 10 build: - number: 1 + number: 0 run_exports: - {{ pin_subpackage('ncbi-amrfinderplus', max_pin="x") }} From dad461763bcb7507477e7cadd24a4b5009610421 Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:52:33 -0500 Subject: [PATCH 5/8] add skip-lints --- recipes/ncbi-amrfinderplus/meta.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/recipes/ncbi-amrfinderplus/meta.yaml b/recipes/ncbi-amrfinderplus/meta.yaml index 1bfa78798e338..e94af7ec70c20 100644 --- a/recipes/ncbi-amrfinderplus/meta.yaml +++ b/recipes/ncbi-amrfinderplus/meta.yaml @@ -7,8 +7,7 @@ package: source: git_url: https://github.com/ncbi/amr.git - git_rev: {{ version }} - git_depth: 10 + git_rev: amrfinder_v{{ version }} build: number: 0 @@ -20,13 +19,12 @@ requirements: - git - make - {{ compiler('cxx') }} - host: - coreutils + host: - libcurl run: - blast >=2.9 - hmmer >=3.2 - - libcurl - curl test: @@ -49,10 +47,10 @@ test: diff test_both.expected test_both.got about: - home: https://github.com/ncbi/amr/wiki + home: https://github.com/ncbi/amr license: Public Domain license_file: LICENSE - summary: AMRFinderPlus finds antimicrobial resistance and other genes in protein or nucleotide sequences. + summary: "AMRFinderPlus finds antimicrobial resistance and other genes in protein or nucleotide sequences." description: | This software and the accompanying database are designed to find acquired antimicrobial resistance genes in bacterial protein or @@ -60,9 +58,13 @@ about: AMRFinderPlus we have added select members of additional classes of genes such as virulence factors, biocide, heat, acid, and metal resistance genes. doc_url: https://github.com/ncbi/amr/wiki + dev_url: https://github.com/ncbi/amr extra: recipe-maintainers: - evolarjun identifiers: - doi:10.1038/s41598-021-91456-0 + skip-lints: + - uses_vcs_url + - missing_hash From 908a96300f44ee78c8c31ab7e172930a9493a1b1 Mon Sep 17 00:00:00 2001 From: Arjun Prasad Date: Tue, 29 Oct 2024 16:00:15 -0400 Subject: [PATCH 6/8] Add sha256 back into the source clause --- recipes/ncbi-amrfinderplus/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/ncbi-amrfinderplus/meta.yaml b/recipes/ncbi-amrfinderplus/meta.yaml index e94af7ec70c20..3ee0696cc7bec 100644 --- a/recipes/ncbi-amrfinderplus/meta.yaml +++ b/recipes/ncbi-amrfinderplus/meta.yaml @@ -1,5 +1,5 @@ {% set version = "4.0.3" %} -{% set sha256 = "80ad1e217c78024633aa6e11052f6290b445414251372e4379c373915768564d" %} +{% set sha256 = "e3007c074ac77e410914691b38d7eaaaaf2cda6c" %} package: name: ncbi-amrfinderplus @@ -8,6 +8,7 @@ package: source: git_url: https://github.com/ncbi/amr.git git_rev: amrfinder_v{{ version }} + sha256: {{ sha256 }} build: number: 0 From 91766e3aaa2b35e913fcc26e17c90dedb72c249d Mon Sep 17 00:00:00 2001 From: Joshua Zhuang <71105179+mencian@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:55:23 -0500 Subject: [PATCH 7/8] edit build.sh --- recipes/ncbi-amrfinderplus/build.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/recipes/ncbi-amrfinderplus/build.sh b/recipes/ncbi-amrfinderplus/build.sh index 68bec62e7f64f..a70a91028df44 100755 --- a/recipes/ncbi-amrfinderplus/build.sh +++ b/recipes/ncbi-amrfinderplus/build.sh @@ -1,24 +1,18 @@ #!/bin/bash echo "DEBUGGING environment info because PREFIX did not appear to be set" -echo "PREFIX=$PREFIX CONDA_PREFIX=$CONDA_PREFIX" +echo "PREFIX=$PREFIX CONDA_PREFIX=$CONDA_PREFIX" echo "PREFIX =" $PREFIX CONDA_PREFIX = $CONDA_PREFIX BUILD_PREFIX = $BUILD_PREFIX echo $PREFIX -# test fix for version 3.9.8 -# move patch to meta.yaml -# patch < patch.3.9.8 +export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" # fix error because of gnu++17 features. Suggested by https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk -CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" +CXXFLAGS="${CXXFLAGS} -O3 -D_LIBCPP_DISABLE_AVAILABILITY" # Get StxTyper source as well git submodule update --init -# note that for version 3.7 the make command should be: -make CXX="$CXX $LDFLAGS" CPPFLAGS="$CXXFLAGS" PREFIX="$PREFIX" CONDA_DB_DIR="$CONDA_PREFIX/share/amrfinderplus/data" +make CXX="$CXX $LDFLAGS" CPPFLAGS="$CXXFLAGS -I${PREFIX}/include" PREFIX="$PREFIX" DEFAULT_DB_DIR="${PREFIX}/share/amrfinderplus/data" -j"${CPU_COUNT}" -#echo "make CXX=\"$CXX $LDFLAGS\" CPPFLAGS=\"$CXXFLAGS\" PREFIX=\"$PREFIX\" DEFAULT_DB_DIR=\"$PREFIX/share/amrfinderplus/data\"" - -#make CXX="$CXX $LDFLAGS" CPPFLAGS="$CXXFLAGS" PREFIX=$PREFIX DEFAULT_DB_DIR="$PREFIX/share/amrfinderplus/data" -make install bindir=$PREFIX/bin +make install INSTALL_DIR="$PREFIX/bin" From 751cd3e11c71126449a23d64ae763e9121d9b067 Mon Sep 17 00:00:00 2001 From: Arjun Prasad Date: Tue, 29 Oct 2024 17:01:45 -0400 Subject: [PATCH 8/8] Fix for Makefile install target bug --- recipes/ncbi-amrfinderplus/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/recipes/ncbi-amrfinderplus/build.sh b/recipes/ncbi-amrfinderplus/build.sh index a70a91028df44..417e5c7226118 100755 --- a/recipes/ncbi-amrfinderplus/build.sh +++ b/recipes/ncbi-amrfinderplus/build.sh @@ -16,3 +16,12 @@ git submodule update --init make CXX="$CXX $LDFLAGS" CPPFLAGS="$CXXFLAGS -I${PREFIX}/include" PREFIX="$PREFIX" DEFAULT_DB_DIR="${PREFIX}/share/amrfinderplus/data" -j"${CPU_COUNT}" make install INSTALL_DIR="$PREFIX/bin" + +### Temporary bug fix for issue with Makefile. These lines have been added to the makefile +# for future releases, so remove after version 4.0.3 +if [ ! -e "$PREFIX/bin/stx/stxtyper" ] +then + mkdir "$PREFIX/bin/stx" + ln -s ../stxtyper "$PREFIX/bin/stx/stxtyper" +fi +# end bug fix