unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: pimi <madalinionel.patrascu@mdc-berlin.de>
To: 32984@debbugs.gnu.org
Cc: ricardo.wurmus@mdc-berlin.de, pimi <madalinionel.patrascu@mdc-berlin.de>
Subject: [bug#32984] [PATCH] gnu: Add filtlong.
Date: Mon, 8 Oct 2018 11:17:41 +0200	[thread overview]
Message-ID: <20181008091741.31531-1-madalinionel.patrascu@mdc-berlin.de> (raw)

* 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

             reply	other threads:[~2018-10-08  9:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08  9:17 pimi [this message]
2018-10-08 16:32 ` bug#32984: [PATCH] gnu: Add filtlong Ludovic Courtès
2018-10-09 16:22 ` [bug#32984] [PATCH] gnu: filtlong: update path in aux script pimi
2018-10-11 20:55   ` Leo Famulari
2018-11-05 16:26     ` mpatras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181008091741.31531-1-madalinionel.patrascu@mdc-berlin.de \
    --to=madalinionel.patrascu@mdc-berlin.de \
    --cc=32984@debbugs.gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).