unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add SortMeRNA.
@ 2016-01-22 12:12 Ben Woodcroft
  2016-01-22 20:35 ` Leo Famulari
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Woodcroft @ 2016-01-22 12:12 UTC (permalink / raw)
  To: guix-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 28 bytes --]

Thanks in advance as usual.

[-- Attachment #2: 0001-gnu-Add-sortmerna.patch --]
[-- Type: text/x-patch, Size: 2467 bytes --]

From 448c2435e50d9d860f1153934058effa42fc6495 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sat, 16 Jan 2016 13:33:08 +1000
Subject: [PATCH] gnu: Add sortmerna.

* gnu/packages/bioinformatics.scm (sortmerna): New variable.
---
 gnu/packages/bioinformatics.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e579afe..e170ff7 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3016,6 +3016,45 @@ optimized for modern read lengths of 100 bases or higher, and takes advantage
 of these reads to align data quickly through a hash-based indexing scheme.")
     (license license:asl2.0)))
 
+(define-public sortmerna
+  (package
+    (name "sortmerna")
+    (version "2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/biocore/sortmerna/archive/"
+             version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1670a92x1vvkacnvgr2i5xac3ls6lp4pc3n0bccnmllsnymggcf0"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (bin   (string-append out "/bin"))
+                    (share (string-append out "/share/sortmerna/rRNA_databases")))
+               (install-file "sortmerna" bin)
+               (install-file "indexdb_rna" bin)
+               (for-each (lambda (file)
+                           (install-file file share))
+                         (find-files "rRNA_databases" ".*fasta"))
+               #t))))))
+    (home-page "http://bioinfo.lifl.fr/RNA/sortmerna")
+    (synopsis "Biological sequence analysis tool for NGS reads")
+    (description
+     "SortMeRNA is a biological sequence analysis tool for filtering, mapping
+and operational taxonomic unit (OTU) picking next generation sequencing reads.
+The core algorithm is based on approximate seeds and allows for fast and
+sensitive analyses of nucleotide sequences.  The main application of SortMeRNA
+is filtering rRNA from metatranscriptomic data.")
+    (license license:lgpl3)))
+
 (define-public star
   (package
     (name "star")
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Add SortMeRNA.
  2016-01-22 12:12 [PATCH] Add SortMeRNA Ben Woodcroft
@ 2016-01-22 20:35 ` Leo Famulari
  2016-01-22 21:55   ` Ben Woodcroft
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Famulari @ 2016-01-22 20:35 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel@gnu.org

On Fri, Jan 22, 2016 at 10:12:54PM +1000, Ben Woodcroft wrote:
> Thanks in advance as usual.

> From 448c2435e50d9d860f1153934058effa42fc6495 Mon Sep 17 00:00:00 2001
> From: Ben Woodcroft <donttrustben@gmail.com>
> Date: Sat, 16 Jan 2016 13:33:08 +1000
> Subject: [PATCH] gnu: Add sortmerna.
> 
> * gnu/packages/bioinformatics.scm (sortmerna): New variable.
> ---
>  gnu/packages/bioinformatics.scm | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
> 
> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index e579afe..e170ff7 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -3016,6 +3016,45 @@ optimized for modern read lengths of 100 bases or higher, and takes advantage
>  of these reads to align data quickly through a hash-based indexing scheme.")
>      (license license:asl2.0)))
>  
> +(define-public sortmerna
> +  (package
> +    (name "sortmerna")
> +    (version "2.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append
> +             "https://github.com/biocore/sortmerna/archive/"
> +             version ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "1670a92x1vvkacnvgr2i5xac3ls6lp4pc3n0bccnmllsnymggcf0"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases

My sense of Scheme style is still pretty weak but shouldn't the above
line move one character to the right (along with the remainder of
arguments)?

> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out   (assoc-ref outputs "out"))
> +                    (bin   (string-append out "/bin"))
> +                    (share (string-append out "/share/sortmerna/rRNA_databases")))
> +               (install-file "sortmerna" bin)
> +               (install-file "indexdb_rna" bin)
> +               (for-each (lambda (file)
> +                           (install-file file share))
> +                         (find-files "rRNA_databases" ".*fasta"))
> +               #t))))))
> +    (home-page "http://bioinfo.lifl.fr/RNA/sortmerna")
> +    (synopsis "Biological sequence analysis tool for NGS reads")

Does it make sense to explain the "NGS" acronym anywhere?

> +    (description
> +     "SortMeRNA is a biological sequence analysis tool for filtering, mapping
> +and operational taxonomic unit (OTU) picking next generation sequencing reads.

Does this sentence make more sense with "of" inserted between "picking"
and "next"?

> +The core algorithm is based on approximate seeds and allows for fast and
> +sensitive analyses of nucleotide sequences.  The main application of SortMeRNA
> +is filtering rRNA from metatranscriptomic data.")
> +    (license license:lgpl3)))
> +
>  (define-public star
>    (package
>      (name "star")
> -- 
> 2.6.3
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Add SortMeRNA.
  2016-01-22 20:35 ` Leo Famulari
@ 2016-01-22 21:55   ` Ben Woodcroft
  2016-01-22 23:00     ` Leo Famulari
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Woodcroft @ 2016-01-22 21:55 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 2343 bytes --]


On 23/01/16 06:35, Leo Famulari wrote:
> On Fri, Jan 22, 2016 at 10:12:54PM +1000, Ben Woodcroft wrote:
[..]

Thanks Leo. As well as responding to your review the attached patch 
breaks out the rRNA databases out into a separate output "db", removing 
73MB from the default package. Is "db" a good name?
> On Fri, Jan 22, 2016 at 10:12:54PM +1000, Ben Woodcroft wrote:
[..]
>> +(define-public sortmerna
>> +  (package
>> +    (name "sortmerna")
>> +    (version "2.0")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (string-append
>> +             "https://github.com/biocore/sortmerna/archive/"
>> +             version ".tar.gz"))
>> +       (file-name (string-append name "-" version ".tar.gz"))
>> +       (sha256
>> +        (base32
>> +         "1670a92x1vvkacnvgr2i5xac3ls6lp4pc3n0bccnmllsnymggcf0"))))
>> +    (build-system gnu-build-system)
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
> > My sense of Scheme style is still pretty weak but shouldn't the > 
above line move one character to the right (along with the remainder > 
of arguments)?
I don't think so. I'm just trusting the tab key and other packages 
around. No?

>> +         (replace 'install +           (lambda* (#:key outputs  >> #:allow-other-keys) +             (let* ((out   (assoc-ref outputs 
 >> "out")) +                    (bin   (string-append out "/bin")) + >> 
(share (string-append out "/share/sortmerna/rRNA_databases"))) + >> 
(install-file "sortmerna" bin) +               (install-file >> 
"indexdb_rna" bin) +               (for-each (lambda (file) + >> 
(install-file file share)) +                         (find-files >> 
"rRNA_databases" ".*fasta")) +               #t)))))) + >> (home-page 
"http://bioinfo.lifl.fr/RNA/sortmerna") +    (synopsis >> "Biological 
sequence analysis tool for NGS reads") > > Does it make sense to explain 
the "NGS" acronym anywhere?
OK, I've explained it in the description.

>> +    (description +     "SortMeRNA is a biological sequence  >> analysis tool for filtering, mapping +and operational taxonomic >> 
unit (OTU) picking next generation sequencing reads. > > Does this 
sentence make more sense with "of" inserted between > "picking" and "next"?
I think either way is fine, but including the of rolls of the tongue a 
bit better.


ben


[-- Attachment #1.2: Type: text/html, Size: 3441 bytes --]

[-- Attachment #2: 0001-gnu-Add-sortmerna.patch --]
[-- Type: text/x-patch, Size: 2646 bytes --]

From 6f2599eff86b5a67a92429756f2df3ba2cf53201 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sat, 16 Jan 2016 13:33:08 +1000
Subject: [PATCH] gnu: Add sortmerna.

* gnu/packages/bioinformatics.scm (sortmerna): New variable.
---
 gnu/packages/bioinformatics.scm | 43 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e579afe..946083f 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3016,6 +3016,49 @@ optimized for modern read lengths of 100 bases or higher, and takes advantage
 of these reads to align data quickly through a hash-based indexing scheme.")
     (license license:asl2.0)))
 
+(define-public sortmerna
+  (package
+    (name "sortmerna")
+    (version "2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/biocore/sortmerna/archive/"
+             version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1670a92x1vvkacnvgr2i5xac3ls6lp4pc3n0bccnmllsnymggcf0"))))
+    (build-system gnu-build-system)
+    (outputs '("out"      ;for binaries
+               "db"))     ;for sequence databases
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (bin   (string-append out "/bin"))
+                    (db    (assoc-ref outputs "db"))
+                    (share
+                     (string-append db "/share/sortmerna/rRNA_databases")))
+               (install-file "sortmerna" bin)
+               (install-file "indexdb_rna" bin)
+               (for-each (lambda (file)
+                           (install-file file share))
+                         (find-files "rRNA_databases" ".*fasta"))
+               #t))))))
+    (home-page "http://bioinfo.lifl.fr/RNA/sortmerna")
+    (synopsis "Biological sequence analysis tool for NGS reads")
+    (description
+     "SortMeRNA is a biological sequence analysis tool for filtering, mapping
+and operational taxonomic unit (OTU) picking of next generation
+sequencing (NGS) reads.  The core algorithm is based on approximate seeds and
+allows for fast and sensitive analyses of nucleotide sequences.  The main
+application of SortMeRNA is filtering rRNA from metatranscriptomic data.")
+    (license license:lgpl3)))
+
 (define-public star
   (package
     (name "star")
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Add SortMeRNA.
  2016-01-22 21:55   ` Ben Woodcroft
@ 2016-01-22 23:00     ` Leo Famulari
  2016-01-24 22:36       ` Ben Woodcroft
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Famulari @ 2016-01-22 23:00 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel@gnu.org

On Sat, Jan 23, 2016 at 07:55:37AM +1000, Ben Woodcroft wrote:
> 
> On 23/01/16 06:35, Leo Famulari wrote:
> >On Fri, Jan 22, 2016 at 10:12:54PM +1000, Ben Woodcroft wrote:
> [..]
> 
> Thanks Leo. As well as responding to your review the attached patch breaks
> out the rRNA databases out into a separate output "db", removing 73MB from
> the default package. Is "db" a good name?

Sounds like a good name. It's a good idea to split the package up if the
database is not necessary for a basic installation. I haven't used
multiple outputs in my packages yet so I can't say if your
implementation is correct or not.

> >On Fri, Jan 22, 2016 at 10:12:54PM +1000, Ben Woodcroft wrote:
> [..]
> >>+    (arguments
> >>+     `(#:phases
> >>+       (modify-phases %standard-phases
> >> My sense of Scheme style is still pretty weak but shouldn't the >
> above line move one character to the right (along with the remainder > of
> arguments)?
> I don't think so. I'm just trusting the tab key and other packages around.
> No?

Like I said, my sense of style is not very developed ;) I checked some
other packages and they agree with you.

> >>+    (description +     "SortMeRNA is a biological sequence  >> analysis
> >>tool for filtering, mapping +and operational taxonomic >>
> unit (OTU) picking next generation sequencing reads. > > Does this sentence
> make more sense with "of" inserted between > "picking" and "next"?
> I think either way is fine, but including the of rolls of the tongue a bit
> better.

The original was a garden path sentence to my ears. However, I am
reading the sentence as a layperson so the meaning is mostly lost on me.

> 
> 
> ben
> 

> From 6f2599eff86b5a67a92429756f2df3ba2cf53201 Mon Sep 17 00:00:00 2001
> From: Ben Woodcroft <donttrustben@gmail.com>
> Date: Sat, 16 Jan 2016 13:33:08 +1000
> Subject: [PATCH] gnu: Add sortmerna.
> 
> * gnu/packages/bioinformatics.scm (sortmerna): New variable.
> ---
>  gnu/packages/bioinformatics.scm | 43 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index e579afe..946083f 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -3016,6 +3016,49 @@ optimized for modern read lengths of 100 bases or higher, and takes advantage
>  of these reads to align data quickly through a hash-based indexing scheme.")
>      (license license:asl2.0)))
>  
> +(define-public sortmerna
> +  (package
> +    (name "sortmerna")
> +    (version "2.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append
> +             "https://github.com/biocore/sortmerna/archive/"
> +             version ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "1670a92x1vvkacnvgr2i5xac3ls6lp4pc3n0bccnmllsnymggcf0"))))
> +    (build-system gnu-build-system)
> +    (outputs '("out"      ;for binaries
> +               "db"))     ;for sequence databases
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out   (assoc-ref outputs "out"))
> +                    (bin   (string-append out "/bin"))
> +                    (db    (assoc-ref outputs "db"))
> +                    (share
> +                     (string-append db "/share/sortmerna/rRNA_databases")))
> +               (install-file "sortmerna" bin)
> +               (install-file "indexdb_rna" bin)
> +               (for-each (lambda (file)
> +                           (install-file file share))
> +                         (find-files "rRNA_databases" ".*fasta"))
> +               #t))))))
> +    (home-page "http://bioinfo.lifl.fr/RNA/sortmerna")
> +    (synopsis "Biological sequence analysis tool for NGS reads")
> +    (description
> +     "SortMeRNA is a biological sequence analysis tool for filtering, mapping
> +and operational taxonomic unit (OTU) picking of next generation
> +sequencing (NGS) reads.  The core algorithm is based on approximate seeds and
> +allows for fast and sensitive analyses of nucleotide sequences.  The main
> +application of SortMeRNA is filtering rRNA from metatranscriptomic data.")
> +    (license license:lgpl3)))
> +
>  (define-public star
>    (package
>      (name "star")
> -- 
> 2.6.3
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Add SortMeRNA.
  2016-01-22 23:00     ` Leo Famulari
@ 2016-01-24 22:36       ` Ben Woodcroft
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Woodcroft @ 2016-01-24 22:36 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel@gnu.org



On 23/01/16 09:00, Leo Famulari wrote:
> On Sat, Jan 23, 2016 at 07:55:37AM +1000, Ben Woodcroft wrote:
>> On 23/01/16 06:35, Leo Famulari wrote:
>>> On Fri, Jan 22, 2016 at 10:12:54PM +1000, Ben Woodcroft wrote:
>> [..]
>>
>> Thanks Leo. As well as responding to your review the attached patch breaks
>> out the rRNA databases out into a separate output "db", removing 73MB from
>> the default package. Is "db" a good name?
> Sounds like a good name. It's a good idea to split the package up if the
> database is not necessary for a basic installation. I haven't used
> multiple outputs in my packages yet so I can't say if your
> implementation is correct or not.
I went ahead and pushed just now. Thanks for the reviews.
ben

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-24 22:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-22 12:12 [PATCH] Add SortMeRNA Ben Woodcroft
2016-01-22 20:35 ` Leo Famulari
2016-01-22 21:55   ` Ben Woodcroft
2016-01-22 23:00     ` Leo Famulari
2016-01-24 22:36       ` Ben Woodcroft

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).