forked from bioconda/bioconda-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recipe for Poolsnp (bioconda#49156)
* Add PoolSNP recipe v1.0.0 * Add run_exports * Fix linting * Include test directory * Specify Testdata destination * Fix path specifications * Fix path specification in test.sh * Potential tests fix * Add noarch specification * Adding .py scripts to bin/ * Test fixes * Add noarch specification * Streamline tests * Alter test command * Separate out tests * Add release tarball
- Loading branch information
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /bin/bash | ||
|
||
set -ex | ||
|
||
BASE_DIR=$(dirname "$0") | ||
SCRIPTS_DIR="${BASE_DIR}/scripts" | ||
TEST_DATA_DIR="${BASE_DIR}/TestData" | ||
|
||
if [ ! -d "${SCRIPTS_DIR}" ]; then | ||
echo "The scripts directory is missing. It should be placed in the same directory as the PoolSNP.sh script." | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d "${TEST_DATA_DIR}" ]; then | ||
echo "The TestData directory is missing. It should be placed in the same directory as the PoolSNP.sh script." | ||
exit 1 | ||
fi | ||
|
||
mkdir -p ${PREFIX}/bin | ||
mkdir -p ${PREFIX}/bin/scripts | ||
mkdir -p ${PREFIX}/share/PoolSNP | ||
|
||
cp PoolSNP.sh ${PREFIX}/bin | ||
chmod +x ${PREFIX}/bin/PoolSNP.sh | ||
|
||
for script in $SCRIPTS_DIR/*; do | ||
cp $script ${PREFIX}/bin/$(basename $script) | ||
cp $script ${PREFIX}/bin/scripts/ | ||
chmod +x ${PREFIX}/bin/$(basename $script) | ||
chmod +x ${PREFIX}/bin/scripts/$(basename $script) | ||
done | ||
|
||
cp -r ${TEST_DATA_DIR} ${PREFIX}/share/PoolSNP/TestData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{% set name = "poolsnp" %} | ||
{% set version = "1.0.0" %} | ||
{% set github = "https://github.com/capoony/PoolSNP" %} | ||
|
||
package: | ||
name: "{{ name }}" | ||
version: "{{ version }}" | ||
|
||
source: | ||
url: "{{ github }}/archive/refs/tags/v.{{ version }}.tar.gz" | ||
sha256: a73c61c7ef49be9bd1212ea8049fe617296b0a82b80e0338e2b78dc55105438f | ||
|
||
requirements: | ||
host: | ||
- python | ||
- parallel | ||
run: | ||
- python | ||
- parallel | ||
|
||
build: | ||
number: 0 | ||
noarch: generic | ||
run_exports: | ||
- {{ pin_subpackage('poolsnp', max_pin='x.x') }} | ||
|
||
test: | ||
source_files: | ||
- TestData/* | ||
- scripts/* | ||
|
||
about: | ||
summary: PoolSNP is a heuristic SNP caller, which uses an MPILEUP file and a reference genome in FASTA format as inputs. | ||
license: Apache-2.0 | ||
license_file: LICENSE | ||
home: https://github.com/capoony/PoolSNP | ||
|
||
extra: | ||
recipe-maintainers: | ||
- abhilesh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Ensure the script is executable | ||
test -x ${PREFIX}/bin/PoolSNP.sh | ||
|
||
# Run PoolSNP.sh with a minimal set of parameters to ensure it executes | ||
bash ${PREFIX}/bin/PoolSNP.sh \ | ||
mpileup="${PREFIX}/share/PoolSNP/TestData/test.mpileup" \ | ||
reference="${PREFIX}/share/PoolSNP/TestData/test.fa" \ | ||
names=Sample1,Sample2 \ | ||
max-cov=0.7 \ | ||
min-cov=4 \ | ||
min-count=4 \ | ||
min-freq=0.01 \ | ||
miss-frac=0.5 \ | ||
jobs=4 \ | ||
badsites=1 \ | ||
allsites=1 \ | ||
output=${PREFIX}/share/PoolSNP/TestResult/test | ||
|
||
# Optionally, check the output file to ensure it was created | ||
test -f ${PREFIX}/share/PoolSNP/TestResult/test.vcf.gz |