diff --git a/recipes/nanomotif/meta.yaml b/recipes/nanomotif/meta.yaml index 46711bfd8dc19e..ae7001797361e3 100644 --- a/recipes/nanomotif/meta.yaml +++ b/recipes/nanomotif/meta.yaml @@ -1,5 +1,5 @@ {% set name = "nanomotif" %} -{% set version = "0.4.17" %} +{% set version = "0.5.0" %} package: name: {{ name|lower }} @@ -7,7 +7,7 @@ package: source: url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/nanomotif-{{ version }}.tar.gz - sha256: 7938f50ab930983a8cf965f06ce333dbfba38ab71002775bc67a33ff512602b5 + sha256: 35f94c2a3a52f2acc8e7e27ceac679a0895e1d9d770aae8a88231c8e13b5a27d build: entry_points: @@ -38,6 +38,8 @@ requirements: - biopython >=1.6.2 - pyarrow >=15.0.2 - snakemake-minimal >=7.32.4 + - hdbscan + - pymethylation_utils test: imports: diff --git a/recipes/pycoverm/build.sh b/recipes/pycoverm/build.sh new file mode 100644 index 00000000000000..e1ea36c2989927 --- /dev/null +++ b/recipes/pycoverm/build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -ex + +export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER="$CC" +export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="$CC" +export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 + +$PYTHON -m pip install . -vv --no-deps --no-build-isolation +cargo-bundle-licenses --format yaml --output THIRDPARTY.yml diff --git a/recipes/pycoverm/meta.yaml b/recipes/pycoverm/meta.yaml new file mode 100644 index 00000000000000..d05e1f1d1cf471 --- /dev/null +++ b/recipes/pycoverm/meta.yaml @@ -0,0 +1,58 @@ +{% set name = "pycoverm" %} +{% set version = "0.6.2" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + sha256: e5e96e55ee2756d0cbd1db383e136cd2c1e232204f25b015ce956b7a6f4ddee2 + +build: + number: 0 + run_exports: + - {{ pin_subpackage('pycoverm', max_pin="x.x") }} + +requirements: + build: + - {{ compiler("c") }} + - {{ compiler("cxx") }} + - {{ compiler("rust") }} + - {{ stdlib("c") }} + - python + - maturin >=1.7,<2 + - make + - cmake + - cargo-bundle-licenses + host: + - pip + - maturin >=1.7,<2 + - python + run: + - python + - numpy >=1.16,<3 + +test: + files: + - test.bam + imports: + - pycoverm + commands: + - pip check + requires: + - pip + +about: + home: https://github.com/apcamargo/pycoverm + license: GPL-3.0 + license_file: + - LICENSE + - THIRDPARTY.yml + summary: Python bindings for CoverM + +extra: + additional-platforms: + - osx-arm64 + skip-lints: + - version_constraints_missing_whitespace # see https://github.com/bioconda/bioconda-recipes/issues/51185 diff --git a/recipes/pycoverm/run_test.py b/recipes/pycoverm/run_test.py new file mode 100644 index 00000000000000..01add9511afbe7 --- /dev/null +++ b/recipes/pycoverm/run_test.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +import unittest + +import numpy as np +import pycoverm + + +class TestPycoverm(unittest.TestCase): + def setUp(self): + self.bam_file = "test.bam" + + def test_is_bam_sorted(self): + result = pycoverm.is_bam_sorted(self.bam_file) + self.assertIsInstance(result, bool) + + def test_get_coverages_from_bam(self): + result = pycoverm.get_coverages_from_bam([self.bam_file]) + self.assertIsInstance(result[0], list) + self.assertIsInstance(result[1], np.ndarray) + self.assertAlmostEqual(result[1].sum(), 30.173173904418945) + + +if __name__ == "__main__": + unittest.main() diff --git a/recipes/pycoverm/test.bam b/recipes/pycoverm/test.bam new file mode 100644 index 00000000000000..ec0025030c0dfd Binary files /dev/null and b/recipes/pycoverm/test.bam differ