From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9Rgu-00016N-VB for guix-patches@gnu.org; Mon, 08 Oct 2018 05:19:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9Rgs-0008Hf-7s for guix-patches@gnu.org; Mon, 08 Oct 2018 05:19:04 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35640) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g9Rgs-0008Hb-4P for guix-patches@gnu.org; Mon, 08 Oct 2018 05:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g9Rgr-00053p-RV for guix-patches@gnu.org; Mon, 08 Oct 2018 05:19:01 -0400 Subject: [bug#32984] [PATCH] gnu: Add filtlong. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9Rg3-000138-8c for guix-patches@gnu.org; Mon, 08 Oct 2018 05:18:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9Rg0-0007v4-44 for guix-patches@gnu.org; Mon, 08 Oct 2018 05:18:11 -0400 Received: from sinope02.bbbm.mdc-berlin.de ([141.80.25.24]:34800) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9Rfz-0007sH-LW for guix-patches@gnu.org; Mon, 08 Oct 2018 05:18:08 -0400 Received: from localhost (localhost [127.0.0.1]) by sinope02.bbbm.mdc-berlin.de (Postfix) with ESMTP id 56B491393D63 for ; Mon, 8 Oct 2018 11:18:04 +0200 (CEST) Received: from sinope02.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope02.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 89JVayJ_UHq7 for ; Mon, 8 Oct 2018 11:17:59 +0200 (CEST) Received: from SW-IT-P-CAS4.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by sinope02.bbbm.mdc-berlin.de (Postfix) with ESMTPS for ; Mon, 8 Oct 2018 11:17:58 +0200 (CEST) From: pimi Date: Mon, 8 Oct 2018 11:17:41 +0200 Message-ID: <20181008091741.31531-1-madalinionel.patrascu@mdc-berlin.de> MIME-Version: 1.0 Content-Type: text/plain 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: 32984@debbugs.gnu.org Cc: ricardo.wurmus@mdc-berlin.de, pimi * gnu/packages/bioinformatics.scm (filtlong): New variable. --- gnu/packages/bioinformatics.scm | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index ab9dc185a..43cdf811e 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -14057,3 +14057,66 @@ absolute GSEA.") (description "Ngless is a domain-specific language for @dfn{next-generation sequencing} (NGS) data processing.") (license license:expat))) + +(define-public filtlong + ;; The recommended way to install is to clone the git repository + ;; https://github.com/rrwick/Filtlong#installation + ;; and the lastest release is more than nine months old + (let ((commit "d1bb46dfe8bc7efe6257b5ce222c04bfe8aedaab") + (revision "1")) + (package + (name "filtlong") + (version (git-version "0.2.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rrwick/Filtlong.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1xr92r820x8qlkcr3b57iw223yq8vjgyi42jr79w2xgw47qzr575")))) + ;;(properties `((upstream-name . "Filtlong"))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (scripts (string-append out "/scripts"))) + (mkdir-p bin) + (mkdir-p scripts) + (install-file "bin/filtlong" bin) + (install-file "scripts/histogram.py" scripts) + (install-file "scripts/read_info_histograms.sh" scripts)) + #t)) + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (path (getenv "PYTHONPATH"))) + ;;(wrap-program (string-apend scripts "scripts/read_info_histograms.sh") + (wrap-program (string-append out "/scripts/histogram.py") + `("PYTHONPATH" ":" prefix (,path)))) + #t)) + (add-before 'check 'patch-tests + (lambda _ + (substitute* "scripts/read_info_histograms.sh" + (("awk") (which "gawk"))) + #t))))) + (inputs + `(("gawk" ,gawk) ;for read_info_histograms.sh + ("python" ,python-2) ; required for histogram.py + ("zlib" ,zlib))) + (home-page "https://github.com/rrwick/Filtlong/") + (synopsis "Tool for quality filtering of Nanopore and PacBio data") + (description + "The @code{filtlong} package is a tool for filtering long reads by quality. +It can take a set of long reads and produce a smaller, better subset. It uses +both read length (longer is better) and read identity (higher is better) when +choosing which reads pass the filter.") + (license (list license:gpl3 ;filtlong + license:asl2.0))))) ;histogram.py -- 2.17.1