diff --git a/recipes/tipp/build.sh b/recipes/tipp/build.sh new file mode 100644 index 0000000000000..f09c63fc92d73 --- /dev/null +++ b/recipes/tipp/build.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# Exit on any error +set -ex + +# Define variables for directories +# define kmc directory + +KMC_DIR="src/kmc3" + +mkdir $KMC_DIR/bin +cp $BUILD_PREFIX/bin/kmc* $KMC_DIR/bin/ +cp $BUILD_PREFIX/lib/libkmc_core.a $KMC_DIR/bin/ + +# Build seqtk +SEQTK_DIR="src/seqtk" +cd "$SEQTK_DIR" + +export C_INCLUDE_PATH=${PREFIX}/include +export LIBRARY_PATH=${PREFIX}/lib + +make CC=${CC} CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" all -j "${CPU_COUNT}" + +# Go back to the src directory +cd .. + +# Compile readskmercount as an object first if it doesn't have a main +${CXX} -c readskmercount.opt.cpp -I./kmc3 + +# Then link it to create the executable +${CXX} -o readskmercount readskmercount.opt.o -L./kmc3/bin -lkmc_core -pthread + +# Copy everything to the Conda environments bin directory to ensure they're accessible +echo "Copying binaries to PREFIX..." +mkdir -p $PREFIX/bin +mkdir -p $PREFIX/bin/kmc3 +mkdir -p $PREFIX/bin/seqtk + +for file in *.pl; do + sed -i.bak '1 s|^#!/usr/bin/perl$|#!/usr/bin/env perl|' "$file" +done + +cp graph.plot.r readskmercount TIPP.pl TIPP_polish.pl html2repeatbed.pl MSA.plot.r TIPP_plastid.pl TIPP_telomere_backup.pl readskmercount.cpp telomeres.visulization.r TIPP_plastid.v2.1.pl TIPP_telomere.pl "$PREFIX/bin/" || { echo "Failed to copy specific binaries to PREFIX"; exit 1; } +cp -r kmc3/bin $PREFIX/bin/kmc3/ +cp seqtk/seqtk $PREFIX/bin/seqtk/ + +echo "Installation completed successfully." +echo "Copying activation and deactivation scripts..." +mkdir -p $PREFIX/etc/conda/activate.d +mkdir -p $PREFIX/etc/conda/deactivate.d + +# Add TIPP and related tools to the PATH + +cat << EOF > $PREFIX/etc/conda/activate.d/tipp.sh +# Set the current path to the conda environment's bin directory +export CURRENT_PATH=\$CONDA_PREFIX/bin + +# Add TIPP and related tools to the PATH +export PATH=\$CURRENT_PATH:\$PATH +export PATH=\$CURRENT_PATH/seqtk:\$PATH +export PATH=\$CURRENT_PATH/kmc3/bin:\$PATH +EOF + +cat << EOF > $PREFIX/etc/conda/deactivate.d/tipp.sh +# Remove the current conda environment's bin directory from PATH +export PATH=\$(echo \$PATH | sed -e "s|$CONDA_PREFIX/bin:||g") +EOF + +echo "Installation completed successfully." diff --git a/recipes/tipp/meta.yaml b/recipes/tipp/meta.yaml new file mode 100644 index 0000000000000..b70f8c71acd45 --- /dev/null +++ b/recipes/tipp/meta.yaml @@ -0,0 +1,55 @@ +package: + name: tipp + version: "1.1.0" + +source: + git_url: https://github.com/Wenfei-Xian/TIPP.git + git_tag: v1.1.0 + sha256: a3e57e709c206b742a954524b3f1d304d435e6f3cbe85617ade745b8ef5d5d7f + +build: + number: 0 + skip: True # [osx] + run_exports: + - {{ pin_subpackage('tipp', max_pin="x.x") }} + +requirements: + build: + - {{ compiler('cxx') }} # For compiling C++ code + - make + - kmc + host: + - python >=3.8,<3.9 + - zlib + - perl + run: + - python >=3.8,<3.9 + - libxcrypt + - tiara + - graphaligner =1.0.17 + - flye + - minimap2 =2.26 + - spoa =4.1.4 + - mcl =22.282 + - r-pheatmap =1.0.12 + - r-igraph =1.5.1 + - bioconductor-biostrings =2.68.1 + - r-stringdist =0.9.10 + - r-ggplot2 =3.4.4 + - trf =4.09.1 + - zlib + - perl +test: + commands: + - TIPP_plastid.v2.1.pl -h + - TIPP_telomere.pl -h + +about: + home: https://github.com/Wenfei-Xian/TIPP + license: "GPL-3.0-or-later" + license_family: GPL3 + summary: "TIPP: A User-Friendly Tool for De Novo Assembly of Organellar Genomes with HiFi Data" + +extra: + skip-lints: + - uses_vcs_url