* [PATCH] Add cutadapt.
@ 2015-03-20 15:18 Ricardo Wurmus
2015-03-24 21:00 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2015-03-20 15:18 UTC (permalink / raw)
To: guix-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-cutadapt.patch --]
[-- Type: text/x-patch, Size: 2785 bytes --]
From 18a14112b6e22248638d2b34e1c1b935e1bcd343 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Fri, 20 Mar 2015 16:17:55 +0100
Subject: [PATCH] gnu: Add cutadapt.
* gnu/packages/bioinformatics.scm (cutadapt): New variable.
---
gnu/packages/bioinformatics.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 46ce4f4..5805e42 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -19,6 +19,7 @@
(define-module (gnu packages bioinformatics)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
@@ -405,6 +406,45 @@ files between different genome assemblies. It supports most commonly used
file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.")
(license license:gpl2+)))
+(define-public cutadapt
+ (package
+ (name "cutadapt")
+ (version "1.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/marcelm/cutadapt/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "161bp87y6gd6r5bmvjpn2b1k942i3fizfpa139f0jn6jv1wcp5h5"))))
+ (build-system python-build-system)
+ (arguments
+ ;; tests must be run after install
+ `(#:phases (alist-cons-after
+ 'install 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (setenv "PYTHONPATH"
+ (string-append
+ (getenv "PYTHONPATH")
+ ":" (assoc-ref outputs "out")
+ "/lib/python"
+ ,(version-major+minor (package-version python))
+ "/site-packages"))
+ (zero? (system* "nosetests" "-P" "tests")))
+ (alist-delete 'check %standard-phases))))
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-nose" ,python-nose)
+ ("python-setuptools" ,python-setuptools)))
+ (home-page "https://code.google.com/p/cutadapt/")
+ (synopsis "Remove adapter sequences from nucleotide sequencing reads")
+ (description
+ "Cutadapt finds and removes adapter sequences, primers, poly-A tails and
+other types of unwanted sequence from high-throughput sequencing reads.")
+ (license license:expat)))
+
(define-public flexbar
(package
(name "flexbar")
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Add cutadapt.
2015-03-20 15:18 [PATCH] Add cutadapt Ricardo Wurmus
@ 2015-03-24 21:00 ` Ludovic Courtès
2015-03-31 15:41 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2015-03-24 21:00 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> From 18a14112b6e22248638d2b34e1c1b935e1bcd343 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Fri, 20 Mar 2015 16:17:55 +0100
> Subject: [PATCH] gnu: Add cutadapt.
>
> * gnu/packages/bioinformatics.scm (cutadapt): New variable.
[...]
> + (setenv "PYTHONPATH"
> + (string-append
> + (getenv "PYTHONPATH")
> + ":" (assoc-ref outputs "out")
> + "/lib/python"
> + ,(version-major+minor (package-version python))
> + "/site-packages"))
It’s best to check the Python version on the build side, using something
like ‘get-python-version’ from python-build-system.scm (so that if
someone inherits this package and changes the Python that is used it
still works.)
Other than that LGTM!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add cutadapt.
2015-03-24 21:00 ` Ludovic Courtès
@ 2015-03-31 15:41 ` Ricardo Wurmus
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2015-03-31 15:41 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès writes:
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> From 18a14112b6e22248638d2b34e1c1b935e1bcd343 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>> Date: Fri, 20 Mar 2015 16:17:55 +0100
>> Subject: [PATCH] gnu: Add cutadapt.
>>
>> * gnu/packages/bioinformatics.scm (cutadapt): New variable.
>
> [...]
>
>> + (setenv "PYTHONPATH"
>> + (string-append
>> + (getenv "PYTHONPATH")
>> + ":" (assoc-ref outputs "out")
>> + "/lib/python"
>> + ,(version-major+minor (package-version python))
>> + "/site-packages"))
>
> It’s best to check the Python version on the build side, using something
> like ‘get-python-version’ from python-build-system.scm (so that if
> someone inherits this package and changes the Python that is used it
> still works.)
I made this change and pushed the patch just now.
Thanks for the review!
~~ Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-31 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20 15:18 [PATCH] Add cutadapt Ricardo Wurmus
2015-03-24 21:00 ` Ludovic Courtès
2015-03-31 15:41 ` Ricardo Wurmus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.