Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stacks: adds version 2.3b #13538

Merged
merged 2 commits into from
Feb 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
71 changes: 71 additions & 0 deletions recipes/stacks/2.3b/at.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# the stacks perl scripts don't work if there is an '@' in the exe_path
# (where stacks searches for the binaries) this patch sets and ensures that the
# exe_path is the empty string, i.e. PATH is used (ie conda takes care).
diff -ruN stacks-2.3b/scripts/denovo_map.pl stacks-2.3b/scripts/denovo_map.pl
--- stacks-2.3b/scripts/denovo_map.pl 2018-04-19 18:17:23.000000000 +0200
+++ stacks-2.3b/scripts/denovo_map.pl 2019-01-03 08:28:27.174444559 +0100
@@ -28,7 +28,7 @@
use constant false => 0;

my $dry_run = false;
-my $exe_path = "_BINDIR_";
+my $exe_path = "";
my $out_path = "";
my $popmap_path = "";
my $sample_path = "";
@@ -50,13 +50,6 @@

parse_command_line();

-#
-# Check for the existence of the necessary pipeline programs
-#
-foreach my $prog ("ustacks", "cstacks", "sstacks", "tsv2bam", "gstacks", "populations") {
- die "Unable to find '" . $exe_path . $prog . "'.\n" if (!-e $exe_path . $prog);
-}
-
my ($log, $log_fh, $sample);

my (@sample_list, %pop_ids, %pops, %grp_ids, %grps, %sample_ids);
@@ -558,7 +551,6 @@
}
}

- $exe_path = $exe_path . "/" if (substr($exe_path, -1) ne "/");
$out_path = substr($out_path, 0, -1) if (substr($out_path, -1) eq "/");

if (scalar(@parents) > 0 && scalar(@samples) > 0) {
diff -ruN stacks-2.3b/scripts/ref_map.pl stacks-2.2b/scripts/ref_map.pl
--- stacks-2.3b/scripts/ref_map.pl 2018-03-21 15:51:20.000000000 +0100
+++ stacks-2.3b/scripts/ref_map.pl 2019-01-03 08:29:17.974257301 +0100
@@ -28,7 +28,7 @@
use constant false => 0;

my $dry_run = false;
-my $exe_path = "_BINDIR_";
+my $exe_path = "";
my $out_path = "";
my $popmap_path = "";
my $sample_path = "";
@@ -47,13 +47,6 @@

parse_command_line();

-#
-# Check for the existence of the necessary pipeline programs
-#
-foreach my $prog ("gstacks", "populations") {
- die "Unable to find '" . $exe_path . $prog . "'.\n" if (!-e $exe_path . $prog);
-}
-
my ($log, $log_fh, $sample);

my (@sample_list, %pop_ids, %pops, %grp_ids, %grps, %sample_ids);
@@ -385,7 +378,6 @@
}
}

- $exe_path = $exe_path . "/" if (substr($exe_path, -1) ne "/");
$out_path = substr($out_path, 0, -1) if (substr($out_path, -1) eq "/");

if (length($popmap_path) == 0) {
22 changes: 22 additions & 0 deletions recipes/stacks/2.3b/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

if [[ "$(uname)" == Darwin ]]; then
# Fix for install_name_tool error:
# error: install_name_tool: changing install names or rpaths can't be
# redone for: $PREFIX/bin/abyss-overlap (for architecture x86_64) because
# larger updated load commands do not fit (the program must be relinked,
# and you may need to use -headerpad or -headerpad_max_install_names)
export LDFLAGS="$LDFLAGS -headerpad_max_install_names"
fi

export CXXFLAGS="${CXXFLAGS} -std=c++11"

./configure --prefix="$PREFIX" --enable-bam
make
make install
# copy missing scripts
cp -p scripts/{convert_stacks.pl,extract_interpop_chars.pl} "$PREFIX/bin/"

# fix a bug in ref_map v2.2 is fixed
sed -i -e "s/_alpha/-alpha/" "$PREFIX"/bin/ref_map.pl

65 changes: 65 additions & 0 deletions recipes/stacks/2.3b/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{% set version="2.3b" %}
{% set hash="a46786d8811a730ebcdc17891e89f50d4f4ae196734439dac86091f45c92ac72" %}

package:
name: stacks
version: {{ version }}

build:
number: 0

source:
sha256: {{ hash }}
url: http://catchenlab.life.illinois.edu/stacks/source/stacks-{{ version }}.tar.gz
patches:
- at.patch

requirements:
build:
- {{ compiler('cxx') }}
host:
- zlib
- openmp # [linux]
run:
- perl
- perl-bioperl-core
- perl-file-spec
- perl-file-temp
- perl-posix
- python >=3
- velvet
- samtools
- zlib
- openmp # [linux]

test:
commands:
- command -v cstacks
- command -v gstacks
- command -v sstacks
- command -v ustacks
- command -v phasedstacks
- command -v populations
- command -v process_radtags
- command -v process_shortreads
- command -v clone_filter
- command -v kmer_filter
- command -v stacks-dist-extract
- command -v stacks-integrate-alignments
- command -v tsv2bam
- command -v convert_stacks.pl
- command -v count_fixed_catalog_snps.py
- command -v denovo_map.pl
- command -v extract_interpop_chars.pl
- command -v integrate_alignments.py
- command -v ref_map.pl

about:
home: http://catchenlab.life.illinois.edu/stacks/
license: GPL
summary: Stacks is a software pipeline for building loci from RAD-seq

extra:
identifiers:
- biotools:Stacks
- doi:10.1111/mec.12354