[med-svn] [adapterremoval] 03/04: Add adapter-benchmark package

Andreas Tille tille at debian.org
Wed Aug 3 12:26:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository adapterremoval.

commit 1cc1462af82fa74a1487dac0434852233f37e48c
Author: Andreas Tille <tille at debian.org>
Date:   Wed Aug 3 14:25:27 2016 +0200

    Add adapter-benchmark package
---
 debian/adapter-benchmark.install        |   1 +
 debian/changelog                        |   6 +
 debian/control                          |  21 +++
 debian/patches/adapt-benchmarking.patch | 269 ++++++++++++++++++++++++++++++++
 debian/patches/series                   |   1 +
 debian/rules                            |   4 +
 6 files changed, 302 insertions(+)

diff --git a/debian/adapter-benchmark.install b/debian/adapter-benchmark.install
new file mode 100644
index 0000000..c93da73
--- /dev/null
+++ b/debian/adapter-benchmark.install
@@ -0,0 +1 @@
+benchmark	usr/share/adapterremoval
diff --git a/debian/changelog b/debian/changelog
index 140a58f..28b244d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+adapterremoval (2.1.7-2) UNRELEASED; urgency=medium
+
+  * Create a benchmark-test package
+
+ -- Andreas Tille <tille at debian.org>  Tue, 02 Aug 2016 08:52:52 +0200
+
 adapterremoval (2.1.7-1) unstable; urgency=medium
 
   * Initial release (Closes: #832754)
diff --git a/debian/control b/debian/control
index 089e231..96c6c74 100644
--- a/debian/control
+++ b/debian/control
@@ -41,3 +41,24 @@ Description: rapid adapter trimming, identification, and read merging (example d
  not available.
  .
  This package provides the example data.
+
+Package: adapter-benchmark
+Architecture: all
+Depends: ${misc:Depends},
+         python,
+         adapterremoval,
+         cutadapt,
+         ea-utils,
+         flexbar,
+         scythe,
+         trimmomatic
+Description: benchmarking trimming adapters gene sequences
+ The program adapterremoval contains a benchmarking suite for differen
+ programs fullfilling a similar purpose to searche for and remove
+ remnant adapter sequences from High-Throughput Sequencing (HTS) data
+ and trims low quality bases from the 3' end of reads following adapter
+ removal.
+ .
+ This package provides the test suite adapted to the use with all
+ Debian packaged programs which are: adapterremoval, cutadapt, flexbar,
+ scythe and trimmomatic.
diff --git a/debian/patches/adapt-benchmarking.patch b/debian/patches/adapt-benchmarking.patch
new file mode 100644
index 0000000..ab7cb41
--- /dev/null
+++ b/debian/patches/adapt-benchmarking.patch
@@ -0,0 +1,269 @@
+--- a/benchmark/benchmark.sh
++++ b/benchmark/benchmark.sh
+@@ -46,11 +46,13 @@ MAX_THREADS=4
+ # Number of read (pairs) to simulate using pIRS for each replicate
+ SIMULATED_NREADS=1000000
+ 
+-REFSEQ="results/reference.fasta"
+-
+-SIMULATED_PREFIX="results/simulated/reads"
+-SIMULATED_MIXED_PREFIX="results/simulated/mixed"
+-SIMULATED_ADAPTER_ID_PREFIX="results/simulated/adapter_id"
++results=$(mktemp -d /tmp/adapter-benchmark.XXXXXX)
++echo "*** Results will be found in $results ***"
++REFSEQ="$results/reference.fasta"
++
++SIMULATED_PREFIX="$results/simulated/reads"
++SIMULATED_MIXED_PREFIX="$results/simulated/mixed"
++SIMULATED_ADAPTER_ID_PREFIX="$results/simulated/adapter_id"
+ 
+ 
+ ###############################################################################
+@@ -84,63 +86,79 @@ function check_for_jar()
+     fi
+ }
+ 
++echo "*** ignore old version of AdapterRemoval-1.5.4 ***"
++#EXEC_ADAPTERREMOVAL1x="bin/AdapterRemoval-1.5.4"
++#check_for_executable "AdapterRemoval v1.x" "${EXEC_ADAPTERREMOVAL1x}"
++## https://github.com/slindgreen/AdapterRemoval/raw/master/AdapterRemoval-1.5.4.tar.gz
+ 
+-EXEC_ADAPTERREMOVAL1x="bin/AdapterRemoval-1.5.4"
+-check_for_executable "AdapterRemoval v1.x" "${EXEC_ADAPTERREMOVAL1x}"
+-# https://github.com/slindgreen/AdapterRemoval/raw/master/AdapterRemoval-1.5.4.tar.gz
+-
+-EXEC_ADAPTERREMOVAL2x="bin/AdapterRemoval-2.1.3"
++EXEC_ADAPTERREMOVAL2x="/usr/bin/AdapterRemoval"
+ check_for_executable "AdapterRemoval v2.x" "${EXEC_ADAPTERREMOVAL2x}"
+ # https://github.com/MikkelSchubert/adapterremoval
+ 
+-EXEC_LEEHOM="bin/leeHom_patched"
+-check_for_executable "leeHom" "${EXEC_LEEHOM}"
++echo "*** not packaged: https://github.com/grenaud/leeHom ***"
++#EXEC_LEEHOM="bin/leeHom_patched"
++#check_for_executable "leeHom" "${EXEC_LEEHOM}"
+ # https://github.com/grenaud/leeHom
+ # -- Apply patches/leeHom.patch
+ 
+-EXEC_SKEWER="bin/skewer"
+-check_for_executable "Skewer" "${EXEC_SKEWER}"
++echo "*** not packaged: https://github.com/relipmoc/skewer ***"
++#EXEC_SKEWER="bin/skewer"
++#check_for_executable "Skewer" "${EXEC_SKEWER}"
+ # https://github.com/relipmoc/skewer
+ 
+-EXEC_ALIENTRIMMER="bin/AlienTrimmer"
+-check_for_executable "AlienTrimmer" "${EXEC_ALIENTRIMMER}"
++echo "*** not packaged: ftp://ftp.pasteur.fr/pub/GenSoft/projects/AlienTrimmer/ ***"
++#EXEC_ALIENTRIMMER="bin/AlienTrimmer"
++#check_for_executable "AlienTrimmer" "${EXEC_ALIENTRIMMER}"
+ # ftp://ftp.pasteur.fr/pub/GenSoft/projects/AlienTrimmer/
+ 
+-EXEC_SCYTHE="bin/scythe"
++EXEC_SCYTHE="/usr/bin/scythe"
+ check_for_executable "Scythe" "${EXEC_SCYTHE}"
+ # https://github.com/vsbuffalo/scythe
+ 
+-EXEC_CUTADAPT="bin/cutadapt"
++EXEC_CUTADAPT="/usr/bin/cutadapt"
+ check_for_executable "Cutadapt" "${EXEC_CUTADAPT}"
+ # https://code.google.com/p/cutadapt/
+ 
+-EXEC_FLEXBAR="bin/flexbar"
++EXEC_FLEXBAR="/usr/bin/flexbar"
+ check_for_executable "Flexbar" "${EXEC_FLEXBAR}"
+ # http://sourceforge.net/projects/flexbar/
+ 
+-EXEC_PIRS="bin/pirs_patched"
++EXEC_PIRS="/usr/bin/pirs"
++if [ ! -x $EXEC_PIRS ] ; then
++cat <<EOT
++You need to install pIRS as /usr/bin/pirs or patch this script $0.
++The easiest way to do so would be to create the Debian package from
++   https://anonscm.debian.org/git/debian-med/pirs.git
++Since it has non-distributable files there can not be an official
++package currently.
++EOT
++  exit 1
++fi
+ check_for_executable "pIRS (with adapters)" "${EXEC_PIRS}"
+ # ftp://ftp.genomics.org.cn/pub/pIRS/
+ # -- Apply patches/pirs.patch
+ 
+-JAR_TRIMMOMATIC="bin/trimmomatic-0.33.jar"
++JAR_TRIMMOMATIC="/usr/share/java/trimmomatic.jar"
+ check_for_jar "Trimmomatic" ${JAR_TRIMMOMATIC}
+ # http://www.usadellab.org/cms/?page=trimmomatic
+ 
+-EXEC_PEAT="./bin/PEAT"
+-check_for_executable "PEAT" ${EXEC_PEAT}
++echo "*** not packaged: https://github.com/jhhung/PEAT ***"
++#EXEC_PEAT="./bin/PEAT"
++#check_for_executable "PEAT" ${EXEC_PEAT}
+ # https://github.com/jhhung/PEAT
+ 
+-EXEC_PEAR="bin/pear_patched"
+-check_for_executable "PEAR" ${EXEC_PEAR}
++echo "*** not packaged: http://sco.h-its.org/exelixis/web/software/pear/ ***"
++#EXEC_PEAR="bin/pear_patched"
++#check_for_executable "PEAR" ${EXEC_PEAR}
+ # http://sco.h-its.org/exelixis/web/software/pear/
+ # -- Apply patches/pear.patch
+ 
+-EXEC_MINION="bin/minion"
+-check_for_executable "minion (kraken)" ${EXEC_MINION}
++echo "*** not packaged: http://www.ebi.ac.uk/research/enright/software/kraken ***"
++#EXEC_MINION="bin/minion"
++#check_for_executable "minion (kraken)" ${EXEC_MINION}
+ # http://www.ebi.ac.uk/research/enright/software/kraken
+ 
+-EXEC_FASTQ_MCF="bin/fastq-mcf"
++EXEC_FASTQ_MCF="/usr/bin/fastq-mcf"
+ check_for_executable "fastq-mcf" ${EXEC_FASTQ_MCF}
+ # https://code.google.com/p/ea-utils/
+ 
+@@ -149,7 +167,7 @@ EXEC_TIME=/usr/bin/time
+ check_for_executable "GNU time" ${EXEC_TIME}
+ # Needed for time / RAM usage
+ 
+-EXEC_JAVA="bin/java"
++EXEC_JAVA="/usr/bin/java"
+ check_for_executable "Java JRE" ${EXEC_JAVA}
+ # Needed for Trimmomatic
+ 
+@@ -240,14 +258,16 @@ function fetch_reference()
+     echo "------------------------------------------------------------" > /dev/stderr
+     echo "Fetching reference sequence ..."  > /dev/stderr
+ 
+-    if [ -e "results/reference.fasta" ];
++    if [ -e "$results/reference.fasta" ];
+     then
+         echo "Reference sequence found; skipping ..."  > /dev/stderr
+         echo ""  > /dev/stderr
+     else
+         echo ""  > /dev/stderr
+-        wget -O results/reference.fasta.gz http://hgdownload.soe.ucsc.edu/goldenPath/hg38/chromosomes/chr1.fa.gz
+-        gunzip results/reference.fasta.gz
++#        wget -O $results/reference.fasta.gz http://hgdownload.soe.ucsc.edu/goldenPath/hg38/chromosomes/chr1.fa.gz
++#        gunzip $results/reference.fasta.gz
++echo "FIXME!!!!!"
++cp -a /tmp/adapter-benchmark/reference.fasta $results
+     fi
+ 
+ 
+@@ -813,7 +833,7 @@ function benchmark_se()
+                 SIMULATED_MATE1="${SIMULATED_PREFIX}_${run_n}_${readlen}_1.fq"
+                 SIMULATED_MATE2="${SIMULATED_PREFIX}_${run_n}_${readlen}_2.fq"
+                 SIMULATED_INFO="${SIMULATED_PREFIX}_${run_n}_${readlen}.read.info"
+-                RESULTS="results/se/${readlen}_${run_n}"
++                RESULTS="$results/se/${readlen}_${run_n}"
+ 
+                 # -mm 3 corresponds to AR 2.x defaults
+                 echo run_adapterremoval SE ${EXEC_ADAPTERREMOVAL1x} 1 \
+@@ -901,7 +921,7 @@ function benchmark_se()
+         done
+     done
+ 
+-    ${SCRIPT_MERGE} results/se > results/se.table
++    ${SCRIPT_MERGE} $results/se > $results/se.table
+ }
+ 
+ 
+@@ -921,7 +941,7 @@ function benchmark_pe()
+                 SIMULATED_MATE1="${SIMULATED_PREFIX}_${run_n}_${readlen}_1.fq"
+                 SIMULATED_MATE2="${SIMULATED_PREFIX}_${run_n}_${readlen}_2.fq"
+                 SIMULATED_INFO="${SIMULATED_PREFIX}_${run_n}_${readlen}.read.info"
+-                RESULTS="results/pe/${readlen}_${run_n}"
++                RESULTS="$results/pe/${readlen}_${run_n}"
+ 
+                 DEFAULT_ARGS=("${SIMULATED_INFO}" "${SIMULATED_MATE1}" "${SIMULATED_MATE2}")
+ 
+@@ -997,7 +1017,7 @@ function benchmark_pe()
+         done
+     done
+ 
+-    ${SCRIPT_MERGE} results/pe > results/pe.table
++    ${SCRIPT_MERGE} $results/pe > $results/pe.table
+ }
+ 
+ 
+@@ -1017,7 +1037,7 @@ function benchmark_collapse()
+                 SIMULATED_MATE1="${SIMULATED_PREFIX}_${run_n}_${readlen}_1.fq"
+                 SIMULATED_MATE2="${SIMULATED_PREFIX}_${run_n}_${readlen}_2.fq"
+                 SIMULATED_INFO="${SIMULATED_PREFIX}_${run_n}_${readlen}.read.info"
+-                RESULTS="results/collapse/${readlen}_${run_n}"
++                RESULTS="$results/collapse/${readlen}_${run_n}"
+ 
+                 DEFAULT_ARGS=("${SIMULATED_INFO}" "${SIMULATED_MATE1}" "${SIMULATED_MATE2}")
+ 
+@@ -1063,7 +1083,7 @@ function benchmark_collapse()
+         done
+     done
+ 
+-    ${SCRIPT_MERGE} results/collapse > results/collapse.table
++    ${SCRIPT_MERGE} $results/collapse > $results/collapse.table
+ }
+ 
+ 
+@@ -1084,7 +1104,7 @@ function benchmark_mixed_se
+ 	            SIMULATED_MATE1="${SIMULATED_MIXED_PREFIX}_${run_n}_${readlen}_1.fq"
+ 	            SIMULATED_MATE2="${SIMULATED_MIXED_PREFIX}_${run_n}_${readlen}_2.fq"
+ 	            SIMULATED_INFO="${SIMULATED_MIXED_PREFIX}_${run_n}_${readlen}.read.info"
+-	            RESULTS="results/mixed_se/${readlen}_${run_n}"
++	            RESULTS="$results/mixed_se/${readlen}_${run_n}"
+ 
+ 	            DEFAULT_ARGS=("${SIMULATED_INFO}" "${SIMULATED_MATE1}" "${SIMULATED_MATE2}")
+ 	            AR_PREFIX="${RESULTS}/adapterremoval2x"
+@@ -1139,7 +1159,7 @@ function benchmark_mixed_se
+ 	    done
+ 	done
+ 
+-    ${SCRIPT_MERGE} results/mixed_se > results/mixed_se.table
++    ${SCRIPT_MERGE} $results/mixed_se > $results/mixed_se.table
+ }
+ 
+ 
+@@ -1159,7 +1179,7 @@ function benchmark_mixed_pe
+ 	            SIMULATED_MATE1="${SIMULATED_MIXED_PREFIX}_${run_n}_${readlen}_1.fq"
+ 	            SIMULATED_MATE2="${SIMULATED_MIXED_PREFIX}_${run_n}_${readlen}_2.fq"
+ 	            SIMULATED_INFO="${SIMULATED_MIXED_PREFIX}_${run_n}_${readlen}.read.info"
+-	            RESULTS="results/mixed_pe/${readlen}_${run_n}"
++	            RESULTS="$results/mixed_pe/${readlen}_${run_n}"
+ 
+ 	            DEFAULT_ARGS=("${SIMULATED_INFO}" "${SIMULATED_MATE1}" "${SIMULATED_MATE2}")
+ 
+@@ -1204,7 +1224,7 @@ function benchmark_mixed_pe
+ 	    done
+ 	done
+ 
+-    ${SCRIPT_MERGE} results/mixed_pe > results/mixed_pe.table
++    ${SCRIPT_MERGE} $results/mixed_pe > $results/mixed_pe.table
+ }
+ 
+ 
+@@ -1224,7 +1244,7 @@ function benchmark_adapter_id
+             SIMULATED_MATE1="${SIMULATED_ADAPTER_ID_PREFIX}_${run_n}_${readlen}_${INSERT_MEAN}_1.fq"
+             SIMULATED_MATE2="${SIMULATED_ADAPTER_ID_PREFIX}_${run_n}_${readlen}_${INSERT_MEAN}_2.fq"
+             SIMULATED_INFO="${SIMULATED_ADAPTER_ID_PREFIX}_${run_n}_${readlen}_${INSERT_MEAN}.read.info"
+-            RESULTS="results/adapter_id/${readlen}_${INSERT_MEAN}_${run_n}"
++            RESULTS="$results/adapter_id/${readlen}_${INSERT_MEAN}_${run_n}"
+ 
+             run_minion "${RESULTS}/minion" \
+                 "${SIMULATED_MATE1}" \
+@@ -1236,13 +1256,14 @@ function benchmark_adapter_id
+         done
+     done
+ 
+-    ${SCRIPT_EVALUATE_ID} results/adapter_id > results/adapter_id.table
++    ${SCRIPT_EVALUATE_ID} $results/adapter_id > $results/adapter_id.table
+ }
+ 
+ 
+ 
+ cd "$(dirname "$0")"
+-mkdir -p results
++pwd
++#mkdir -p results
+ 
+ fetch_reference
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 814900f..bc193d6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 hardening.patch
+adapt-benchmarking.patch
diff --git a/debian/rules b/debian/rules
index 285a16b..f8ad09f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,3 +23,7 @@ override_dh_auto_install:
 
 override_dh_installchangelogs:
 	dh_installchangelogs CHANGES.md
+
+override_dh_fixperms:
+	dh_fixperms
+	find debian -name benchmark.sh -exec chmod +x \{\} \;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/adapterremoval.git



More information about the debian-med-commit mailing list