-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.