Skip to content

Instantly share code, notes, and snippets.

@dansondergaard
Created October 10, 2022 06:14
Show Gist options
  • Save dansondergaard/a23ec36d3f784ae3c71ae907ee7beca6 to your computer and use it in GitHub Desktop.
Save dansondergaard/a23ec36d3f784ae3c71ae907ee7beca6 to your computer and use it in GitHub Desktop.
Conda recipe for somalier
#!/bin/bash
export PATH=${SRC_DIR}/.nimble/bin:${SRC_DIR}/nim/bin/:$PATH
export NIMBLE_DIR=${SRC_DIR}/.nimble/
for path in $(find $CONDA_PREFIX/bin/ -name "x86_64-*" -type f); do
basename $path | sed 's/x86_64-conda-linux-gnu-//'
done | xargs -IX ln -s $CONDA_PREFIX/bin/x86_64-conda-linux-gnu-X $CONDA_PREFIX/bin/X
export RUSTFLAGS=-Ctarget-feature=-crt-static
cd ${SRC_DIR}/d4-format
cargo build --package=d4binding --release
install -m 644 target/x86_64-unknown-linux-gnu/release/libd4binding.a ${BUILD_PREFIX}/lib
install -m 644 d4binding/include/d4.h ${BUILD_PREFIX}/include
cd ${SRC_DIR}/somalier
sed -i 's/network ctx, AncestryNet:/network AncestryNet:/' src/somalierpkg/ancestry.nim
sed -i '/x: Input/d' src/somalierpkg/ancestry.nim
nimble install -y nimble
nimble install -d -y
nim c -d:danger -d:release -d:openmp -d:blas=openblas -d:lapack=openblas -d:nimNoGetRandom -o:$PREFIX/bin/somalier src/somalier
package:
name: somalier
version: "0.2.15"
description: "fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs..."
source:
- git_url: https://github.com/brentp/somalier.git
git_rev: v0.2.15
folder: somalier
- url: https://nim-lang.org/download/nim-1.6.6-linux_x64.tar.xz
folder: nim
- git_url: https://github.com/38/d4-format.git
git_rev: master
folder: d4-format
build:
number: 0
requirements:
build:
- "{{ compiler('c') }}"
- "{{ compiler('fortran') }}"
- "{{ compiler('rust') }}"
- autoconf
- bcftools>=1.10
- bzip2
- cmake
- curl
- git
- htslib>=1.10
- libdeflate
- libnghttp2
- libzip
- m4
- openblas
- tar
- wget
- xz
- zlib
run:
- bcftools>=1.10
- bzip2
- htslib>=1.10
- libdeflate
- libnghttp2
- libzip
- openblas
test:
commands:
- somalier
app:
summary: "fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs..."
license: MIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment