Skip to content

Commit

Permalink
TIPP_plastid conda recipe (#51644)
Browse files Browse the repository at this point in the history
* Committer: Anupam Gautam <[email protected]>
TIPP_plastid is a User-Friendly Tool for De Novo Assembly of Organellar Genomes with HiFi Data

* Update recipes/tipp/build.sh

Co-authored-by: Martin Grigorov <[email protected]>

* Update recipes/tipp/build.sh

Co-authored-by: Martin Grigorov <[email protected]>

* Update recipes/tipp/build.sh

Co-authored-by: Martin Grigorov <[email protected]>

* Update recipes/tipp/build.sh

Co-authored-by: Martin Grigorov <[email protected]>

* Update recipes/tipp/build.sh

Co-authored-by: Martin Grigorov <[email protected]>

* Update recipes/tipp/meta.yaml

Co-authored-by: Martin Grigorov <[email protected]>

* Committer: Anupam Gautam <[email protected]>

suggestion incorporated

* Committer: Anupam Gautam <[email protected]>
updated meta and build.

* GenEra conda recipes

* removed genera files

* adjusted python

* update

* update

* Update meta.yaml

* update

* update

* Update meta.yaml

* Update meta.yaml

---------

Co-authored-by: Anupam Gautam <[email protected]>
Co-authored-by: Martin Grigorov <[email protected]>
Co-authored-by: richard-burhans <[email protected]>
Co-authored-by: Anupam Gautam <[email protected]>
  • Loading branch information
5 people authored Nov 25, 2024
1 parent 5f3b2eb commit 557ed37
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 0 deletions.
69 changes: 69 additions & 0 deletions recipes/tipp/build.sh
Original file line number Diff line number Diff line change
@@ -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."
55 changes: 55 additions & 0 deletions recipes/tipp/meta.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 557ed37

Please sign in to comment.