Skip to content

Commit

Permalink
Stacks 2.3 (#13095)
Browse files Browse the repository at this point in the history
* Stacks update 2.3

* Stacks folder cleanup

* stacks remove 1.47
  • Loading branch information
lecorguille authored and bgruening committed Jan 30, 2019
1 parent f5983db commit f623331
Show file tree
Hide file tree
Showing 7 changed files with 164 additions and 265 deletions.
71 changes: 71 additions & 0 deletions recipes/stacks/2.3/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.2-old/scripts/denovo_map.pl stacks-2.2-new/scripts/denovo_map.pl
--- stacks-2.2/scripts/denovo_map.pl 2018-04-19 18:17:23.000000000 +0200
+++ stacks-2.2/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.2-old/scripts/ref_map.pl stacks-2.2-new/scripts/ref_map.pl
--- stacks-2.2/scripts/ref_map.pl 2018-03-21 15:51:20.000000000 +0100
+++ stacks-2.2/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.3/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

6 changes: 6 additions & 0 deletions recipes/stacks/2.3/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
c_compiler:
- gcc # [linux]
- clang # [osx]
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
65 changes: 65 additions & 0 deletions recipes/stacks/2.3/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{% set version="2.3" %}
{% set hash="2a5befaf11ca2f191afcd42a3a3392290d6a116d7fe737b69a2c4d5b77f40c99" %}

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

build:
number: 3

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
14 changes: 0 additions & 14 deletions recipes/stacks/build.sh

This file was deleted.

209 changes: 0 additions & 209 deletions recipes/stacks/gcc48.patch

This file was deleted.

Loading

0 comments on commit f623331

Please sign in to comment.