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 ntsm recipe https://github.com/JustinChu/ntsm #52262

Merged
merged 12 commits into from
Nov 25, 2024
21 changes: 21 additions & 0 deletions recipes/ntsm/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Justin Chu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 18 additions & 0 deletions recipes/ntsm/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash -euo

set -xe

export CFLAGS="-I$PREFIX/include -O3"
export LDFLAGS="-L$PREFIX/lib"
export CPATH="${PREFIX}/include"
export CXXFLAGS="-I${PREFIX}/include -O3 -std=c++17"
export CPPFLAGS="-isystem/${PREFIX}/include"

./configure --prefix=${PREFIX} --disable-dependency-tracking --disable-silent-rules

make -j ${CPU_COUNT}
make install

mkdir -p ${PREFIX}/bin
cp -rf ntsm-scripts ntsmSiteGen ${PREFIX}/bin

50 changes: 50 additions & 0 deletions recipes/ntsm/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% set version = "1.1.0" %}

package:
name: ntsm
version: {{ version }}

source:
url: https://github.com/JustinChu/ntsm/releases/download/{{ version }}/ntsm-{{ version }}.tar.gz
sha256: 85dc064249edc2836edf55c91f626d11bcb045e57bbdebff02fc4ff2bd9a7b53

build:
skip: true # [osx or win]
number: 0

requirements:
build:
- {{ compiler('cxx') }}
- llvm-openmp # [osx]
- make
host:
- zlib
- libgomp
run:
- llvm-openmp # [osx]
- zlib
- libgomp
- make
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need 'make' to run the app ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not for most parts of the program but for a pipeline generating a sites file from a vcf & genome fasta: https://github.com/JustinChu/ntsm/blob/main/ntsmSiteGen

- samtools
- bwa
- perl
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

Add version constraints for runtime dependencies.

Consider adding version constraints for critical dependencies like samtools, bwa, and perl to ensure reproducibility and prevent potential compatibility issues.

Additionally, there might be a conflict between libgomp and llvm-openmp if OSX builds are enabled in the future.

  run:
    - llvm-openmp  # [osx]
    - zlib
    - libgomp
    - make
-   - samtools
-   - bwa
-   - perl
+   - samtools >=1.15
+   - bwa >=0.7.17
+   - perl >=5.26
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
requirements:
build:
- {{ compiler('cxx') }}
- llvm-openmp # [osx]
- make
host:
- zlib
- libgomp
run:
- llvm-openmp # [osx]
- zlib
- libgomp
- make
- samtools
- bwa
- perl
requirements:
build:
- {{ compiler('cxx') }}
- llvm-openmp # [osx]
- make
host:
- zlib
- libgomp
run:
- llvm-openmp # [osx]
- zlib
- libgomp
- make
- samtools >=1.15
- bwa >=0.7.17
- perl >=5.26


test:
commands:
- ntsmCount --help
- ntsmVCF --help
- ntsmEval --help
- ntsmSiteGen -h

about:
home: "https://github.com/JustinChu/ntsm"
summary: "ntsm - Nucleotide Sequence/Sample Matcher"
license: "MIT"
license_family: MIT
license_file: LICENSE
dev_url: "https://github.com/JustinChu/ntsm"
doc_url: "https://github.com/JustinChu/ntsm/blob/{{ version }}/README.md"

extra:
additional-platforms:
- linux-aarch64
Loading