From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGAzJ-0005sX-Q9 for guix-patches@gnu.org; Wed, 31 May 2017 17:17:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGAzG-0003kW-Ny for guix-patches@gnu.org; Wed, 31 May 2017 17:17:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45326) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dGAzG-0003kR-KA for guix-patches@gnu.org; Wed, 31 May 2017 17:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dGAzG-0000mq-Fc for guix-patches@gnu.org; Wed, 31 May 2017 17:17:02 -0400 Subject: bug#27175: [PATCH 2/6] gnu: Add trim-galore. Resent-Message-ID: From: Ricardo Wurmus Date: Wed, 31 May 2017 23:16:07 +0200 Message-Id: <20170531211611.14094-2-rekado@elephly.net> In-Reply-To: <20170531211611.14094-1-rekado@elephly.net> References: <20170531211611.14094-1-rekado@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27175@debbugs.gnu.org Cc: Ricardo Wurmus * gnu/packages/bioinformatics.scm (trim-galore): New variable. --- gnu/packages/bioinformatics.scm | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index f2d92a888..d341030b9 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -9230,3 +9230,63 @@ signal processing that can accurately call binding events without the need to do a pair total DNA input or IgG control sample. It has been tested for use with narrow binding events such as transcription factor ChIP-seq.") (license license:gpl3+))) + +(define-public trim-galore + (package + (name "trim-galore") + (version "0.4.2") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.bioinformatics.babraham.ac.uk/" + "projects/trim_galore/trim_galore_v" + version ".zip")) + (sha256 + (base32 + "0b9qdxi4521gsrjvbhgky8g7kry9b5nx3byzaxkgxz7p4k8bn1mn")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + ;; The archive contains plain files. + (replace 'unpack + (lambda* (#:key source #:allow-other-keys) + (zero? (system* "unzip" source)))) + (delete 'configure) + (delete 'build) + (add-after 'unpack 'hardcode-tool-references + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "trim_galore" + (("\\$path_to_cutadapt = 'cutadapt'") + (string-append "$path_to_cutadapt = '" + (assoc-ref inputs "cutadapt") + "/bin/cutadapt'")) + (("\\| gzip") + (string-append "| " + (assoc-ref inputs "gzip") + "/bin/gzip")) + (("\"gunzip") + (string-append "\"" + (assoc-ref inputs "gzip") + "/bin/gunzip"))) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") + "/bin"))) + (mkdir-p bin) + (install-file "trim_galore" bin) + #t)))))) + (inputs + `(("gzip" ,gzip) + ("perl" ,perl) + ("cutadapt" ,cutadapt))) + (native-inputs + `(("unzip" ,unzip))) + (home-page "http://www.bioinformatics.babraham.ac.uk/projects/trim_galore/") + (synopsis "Wrapper around Cutadapt and FastQC") + (description "Trim Galore! is a wrapper script to automate quality and +adapter trimming as well as quality control, with some added functionality to +remove biased methylation positions for RRBS sequence files.") + (license license:gpl3+))) -- 2.12.2