diff mbox series

[bug#35810] Add RMassBank (r-massbank)

Message ID 0Wmcjgq-bpYQvMH_nhfAPRc8siXsADDFk0tfLvj-4onlp3m2aBbTJXEwrtdpbwWpgQnzn7-P8Hc6Gpq32B4rMmOq1GV8MkP75J2YJxSVMVs=@protonmail.com
State Accepted
Headers show
Series [bug#35810] Add RMassBank (r-massbank) | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Todor Kondi�� May 20, 2019, 2:20 p.m. UTC
Hi,

Some of us at ECI (Environmental Cheminformatics), LCSB, University of Luxembourg
are in love with Scheme, GNU, Guile and Guix.

At ECI, there is a lot of mass spectrometry going on and there are plenty of
R tools -- some written by us -- to analyse and annotate such spectra. Anyway,
this is our first contribution to Guix -- RMassBank (r-massbank package).
I have decided to create a separate package group for mass-spectrometry and
include r-massbank in it. I could imagine packages defined here to end up in
chemistry.scm, or under a new subpath, chemistry/mass-spectrometry.scm. Once
this first submission enters Guix, some more will follow.

The packages themselves have been generated using
`guix import cran -r --archive=bioconductor RMassBank` and minimally altered
to build successfully and not bother guix lint too much.

As this is my first contribution to guix, I am very much looking forward
to feedback.

Thanks,

Todor

---
 gnu/packages/mass-spectrometry.scm | 163 +++++++++++++++++++++++++++++
 1 file changed, 163 insertions(+)
 create mode 100644 gnu/packages/mass-spectrometry.scm

--
2.21.0

Comments

Ludovic Courtès May 24, 2019, 3:59 p.m. UTC | #1
Hello Todor,

Tk <tk.code@protonmail.com> skribis:

> Some of us at ECI (Environmental Cheminformatics), LCSB, University of Luxembourg
> are in love with Scheme, GNU, Guile and Guix.

Heh, cool.  :-)

> At ECI, there is a lot of mass spectrometry going on and there are plenty of
> R tools -- some written by us -- to analyse and annotate such spectra. Anyway,
> this is our first contribution to Guix -- RMassBank (r-massbank package).
> I have decided to create a separate package group for mass-spectrometry and
> include r-massbank in it. I could imagine packages defined here to end up in
> chemistry.scm, or under a new subpath, chemistry/mass-spectrometry.scm. Once
> this first submission enters Guix, some more will follow.
>
> The packages themselves have been generated using
> `guix import cran -r --archive=bioconductor RMassBank` and minimally altered
> to build successfully and not bother guix lint too much.

Looks good to me.  Ricardo, WDYT?

> As this is my first contribution to guix, I am very much looking forward
> to feedback.

The file is OK as-is, but could you send directly the output of ‘git
format-patch’?  That makes it easier for us to apply the patch while
preserving authorship information.

Also, bonus points if you can come up with a commit log that follows our
conventions.  :-)

  https://www.gnu.org/software/guix/manual/en/html_node/Submitting-Patches.html

Anyway, glad to see more scientists join!  You might be interested in
<https://guix-hpc.bordeaux.inria.fr/> too.

Welcome!

Thanks,
Ludo’.
Todor Kondi�� May 25, 2019, 2 p.m. UTC | #2
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, 24 May 2019 17:59, Ludovic Courtès <ludo@gnu.org> wrote:

> Hello Todor,
>
> Tk tk.code@protonmail.com skribis:
>
> > Some of us at ECI (Environmental Cheminformatics), LCSB, University of Luxembourg
> > are in love with Scheme, GNU, Guile and Guix.
>
> Heh, cool. :-)
>
> > At ECI, there is a lot of mass spectrometry going on and there are plenty of
> > R tools -- some written by us -- to analyse and annotate such spectra. Anyway,
> > this is our first contribution to Guix -- RMassBank (r-massbank package).
> > I have decided to create a separate package group for mass-spectrometry and
> > include r-massbank in it. I could imagine packages defined here to end up in
> > chemistry.scm, or under a new subpath, chemistry/mass-spectrometry.scm. Once
> > this first submission enters Guix, some more will follow.
> > The packages themselves have been generated using
> > `guix import cran -r --archive=bioconductor RMassBank` and minimally altered
> > to build successfully and not bother guix lint too much.
>
> Looks good to me. Ricardo, WDYT?
>
> > As this is my first contribution to guix, I am very much looking forward
> > to feedback.
>
> The file is OK as-is, but could you send directly the output of ‘git
> format-patch’? That makes it easier for us to apply the patch while
> preserving authorship information.
>
> Also, bonus points if you can come up with a commit log that follows our
> conventions. :-)
>
> https://www.gnu.org/software/guix/manual/en/html_node/Submitting-Patches.html
>
> Anyway, glad to see more scientists join! You might be interested in
> https://guix-hpc.bordeaux.inria.fr/ too.
>
> Welcome!
>
> Thanks,
> Ludo’.


Hi Ludo’,

Thanks for the words of welcome :) . Actually, I have been lurking in shadows for a long time, probably from the time you first announced Guix on the guile list. It grew a lot since those days.

My previous reply is, hopefully, sorting things out re mass spectrometry and rmassbank. I haven't yet set my new work machine with a proper email and have to resort to webmail (which sucks).

Cheers,
Todor
Ricardo Wurmus May 28, 2019, 10:16 p.m. UTC | #3
Hi Todor,

>> The packages themselves have been generated using
>> `guix import cran -r --archive=bioconductor RMassBank` and minimally altered
>> to build successfully and not bother guix lint too much.
>
> Looks good to me.  Ricardo, WDYT?

Generally, the additions look fine, but with my nitpicking hat on I’d
like to make a few comments:

* Some of the packages have a list of licenses.  It would be good to add
  a comment above the license field to clarify what this list means.

* Some of descriptions begin with sentence fragments.  The importer is
  not smart enough to figure out the proper way to turn those fragments
  into full sentences.

* The synopses often contain capitalized words.

* I’d prefer the value of the home-page field to be on the same line as
  the field name.

* The module header contains references to unused modules, such as (guix
  git-download).

* I prefer for moving all CRAN packages to gnu/packages/cran.scm and all
  Bioconductor packages to gnu/packages/bioconductor.scm, because that
  makes future updates much easier.  That because CRAN packages rarely
  ever depend on Bioconductor packages, and keeping the number of
  mutually dependent modules down reduces the likelihood of dependency
  cycles.

  I haven’t always done it this way, but all recent additions are only
  to cran.scm and bioconductor.scm; I’m slowly moving CRAN packages from
  other locations to cran.scm for the above reasons.

* If you do move the package additions to existing modules, please make
  one commit per package addition.

(If this is all a bit too much to take in at first, I can also make the
changes on your behalf and keep your authorship.)

Thank you for your contributions!

--
Ricardo
Todor Kondi�� July 7, 2019, 7:06 a.m. UTC | #4
Too much time has passed and the number of mass spec packages in our channel https://git-r3lab.uni.lu/eci/eci-pkg-menu.git grew. Will issue a new patch request once I am sure how to integrate so many packages at once into guix.

Thanks,
Todor




‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, 24 May 2019 17:59, Ludovic Courtès <ludo@gnu.org> wrote:

> Hello Todor,
>
> Tk tk.code@protonmail.com skribis:
>
> > Some of us at ECI (Environmental Cheminformatics), LCSB, University of Luxembourg
> > are in love with Scheme, GNU, Guile and Guix.
>
> Heh, cool. :-)
>
> > At ECI, there is a lot of mass spectrometry going on and there are plenty of
> > R tools -- some written by us -- to analyse and annotate such spectra. Anyway,
> > this is our first contribution to Guix -- RMassBank (r-massbank package).
> > I have decided to create a separate package group for mass-spectrometry and
> > include r-massbank in it. I could imagine packages defined here to end up in
> > chemistry.scm, or under a new subpath, chemistry/mass-spectrometry.scm. Once
> > this first submission enters Guix, some more will follow.
> > The packages themselves have been generated using
> > `guix import cran -r --archive=bioconductor RMassBank` and minimally altered
> > to build successfully and not bother guix lint too much.
>
> Looks good to me. Ricardo, WDYT?
>
> > As this is my first contribution to guix, I am very much looking forward
> > to feedback.
>
> The file is OK as-is, but could you send directly the output of ‘git
> format-patch’? That makes it easier for us to apply the patch while
> preserving authorship information.
>
> Also, bonus points if you can come up with a commit log that follows our
> conventions. :-)
>
> https://www.gnu.org/software/guix/manual/en/html_node/Submitting-Patches.html
>
> Anyway, glad to see more scientists join! You might be interested in
> https://guix-hpc.bordeaux.inria.fr/ too.
>
> Welcome!
>
> Thanks,
> Ludo’.
Ricardo Wurmus Aug. 4, 2020, 1:55 p.m. UTC | #5
Closing.
diff mbox series

Patch

diff --git a/gnu/packages/mass-spectrometry.scm b/gnu/packages/mass-spectrometry.scm
new file mode 100644
index 0000000000..d2684856c1
--- /dev/null
+++ b/gnu/packages/mass-spectrometry.scm
@@ -0,0 +1,163 @@ 
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Todor Kondić <tk.code@protonmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages mass-spectrometry)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix utils)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system r)
+  #:use-module (gnu packages chemistry)
+  #:use-module (gnu packages bioinformatics)
+  #:use-module (gnu packages statistics)
+  #:use-module (gnu packages cran)
+  #:use-module (gnu packages web)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages cran)
+  #:use-module (gnu packages)
+  #:use-module (srfi srfi-1))
+
+
+
+(define-public r-fingerprint
+  (package
+    (name "r-fingerprint")
+    (version "3.5.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "fingerprint" version))
+       (sha256
+        (base32
+         "04jcwkydjrs31pia6kq8z2n9s54im950q08hs2ay15xjxxkmb8ic"))))
+    (build-system r-build-system)
+    (home-page
+     "https://cran.r-project.org/web/packages/fingerprint")
+    (synopsis
+     "Functions to Operate on Binary Fingerprint Data")
+    (description
+     "Functions to manipulate binary fingerprints of arbitrary length.  A
+fingerprint is represented by an object of S4 class 'fingerprint' which is
+internally represented a vector of integers, such that each element represents
+the position in the fingerprint that is set to 1.  The bitwise logical
+functions in R are overridden so that they can be used directly with
+'fingerprint' objects.  A number of distance metrics are also available (many
+contributed by Michael Fadock).  Fingerprints can be converted to Euclidean
+vectors (i.e., points on the unit hypersphere) and can also be folded using
+OR.  Arbitrary fingerprint formats can be handled via line handlers.
+Currently handlers are provided for CDK, MOE and BCI fingerprint data.")
+    (license (list gpl2+ gpl3+))))
+
+(define-public r-cdklibs
+  (package
+    (name "r-cdklibs")
+    (version "2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "rcdklibs" version))
+       (sha256
+        (base32
+         "05g0y00bw1bqykfbwn4q42krwcfl50jcavaw7yyw9a5m34hvw0l8"))))
+    (build-system r-build-system)
+    (propagated-inputs `(("r-rjava" ,r-rjava)))
+    (home-page
+     "https://cran.r-project.org/web/packages/rcdklibs")
+    (synopsis "The CDK Libraries Packaged for R")
+    (description
+     "An R interface to the Chemistry Development Kit, a Java library for
+chemoinformatics.  Given the size of the library itself, this package is not
+expected to change very frequently.  To make use of the CDK within R, it is
+suggested that you use the 'rcdk' package.  Note that it is possible to
+directly interact with the CDK using 'rJava'.  However 'rcdk' exposes
+functionality in a more idiomatic way.  The CDK library itself is released as
+LGPL and the sources can be obtained from <https://github.com/cdk/cdk>.")
+    (license (list license:lgpl2.0 license:lgpl2.1 license:lgpl3))))
+
+(define-public r-cdk
+  (package
+    (name "r-cdk")
+    (version "3.4.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "rcdk" version))
+       (sha256
+        (base32
+         "1d08ajji631792b7fyfwzvcaswh8jlanfsxrj6c1wx7xh3qqpigg"))))
+    (build-system r-build-system)
+    (propagated-inputs
+     `(("r-fingerprint" ,r-fingerprint)
+       ("r-iterators" ,r-iterators)
+       ("r-itertools" ,r-itertools)
+       ("r-png" ,r-png)
+       ("r-cdklibs" ,r-cdklibs)
+       ("r-rjava" ,r-rjava)
+       ("r-knitr" ,r-knitr)))
+    (home-page
+     "https://cran.r-project.org/web/packages/rcdk")
+    (synopsis "Interface to the 'CDK' Libraries")
+    (description
+     "Allows the user to access functionality in the 'CDK', a Java framework
+for chemoinformatics.  This allows the user to load molecules, evaluate
+fingerprints, calculate molecular descriptors and so on.  In addition, the
+'CDK' API allows the user to view structures in 2D.")
+    (license (list license:lgpl2.0 license:lgpl2.1 license:lgpl3))))
+
+(define-public r-massbank
+  (package
+    (name "r-massbank")
+    (version "2.12.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (bioconductor-uri "RMassBank" version))
+       (sha256
+        (base32
+         "1xdxrbkcggrlqx3h11w10vk18bjmdfs85j6rvy7yvqj7limsjp2j"))))
+    (properties `((upstream-name . "RMassBank")))
+    (build-system r-build-system)
+    (inputs `(("openbabel" ,openbabel)))
+    (propagated-inputs
+     `(("r-biobase" ,r-biobase)
+       ("r-digest" ,r-digest)
+       ("r-httr" ,r-httr)
+       ("r-msnbase" ,r-msnbase)
+       ("r-mzr" ,r-mzr)
+       ("r-cdk" ,r-cdk)
+       ("r-rcpp" ,r-rcpp)
+       ("r-rcurl" ,r-rcurl)
+       ("r-rjson" ,r-rjson)
+       ("r-s4vectors" ,r-s4vectors)
+       ("r-xml" ,r-xml)
+       ("r-markdown" ,r-markdown)
+       ("r-knitr" ,r-knitr)
+       ("r-yaml" ,r-yaml)))
+    (home-page
+     "https://bioconductor.org/packages/release/bioc/html/RMassBank.html")
+    (synopsis
+     "Workflow to process tandem MS files and build MassBank records")
+    (description
+     "Workflow to process tandem MS files and build MassBank records.
+Functions include automated extraction of tandem MS spectra, formula
+assignment to tandem MS fragments, recalibration of tandem MS spectra with
+assigned fragments, spectrum cleanup, automated retrieval of compound
+information from Internet databases, and export to MassBank records.")
+    (license license:artistic2.0)))