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 get_mnv #51178

Merged
merged 13 commits into from
Oct 7, 2024
71 changes: 71 additions & 0 deletions recipes/get_mnv/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{% set name = "get_mnv" %}
{% set version = "1.0.0" %}
{% set sha256 = "b9ba6fe1a5f5f73afa98cde9e348f7861d44690f795338816a8a0724a66e1aa8" %}

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

source:
url: "https://github.com/PathoGenOmics-Lab/{{ name }}/archive/refs/tags/{{ version }}.tar.gz"
sha256: "{{ sha256 }}"

build:
number: 0
script: |
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export RUST_BACKTRACE=1
export OPENSSL_NO_VENDOR=1
export OPENSSL_DIR=$PREFIX
export OPENSSL_INCLUDE_DIR=$PREFIX/include
export OPENSSL_LIB_DIR=$PREFIX/lib
export CURL_STATIC_SSL=1
export CURL_SYS_STATIC=1
#export CARGO_NET_OFFLINE=true
export HTS_LIB_DIR=$PREFIX/lib
export HTS_INCLUDE_DIR=$PREFIX/include
export HTS_STATIC=1
export HTS_SYS_BUNDLED=0
cargo install --no-track --locked --verbose --root "${PREFIX}" --path .
run_exports:
- {{ pin_subpackage(name, max_pin="x") }}

requirements:
build:
- {{ compiler('rust') }}
- openssl
- curl
- pkg-config
- htslib
Copy link
Contributor

Choose a reason for hiding this comment

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

The libraries should be in 'host', not 'build'

- bzip2
- xz
- zlib
run:
- openssl
- curl
- htslib
- bzip2
- xz
- zlib
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

Refactor suggestion: Adjust requirements section structure.

Consider restructuring the requirements section to better align with Bioconda best practices:

  1. Move the libraries (openssl, curl, htslib, bzip2, xz, zlib) from the 'build' section to a new 'host' section.
  2. Keep only the Rust compiler and pkg-config in the 'build' section.
  3. Adjust the 'run' section to use the {{ pin_compatible() }} function for the libraries.

Here's a suggested restructure:

requirements:
  build:
    - {{ compiler('rust') }}
    - pkg-config
  host:
    - openssl
    - curl
    - htslib
    - bzip2
    - xz
    - zlib
  run:
    - {{ pin_compatible('openssl') }}
    - {{ pin_compatible('curl') }}
    - {{ pin_compatible('htslib') }}
    - {{ pin_compatible('bzip2') }}
    - {{ pin_compatible('xz') }}
    - {{ pin_compatible('zlib') }}

This structure ensures that the libraries are available at build time and properly pinned at runtime.


test:
commands:
- get_mnv --help
Comment on lines +55 to +57
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

Enhance test coverage.

While the current test ensures that the get_mnv binary is installed and executable, consider adding more comprehensive tests to verify the tool's functionality. For example:

test:
  commands:
    - get_mnv --help
    - get_mnv --version
    - get_mnv --test  # If there's a built-in test option
    # Add a command to run get_mnv on a small test dataset, if possible

These additional tests would provide better assurance that the tool is functioning correctly after installation.

Would you like assistance in generating more specific test commands based on the tool's functionality?


about:
home: "https://github.com/PathoGenOmics-Lab/get_mnv"
license: "GPL-3.0"
Paururo marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
license: "GPL-3.0"
license: "GPL-3.0-or-later"

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
license: "GPL-3.0"
license: "GPL-3.0"
license_family: GPL3

license_file: LICENSE
summary: "Tool to identify Multi-Nucleotide Variants (MNVs) in genomic sequences."
description: |
get_MNV is a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences, providing more accurate annotation for genomic data.
doc_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
dev_url: "https://github.com/PathoGenOmics-Lab/get_mnv"

extra:
recipe-maintainers:
- PathoGenOmics-Lab
categories:
- Genomics
- Variant Analysis