commit: 6af16cbc76de1d4d8a1726e81880cfccb28adbb6 Author: Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> AuthorDate: Fri Nov 13 19:03:02 2015 +0000 Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> CommitDate: Fri Nov 13 19:03:02 2015 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=6af16cbc
sci-biology/SEECER: patch crappy shellscripts to at leats die on error; require jellyfish-1.1.11 Package-Manager: portage-2.2.18 sci-biology/SEECER/ChangeLog | 5 +++ sci-biology/SEECER/SEECER-0.1.3-r2.ebuild | 3 +- .../SEECER/files/remove-hardcoded-paths.patch | 47 +++++++++++++++++++--- 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/sci-biology/SEECER/ChangeLog b/sci-biology/SEECER/ChangeLog index 2872b27..b72cc46 100644 --- a/sci-biology/SEECER/ChangeLog +++ b/sci-biology/SEECER/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 # $Id$ + 13 Nov 2015; Martin Mokrejs <mmokr...@fold.natur.cuni.cz> + SEECER-0.1.3-r2.ebuild, files/remove-hardcoded-paths.patch: + sci-biology/SEECER: patch crappy shellscripts to at leats die on error; + require jellyfish-1.1.11 + *SEECER-0.1.3-r2 (13 Nov 2015) 13 Nov 2015; Martin Mokrejs <mmokr...@fold.natur.cuni.cz> diff --git a/sci-biology/SEECER/SEECER-0.1.3-r2.ebuild b/sci-biology/SEECER/SEECER-0.1.3-r2.ebuild index 730c429..3a9138c 100644 --- a/sci-biology/SEECER/SEECER-0.1.3-r2.ebuild +++ b/sci-biology/SEECER/SEECER-0.1.3-r2.ebuild @@ -18,11 +18,12 @@ KEYWORDS="~amd64" IUSE="" # although has bundled jellyfish-1.1.11 copy it just calls the executable during runtime +# seems jellyfish-2 does not accept same commandline arguments DEPEND=" sci-libs/gsl sci-biology/seqan" RDEPEND="${DEPEND} - sci-biology/jellyfish" + =sci-biology/jellyfish-1.1.11" S="${S}"/SEECER diff --git a/sci-biology/SEECER/files/remove-hardcoded-paths.patch b/sci-biology/SEECER/files/remove-hardcoded-paths.patch index 9258e50..4e317e6 100644 --- a/sci-biology/SEECER/files/remove-hardcoded-paths.patch +++ b/sci-biology/SEECER/files/remove-hardcoded-paths.patch @@ -1,5 +1,40 @@ ---- SEECER-0.1.3/SEECER/bin/run_seecer.sh.old 2015-11-13 18:17:53.985784977 +0100 -+++ SEECER-0.1.3/SEECER/bin/run_seecer.sh 2015-11-13 18:20:19.995787411 +0100 +--- SEECER-0.1.3/SEECER/bin/run_jellyfish.sh.ori 2015-11-13 18:40:01.595807104 +0100 ++++ SEECER-0.1.3/SEECER/bin/run_jellyfish.sh 2015-11-13 18:51:45.655818838 +0100 +@@ -3,22 +3,27 @@ + LCOUNT=$4 + TMPDIR=$5 + ++if [ -z "$JF" ]; then ++ echo "No path to jellyfish binary provided, exiting."; ++ exit 255; ++fi ++ + if [ "$#" -eq "4" ]; + then +-$JF count -m $3 -o $TMPDIR/jf_tmp -c 3 -s 10000000 -t 32 --both-strands $6 ++$JF count -m $3 -o $TMPDIR/jf_tmp -c 3 -s 10000000 -t 32 --both-strands $6 || exit 255 + else +-$JF count -m $3 -o $TMPDIR/jf_tmp -c 3 -s 10000000 -t 32 --both-strands $6 $7 ++$JF count -m $3 -o $TMPDIR/jf_tmp -c 3 -s 10000000 -t 32 --both-strands $6 $7 || exit 255 + fi; + + # merge + N_TMP=`ls -1 $TMPDIR/jf_tmp_* | wc -l` + if [ $N_TMP -eq 1 ] + then +- mv $TMPDIR/jf_tmp_0 $TMPDIR/jf_merged_$3 ++ mv $TMPDIR/jf_tmp_0 $TMPDIR/jf_merged_$3 || exit 255 + else +- $JF merge $TMPDIR/jf_tmp_* -o $TMPDIR/jf_merged_$3 ++ $JF merge $TMPDIR/jf_tmp_* -o $TMPDIR/jf_merged_$3 || exit 255 + rm $TMPDIR/jf_tmp_* + fi + +-$JF dump --lower-count=$LCOUNT -o $2 -c $TMPDIR/jf_merged_$3 ++$JF dump --lower-count=$LCOUNT -o $2 -c $TMPDIR/jf_merged_$3 || exit 255 + rm $TMPDIR/jf_merged_$3 +--- SEECER-0.1.3/SEECER/bin/run_seecer.sh.ori 2015-11-13 18:40:16.215807347 +0100 ++++ SEECER-0.1.3/SEECER/bin/run_seecer.sh 2015-11-13 18:53:03.695820138 +0100 @@ -25,8 +25,8 @@ # @@ -16,7 +51,7 @@ echo "++ Step 1: Replacing Ns ... and stripping off read IDs" echo - ${BINDIR}/random_sub_N $RS_ARGS -+ "${BINDIR}"random_sub_N $RS_ARGS ++ "${BINDIR}"random_sub_N $RS_ARGS || exit 255 fi; if [ ! -r $Read1_N ]; @@ -25,7 +60,7 @@ echo "++ Step 2: Running JELLYFISH to count kmers ..." echo - bash ${BINDIR}/run_jellyfish.sh $JF $TMPDIR/counts_${K}_${LCOUNT} $K $LCOUNT $TMPDIR $Read1_N $Read2_N -+ bash "${BINDIR}"run_jellyfish.sh $JF $TMPDIR/counts_${K}_${LCOUNT} $K $LCOUNT $TMPDIR $Read1_N $Read2_N ++ bash "${BINDIR}"run_jellyfish.sh $JF $TMPDIR/counts_${K}_${LCOUNT} $K $LCOUNT $TMPDIR $Read1_N $Read2_N || exit 255 fi; if [ ! -r $TMPDIR/counts_${K}_${LCOUNT} ]; @@ -34,7 +69,7 @@ echo " *** Start time: " `date`; - ${BINDIR}/seecer $Read1_N $Read2_N $SEECER_PARAMS --kmer $K -k $TMPDIR/counts_${K}_${LCOUNT} -o $TMPDIR/corrected.fasta -+ "${BINDIR}"seecer $Read1_N $Read2_N $SEECER_PARAMS --kmer $K -k $TMPDIR/counts_${K}_${LCOUNT} -o $TMPDIR/corrected.fasta ++ "${BINDIR}"seecer $Read1_N $Read2_N $SEECER_PARAMS --kmer $K -k $TMPDIR/counts_${K}_${LCOUNT} -o $TMPDIR/corrected.fasta || exit 255 echo " *** End time: " `date`; echo "-----------------------------------------------------------------------" echo @@ -43,7 +78,7 @@ then echo "++ Step 4: Cleaning and putting back original read IDs ... We finish soon!" - ${BINDIR}/replace_ids $TMPDIR/corrected.fasta $Reads $Reads_N $Reads_O -+ "${BINDIR}"replace_ids $TMPDIR/corrected.fasta $Reads $Reads_N $Reads_O ++ "${BINDIR}"replace_ids $TMPDIR/corrected.fasta $Reads $Reads_N $Reads_O || exit 255 # rm $TMPDIR/corrected.fasta fi;