Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
qwx9 authored Dec 21, 2024
2 parents 394f743 + a442e72 commit c87bc0d
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 2 deletions.
6 changes: 4 additions & 2 deletions recipes/nanomotif/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% set name = "nanomotif" %}
{% set version = "0.4.17" %}
{% set version = "0.5.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/nanomotif-{{ version }}.tar.gz
sha256: 7938f50ab930983a8cf965f06ce333dbfba38ab71002775bc67a33ff512602b5
sha256: 35f94c2a3a52f2acc8e7e27ceac679a0895e1d9d770aae8a88231c8e13b5a27d

build:
entry_points:
Expand Down Expand Up @@ -38,6 +38,8 @@ requirements:
- biopython >=1.6.2
- pyarrow >=15.0.2
- snakemake-minimal >=7.32.4
- hdbscan
- pymethylation_utils

test:
imports:
Expand Down
10 changes: 10 additions & 0 deletions recipes/pycoverm/build.sh
Original file line number Diff line number Diff line change
@@ -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
58 changes: 58 additions & 0 deletions recipes/pycoverm/meta.yaml
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions recipes/pycoverm/run_test.py
Original file line number Diff line number Diff line change
@@ -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()
Binary file added recipes/pycoverm/test.bam
Binary file not shown.

0 comments on commit c87bc0d

Please sign in to comment.