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

Add dbghaplo #51035

Merged
merged 9 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions recipes/dbghaplo/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -euo

# Add workaround for SSH-based Git connections from Rust/cargo. See https://github.com/rust-lang/cargo/issues/2078 for details.
# We set CARGO_HOME because we don't pass on HOME to conda-build, thus rendering the default "${HOME}/.cargo" defunct.
export CARGO_NET_GIT_FETCH_WITH_CLI=true CARGO_HOME="$(pwd)/.cargo"

# build statically linked binary with Rust
RUST_BACKTRACE=1 cargo install --verbose --path . --root $PREFIX
bluenote-1577 marked this conversation as resolved.
Show resolved Hide resolved
cp scripts/* $PREFIX/bin
48 changes: 48 additions & 0 deletions recipes/dbghaplo/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% set version="0.0.2" %}

package:
name: dbghaplo
version: {{ version }}

source:
url: https://github.com/bluenote-1577/dbghaplo/archive/v{{ version }}.tar.gz

bluenote-1577 marked this conversation as resolved.
Show resolved Hide resolved
sha256: e7e2741afb0c7f12718ec969815d3c8f18ce7ba66517e21c6fcfb3fe4262780b

build:
number: 0
run_exports:
- {{ pin_subpackage('dbghaplo', max_pin="x.x") }}
Comment on lines +11 to +14
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

Correction needed: Adjust pin_subpackage syntax.

The use of run_exports with pin_subpackage is good for ABI compatibility. However, the syntax for pin_subpackage is incorrect.

Please update the run_exports section as follows:

build:
  number: 0
  run_exports:
    - {{ pin_subpackage('dbghaplo', max_pin='x.x') }}

Note the single quotes around 'x.x' and the use of an equals sign instead of a colon.


requirements:
build:
- {{ compiler("cxx") }}
- rust >=1.70
bluenote-1577 marked this conversation as resolved.
Show resolved Hide resolved
- make
- cmake >=3.12
run:
- python
- samtools
- minimap2
- lofreq >=2.1.5
- tabix
- pysam >=0.16
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

Consider specifying Python version and adding version constraints for dependencies.

The requirements look good overall, but there are a few improvements to consider:

  1. It's recommended to specify the Python version to ensure compatibility. Consider adding a version constraint, e.g., python >=3.6.
  2. Add version constraints for samtools and minimap2 if specific versions are required.

Here's a suggested update to the run requirements:

  run:
    - python >=3.6
    - samtools >=1.9
    - minimap2 >=2.17
    - lofreq >=2.1.5
    - tabix
    - pysam >=0.16

Please adjust the Python version and other tool versions according to your package's specific requirements.


test:
commands:
- dbghaplo -h
- samtools --help
- minimap2 --help
- lofreq version
- tabix --help
bluenote-1577 marked this conversation as resolved.
Show resolved Hide resolved
- run_dbghaplo_pipeline -h
- haplotag_bam -h
mbhall88 marked this conversation as resolved.
Show resolved Hide resolved

about:
home: https://github.com/bluenote-1577/dbghaplo
license: MIT
bluenote-1577 marked this conversation as resolved.
Show resolved Hide resolved
summary: Haplotyping small sequences from heterogeneous long-read sequencing samples with a SNP-encoded positional de Bruijn Graph.

extra:
recipe-maintainers:
- bluenote-1577