diff --git a/recipes/sipros/LICENSE b/recipes/sipros/LICENSE new file mode 100644 index 0000000000000..d14aff8022d93 --- /dev/null +++ b/recipes/sipros/LICENSE @@ -0,0 +1,24 @@ +MIT License + +Copyright (c) 2023 Phase Technician XYZ + +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. + +Code written for the MSToolkit uses the Apache License, Version 2.0. All 3rd +party software included in the MSToolkit library retains its original license. \ No newline at end of file diff --git a/recipes/sipros/Raxport.sh b/recipes/sipros/Raxport.sh new file mode 100644 index 0000000000000..958980acb6e9d --- /dev/null +++ b/recipes/sipros/Raxport.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +mono "$DIR/Raxport.exe" "$@" diff --git a/recipes/sipros/build.sh b/recipes/sipros/build.sh new file mode 100644 index 0000000000000..e47019df5ce18 --- /dev/null +++ b/recipes/sipros/build.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -e + +mkdir -p "$PREFIX/bin" +chmod u+x bin/* +cp -r bin/* "$PREFIX/bin" + +cp -r EnsembleScripts "$PREFIX" + +cp -r V4Scripts "$PREFIX" + +cp -r configTemplates "$PREFIX" + +for script in sipros_prepare_protein_database.py sipros_psm_tabulating.py sipros_ensemble_filtering.py sipros_peptides_assembling.py; do + baseName=$(basename $script .py) + sed -i '1i#!/usr/bin/env python\n' "$PREFIX/EnsembleScripts/$script" + ln -s "$PREFIX/EnsembleScripts/$script" "$PREFIX/bin/EnsembleScripts_$baseName" +done + +for script in sipros_peptides_filtering.py sipros_peptides_assembling.py ClusterSip.py; do + baseName=$(basename $script .py) + sed -i '1i#!/usr/bin/env python\n' "$PREFIX/V4Scripts/$script" + ln -s "$PREFIX/V4Scripts/$script" "$PREFIX/bin/V4Scripts_$baseName" +done + +for script in refineProteinFDR.R getSpectraCountInEachFT.R makeDBforLabelSearch.R getLabelPCTinEachFT.R; do + baseName=$(basename $script .R) + sed -i '1i#!/usr/bin/env Rscript\n' "$PREFIX/V4Scripts/$script" + ln -s "$PREFIX/V4Scripts/$script" "$PREFIX/bin/V4Scripts_$baseName" +done + +cp "$RECIPE_DIR"/Raxport.sh "$PREFIX/bin/Raxport" +cp "$RECIPE_DIR"/copyConfigTemplate.sh "$PREFIX/bin/copyConfigTemplate" +chmod u+x $PREFIX/bin/* \ No newline at end of file diff --git a/recipes/sipros/copyConfigTemplate.sh b/recipes/sipros/copyConfigTemplate.sh new file mode 100755 index 0000000000000..6231dd1530584 --- /dev/null +++ b/recipes/sipros/copyConfigTemplate.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +if [ -z "$2" ]; then + OUTPUT_PATH="." +else + OUTPUT_PATH=$2 +fi + +if [ -z "$CONDA_PREFIX" ]; then + echo "Error: CONDA_PREFIX is not set. Are you running this in a Conda environment?" + exit 1 +fi + +TEMPLATE_DIR="$CONDA_PREFIX/configTemplates" + +if [ "$1" == "-Regular" ]; then + TEMPLATE="$TEMPLATE_DIR/SiprosEnsembleConfig.cfg" +elif [ "$1" == "-SIP" ]; then + TEMPLATE="$TEMPLATE_DIR/SiprosV4Config.cfg" +else + echo "Usage: copyConfigTemplate {-Regular|-SIP} " + exit 1 +fi + +if [ ! -f "$TEMPLATE" ]; then + echo "Error: Template file $TEMPLATE not found" + exit 1 +fi + +cp -v "$TEMPLATE" "$OUTPUT_PATH" \ No newline at end of file diff --git a/recipes/sipros/meta.yaml b/recipes/sipros/meta.yaml new file mode 100644 index 0000000000000..59ad6e7f6aa78 --- /dev/null +++ b/recipes/sipros/meta.yaml @@ -0,0 +1,57 @@ +{% set name = "sipros" %} +{% set version = "4.01" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://github.com/thepanlab/Sipros4/releases/download/{{ version }}/siprosRelease.zip + sha256: 10030671b94a8a2ab354396178f35c30a8e8e0c633864533690c1ff285906c9c + +build: + noarch: generic + number: 0 + skip: False + run_exports: + - {{ pin_subpackage('sipros', max_pin="x") }} + +requirements: + run: + - bioconductor-biostrings + - mono + - numpy =1.16 + - python =2.7 + - r-base + - r-stringr + - r-tidyr + - scikit-learn =0.20.3 + +test: + commands: + - configGenerator -h + - SiprosEnsembleOMP --help + - SiprosV4OMP --help + - Raxport -h + - EnsembleScripts_sipros_psm_tabulating -v + - V4Scripts_sipros_peptides_filtering -v + - V4Scripts_getSpectraCountInEachFT -help + - V4Scripts_refineProteinFDR -help + - copyConfigTemplate -SIP + +about: + home: https://github.com/thepanlab/Sipros4 + license: MIT + # currently include in the recipe folder because from the release (https://github.com/thepanlab/Sipros4/issues/3) + license_file: LICENSE + summary: "Tools for stable isotopic mass spectrometry-based metaproteomics" + description: | + "Tools for stable isotopic mass spectrometry-based metaproteomics research developed by Sipros team. These include Raxport, SiprosV4, SiprosEnsemble and some python / R scripts." + +extra: + recipe-maintainers: + - bernt-matthias + - yi-xiong + identifiers: + - biotools:sipros + - doi:10.1186/s40168-024-01866-1 \ No newline at end of file