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

Update atlas to version 2.0.0-rc.5 #51996

Closed
wants to merge 13 commits into from
Next Next commit
atlas version 2.0.0-rc.5
glis-glis committed Nov 7, 2024
commit 7047da1271b5761993881edd9278890edbd8068f
17 changes: 6 additions & 11 deletions recipes/atlas/build.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
#!/bin/bash

export CFLAGS="$CFLAGS -I$PREFIX/include"
export LDFLAGS="$LDFLAGS -L$PREFIX/lib"
export LD_LIBRARY_PATH="${PREFIX}/lib"
export LIBRARY_PATH="${PREFIX}/lib"
export CPATH="${PREFIX}/include"
mkdir -p build
cd build
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add error handling for directory operations.

The cd command should handle potential failures to prevent silent errors in the build process.

 mkdir -p build
-cd build
+cd build || exit 1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mkdir -p build
cd build
mkdir -p build
cd build || exit 1
🧰 Tools
🪛 Shellcheck

[warning] 4-4: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

cmake .. -GNinja -DCONDA=ON -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_LIBRARY_PATH=${CONDA_PREFIX}/lib -DCMAKE_INCLUDE_PATH=${CONDA_PREFIX}/include
ninja
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add error handling for build command.

The build command should exit on failure to prevent incomplete installations.

-ninja
+ninja || exit 1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ninja
ninja || exit 1


sed -i.bak 's/^GIT_HEADER/#GIT_HEADER/' makefile

make CXX=$CXX ARM=false

mkdir -p $PREFIX/bin
cp atlas $PREFIX/bin
mkdir -p ${PREFIX}/bin
cp atlas ${PREFIX}/bin
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Improve binary installation robustness.

The installation steps should handle errors and ensure proper executable permissions.

 mkdir -p ${PREFIX}/bin
-cp atlas ${PREFIX}/bin
+cp atlas ${PREFIX}/bin/atlas || exit 1
+chmod +x ${PREFIX}/bin/atlas
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mkdir -p ${PREFIX}/bin
cp atlas ${PREFIX}/bin
mkdir -p ${PREFIX}/bin
cp atlas ${PREFIX}/bin/atlas || exit 1
chmod +x ${PREFIX}/bin/atlas

67 changes: 43 additions & 24 deletions recipes/atlas/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,58 @@
{% set version = "0.9.9" %}
{% set version = "2.0.0-rc.5" %}

package:
name: atlas
version: {{ version }}
version: 2.0.0

source:
url: https://bitbucket.org/wegmannlab/atlas/get/{{ version }}.tar.gz
sha256: 7b65eae5ab7ff439accd53febf8caa15ad9d8230278eee31fd5c2e95bf021990
sha256: fabbde9a4af8053f748568c666fbf0210e318f7794bd8d8aed827d5da37314d5
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Version inconsistency detected between template variable and package version

The template sets version to "2.0.0-rc.5" but the package version is set to "2.0.0". This inconsistency could cause issues with dependency resolution and version tracking.

Apply this diff to maintain consistency:

{% set version = "2.0.0-rc.5" %}

package: 
  name: atlas
-  version: 2.0.0
+  version: {{ version }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{% set version = "2.0.0-rc.5" %}
package:
name: atlas
version: {{ version }}
version: 2.0.0
source:
url: https://bitbucket.org/wegmannlab/atlas/get/{{ version }}.tar.gz
sha256: 7b65eae5ab7ff439accd53febf8caa15ad9d8230278eee31fd5c2e95bf021990
sha256: fabbde9a4af8053f748568c666fbf0210e318f7794bd8d8aed827d5da37314d5
{% set version = "2.0.0-rc.5" %}
package:
name: atlas
version: {{ version }}
source:
url: https://bitbucket.org/wegmannlab/atlas/get/{{ version }}.tar.gz
sha256: fabbde9a4af8053f748568c666fbf0210e318f7794bd8d8aed827d5da37314d5
🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


build:
number: 3
number: 0
run_exports:
- {{ pin_subpackage("atlas", max_pin="x") }}

requirements:
build:
- make
- {{ compiler('cxx') }}
- zlib
- armadillo
- libblas
- openblas
host:
- zlib
- armadillo
- libblas
- openblas
run:
- libblas
- zlib
- armadillo
build:
- git
- cmake
- ninja
- {{ compiler('cxx') }}
host:
- armadillo
- fmt
- htslib
- lapack
- nlohmann_json
- openblas
- openmp
- zlib
run:
- armadillo
- fmt
- htslib
- lapack
- nlohmann_json
- openblas
- openmp
- zlib

test:
commands:
- atlas task=recal | grep Wegmann
commands:
- atlas | grep "successfully"
- atlas simulate
- atlas HKY85 --bam ATLAS_simulations.bam --fasta ATLAS_simulations.fasta
- atlas GLF --bam ATLAS_simulations.bam
- atlas saf --glf ATLAS_simulations.glf.gz --fasta ATLAS_simulations.fasta
- atlas majorMinor --glf ATLAS_simulations.glf.gz

about:
home: https://bitbucket.org/wegmannlab/atlas/wiki/Home
home: https://atlaswiki.netlify.app
license: GPLv3
summary: "ATLAS, a suite of methods to accurately genotype and estimate genetic diversity"
summary: "ATLAS: Analysis Tools for Ancient and Low-depth Samples"

extra:
additional-platforms:
- linux-aarch64
- osx-arm64
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Dependencies not fully available for ARM platforms

Based on the verification results, there are compatibility concerns for ARM platforms:

  • fmt and lapack are available for both linux-aarch64 and osx-arm64
  • armadillo is missing for both ARM platforms
  • htslib is missing for both ARM platforms

The package cannot be built for ARM platforms without all required dependencies being available. Please either:

  1. Remove the ARM platform support until all dependencies are available
  2. Work with conda-forge to get the missing dependencies built for ARM platforms
🔗 Analysis chain

Verify build infrastructure for new platforms

The addition of arm64 platforms is significant. Please verify:

  1. Build infrastructure supports these platforms
  2. All dependencies are available for arm64
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if all dependencies are available for arm64 platforms
echo "Checking host dependencies..."
for dep in armadillo fmt htslib lapack nlohmann_json openblas openmp zlib; do
    echo "Checking $dep..."
    rg "name:\s*$dep" | xargs grep -l "osx-arm64\|linux-aarch64"
done

Length of output: 2017


Script:

#!/bin/bash
# Let's try a different approach to check dependencies
# First, let's find the requirements section in the meta.yaml
echo "Checking requirements in meta.yaml..."
rg -A 10 "requirements:" recipes/atlas/meta.yaml

# Then let's check if these dependencies are available in conda-forge
echo -e "\nChecking conda-forge packages..."
gh api -H "Accept: application/vnd.github+json" \
  /repos/conda-forge/feedstock-outputs/contents \
  | jq -r '.[] | select(.name | test("(armadillo|fmt|htslib|lapack|nlohmann_json|openblas|openmp|zlib).*json$")) | .name'

Length of output: 575


Script:

#!/bin/bash
# Let's check the conda-forge repository directly for arm64 support in these packages
echo "Checking armadillo..."
curl -s "https://conda.anaconda.org/conda-forge/linux-aarch64/repodata.json" | jq -r '.packages | keys[] | select(startswith("armadillo-"))'

echo -e "\nChecking fmt..."
curl -s "https://conda.anaconda.org/conda-forge/linux-aarch64/repodata.json" | jq -r '.packages | keys[] | select(startswith("fmt-"))'

echo -e "\nChecking htslib..."
curl -s "https://conda.anaconda.org/conda-forge/linux-aarch64/repodata.json" | jq -r '.packages | keys[] | select(startswith("htslib-"))'

echo -e "\nChecking lapack..."
curl -s "https://conda.anaconda.org/conda-forge/linux-aarch64/repodata.json" | jq -r '.packages | keys[] | select(startswith("lapack-"))'

# Also check for osx-arm64
echo -e "\nChecking osx-arm64 packages..."
curl -s "https://conda.anaconda.org/conda-forge/osx-arm64/repodata.json" | jq -r '.packages | keys[] | select(startswith("armadillo-") or startswith("fmt-") or startswith("htslib-") or startswith("lapack-"))'

Length of output: 1795