* [bug#35207] [PATCH] Resurrect pplacer.
@ 2019-04-09 13:00 Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 1/3] gnu: Add ocaml4.02-mcl Ricardo Wurmus
2019-04-09 17:12 ` [bug#35207] [PATCH] Resurrect pplacer Julien Lepiller
0 siblings, 2 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2019-04-09 13:00 UTC (permalink / raw)
To: 35207
Hi Guix,
this patch series adds pplacer, which had been removed due to its
dependency on the vulnerable OCaml 4.01.
--
Ricardo
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#35207] [PATCH 1/3] gnu: Add ocaml4.02-mcl.
2019-04-09 13:00 [bug#35207] [PATCH] Resurrect pplacer Ricardo Wurmus
@ 2019-04-09 13:13 ` Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 2/3] gnu: Add ocaml4.02-gsl Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 3/3] gnu: Add pplacer Ricardo Wurmus
2019-04-09 17:12 ` [bug#35207] [PATCH] Resurrect pplacer Julien Lepiller
1 sibling, 2 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2019-04-09 13:13 UTC (permalink / raw)
To: 35207
* gnu/packages/machine-learning.scm (ocaml4.02-mcl): New variable.
---
gnu/packages/machine-learning.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 10aff22206..5b2786b61c 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -334,6 +334,9 @@ networks) based on simulation of (stochastic) flow in graphs.")
algorithm.")
(license license:gpl3)))
+(define-public ocaml4.02-mcl
+ (package-with-ocaml4.02 ocaml-mcl))
+
(define-public randomjungle
(package
(name "randomjungle")
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#35207] [PATCH 2/3] gnu: Add ocaml4.02-gsl.
2019-04-09 13:13 ` [bug#35207] [PATCH 1/3] gnu: Add ocaml4.02-mcl Ricardo Wurmus
@ 2019-04-09 13:13 ` Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 3/3] gnu: Add pplacer Ricardo Wurmus
1 sibling, 0 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2019-04-09 13:13 UTC (permalink / raw)
To: 35207
* gnu/packages/ocaml.scm (ocaml4.02-gsl): New variable.
---
gnu/packages/ocaml.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 7bebf3921b..bf5d39db6c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4824,6 +4824,28 @@ Atom.")
the OCaml language.")
(license license:gpl3+)))
+;; This is the last version that can be built with without ocaml-base, which
+;; cannot be built with OCaml 4.02.
+(define-public ocaml4.02-gsl
+ (package
+ (inherit (package-with-ocaml4.02 ocaml-gsl))
+ (version "1.19.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/mmottl/gsl-ocaml"
+ "/releases/download/v"
+ version "/gsl-ocaml-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
+ (build-system ocaml-build-system)
+ (inputs
+ `(("gsl" ,gsl)))
+ (arguments
+ `(#:ocaml ,ocaml-4.02
+ #:findlib ,ocaml4.02-findlib))
+ (propagated-inputs '())))
+
(define-public cubicle
(package
(name "cubicle")
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#35207] [PATCH 3/3] gnu: Add pplacer.
2019-04-09 13:13 ` [bug#35207] [PATCH 1/3] gnu: Add ocaml4.02-mcl Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 2/3] gnu: Add ocaml4.02-gsl Ricardo Wurmus
@ 2019-04-09 13:13 ` Ricardo Wurmus
1 sibling, 0 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2019-04-09 13:13 UTC (permalink / raw)
To: 35207
* gnu/packages/bioinformatics.scm (pplacer, pplacer-scripts): New variables.
---
gnu/packages/bioinformatics.scm | 151 ++++++++++++++++++++++++++++++++
1 file changed, 151 insertions(+)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 4cd032abd4..c073519dc3 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -14555,3 +14555,154 @@ overlapping paired-ended reads into (longer) consensus sequences.
Additionally, the AdapterRemoval may be used to recover a consensus adapter
sequence for paired-ended data, for which this information is not available.")
(license license:gpl3+)))
+
+(define-public pplacer
+ (let ((commit "807f6f3"))
+ (package
+ (name "pplacer")
+ ;; The commit should be updated with each version change.
+ (version "1.1.alpha19")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/matsen/pplacer.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "11ppbbbx20p2g9wj3ff64dhnarb12q79v7qh4rk0gj6lkbz4n7cn"))))
+ (build-system ocaml-build-system)
+ (arguments
+ `(#:ocaml ,ocaml-4.02
+ #:findlib ,ocaml4.02-findlib
+ #:modules ((guix build ocaml-build-system)
+ (guix build utils)
+ (ice-9 ftw))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'fix-build-with-ocaml-4.02
+ (lambda _
+ (substitute* "myocamlbuild.ml"
+ (("let run_and_read" m)
+ (string-append "
+let split s ch =
+ let x = ref [] in
+ let rec go s =
+ let pos = String.index s ch in
+ x := (String.before s pos)::!x;
+ go (String.after s (pos + 1))
+ in
+ try go s
+ with Not_found -> !x
+let split_nl s = split s '\\n'
+let before_space s =
+ try String.before s (String.index s ' ')
+ with Not_found -> s
+
+" m))
+ (("run_and_read \"ocamlfind list \\| cut -d' ' -f1\"" m)
+ (string-append "List.map before_space (split_nl & " m ")"))
+ ((" blank_sep_strings &") "")
+ ((" Lexing.from_string &") ""))
+ #t))
+ (add-after 'unpack 'replace-bundled-cddlib
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((cddlib-src (assoc-ref inputs "cddlib-src"))
+ (local-dir "cddlib_guix"))
+ (mkdir local-dir)
+ (with-directory-excursion local-dir
+ (invoke "tar" "xvf" cddlib-src))
+ (let ((cddlib-src-folder
+ (string-append local-dir "/"
+ (list-ref (scandir local-dir) 2)
+ "/lib-src")))
+ (for-each make-file-writable (find-files "cdd_src" ".*"))
+ (for-each
+ (lambda (file)
+ (copy-file file
+ (string-append "cdd_src/" (basename file))))
+ (find-files cddlib-src-folder ".*[ch]$")))
+ #t)))
+ (add-after 'unpack 'fix-makefile
+ (lambda _
+ ;; Remove system calls to 'git'.
+ (substitute* "Makefile"
+ (("^DESCRIPT:=pplacer-.*")
+ (string-append
+ "DESCRIPT:=pplacer-$(shell uname)-v" ,version "\n")))
+ (substitute* "myocamlbuild.ml"
+ (("git describe --tags --long .*\\\" with")
+ (string-append
+ "echo -n v" ,version "-" ,commit "\" with")))
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (copy-recursively "bin" bin))
+ #t)))))
+ (inputs
+ `(("zlib" ,zlib "static")
+ ("gsl" ,gsl)
+ ("ocaml-ounit" ,ocaml4.02-ounit)
+ ("ocaml-batteries" ,ocaml4.02-batteries)
+ ("ocaml-camlzip" ,ocaml4.02-camlzip)
+ ("ocaml-csv" ,ocaml4.02-csv)
+ ("ocaml-sqlite3" ,ocaml4.02-sqlite3)
+ ("ocaml-xmlm" ,ocaml4.02-xmlm)
+ ("ocaml-mcl" ,ocaml4.02-mcl)
+ ("ocaml-gsl" ,ocaml4.02-gsl)))
+ (native-inputs
+ `(("cddlib-src" ,(package-source cddlib))
+ ("pkg-config" ,pkg-config)))
+ (propagated-inputs
+ `(("pplacer-scripts" ,pplacer-scripts)))
+ (synopsis "Phylogenetic placement of biological sequences")
+ (description
+ "Pplacer places query sequences on a fixed reference phylogenetic tree
+to maximize phylogenetic likelihood or posterior probability according to a
+reference alignment. Pplacer is designed to be fast, to give useful
+information about uncertainty, and to offer advanced visualization and
+downstream analysis.")
+ (home-page "http://matsen.fhcrc.org/pplacer")
+ (license license:gpl3))))
+
+;; This package is installed alongside 'pplacer'. It is a separate package so
+;; that it can use the python-build-system for the scripts that are
+;; distributed alongside the main OCaml binaries.
+(define pplacer-scripts
+ (package
+ (inherit pplacer)
+ (name "pplacer-scripts")
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'enter-scripts-dir
+ (lambda _ (chdir "scripts") #t))
+ (replace 'check
+ (lambda _ (invoke "python" "-m" "unittest" "discover" "-v") #t))
+ (add-after 'install 'wrap-executables
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (let ((path (string-append
+ (assoc-ref inputs "hmmer") "/bin:"
+ (assoc-ref inputs "infernal") "/bin")))
+ (display path)
+ (wrap-program (string-append bin "/refpkg_align.py")
+ `("PATH" ":" prefix (,path))))
+ (let ((path (string-append
+ (assoc-ref inputs "hmmer") "/bin")))
+ (wrap-program (string-append bin "/hrefpkg_query.py")
+ `("PATH" ":" prefix (,path)))))
+ #t)))))
+ (inputs
+ `(("infernal" ,infernal)
+ ("hmmer" ,hmmer)))
+ (propagated-inputs
+ `(("python-biopython" ,python2-biopython)
+ ("taxtastic" ,taxtastic)))
+ (synopsis "Pplacer Python scripts")))
--
2.20.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#35207] [PATCH] Resurrect pplacer.
2019-04-09 13:00 [bug#35207] [PATCH] Resurrect pplacer Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 1/3] gnu: Add ocaml4.02-mcl Ricardo Wurmus
@ 2019-04-09 17:12 ` Julien Lepiller
2019-04-09 17:41 ` Ricardo Wurmus
1 sibling, 1 reply; 10+ messages in thread
From: Julien Lepiller @ 2019-04-09 17:12 UTC (permalink / raw)
To: Ricardo Wurmus, 35207
Le 9 avril 2019 15:00:02 GMT+02:00, Ricardo Wurmus <rekado@elephly.net> a écrit :
>Hi Guix,
>
>this patch series adds pplacer, which had been removed due to its
>dependency on the vulnerable OCaml 4.01.
We're going to have the same issue with ocaml-4.02, so I don't think we should add more dependents. I'd like to remove ocaml-4.02 but I'm a bit stuck because of bap right now.
What's the most recent version of ocaml pplacer can use?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#35207] [PATCH] Resurrect pplacer.
2019-04-09 17:12 ` [bug#35207] [PATCH] Resurrect pplacer Julien Lepiller
@ 2019-04-09 17:41 ` Ricardo Wurmus
2019-04-11 12:55 ` Ricardo Wurmus
0 siblings, 1 reply; 10+ messages in thread
From: Ricardo Wurmus @ 2019-04-09 17:41 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 35207
Julien Lepiller <julien@lepiller.eu> writes:
> What's the most recent version of ocaml pplacer can use?
It’s actually 4.01. I don’t know how much effort it’s going to be to
make it work with the latest version.
--
Ricardo
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#35207] [PATCH] Resurrect pplacer.
2019-04-09 17:41 ` Ricardo Wurmus
@ 2019-04-11 12:55 ` Ricardo Wurmus
2019-04-11 13:02 ` Julien Lepiller
0 siblings, 1 reply; 10+ messages in thread
From: Ricardo Wurmus @ 2019-04-11 12:55 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 35207
Ricardo Wurmus <rekado@elephly.net> writes:
> Julien Lepiller <julien@lepiller.eu> writes:
>
>> What's the most recent version of ocaml pplacer can use?
>
> It’s actually 4.01. I don’t know how much effort it’s going to be to
> make it work with the latest version.
I gave patching pplacer a try, but in more recent versions of OCaml
strings are byte streams, so it’s quite a bit of work to figure out
where exactly to convert strings to byte streams and back again.
I’ll keep working on this for a while, but for now I’d like to get
pplacer resurrected with 4.02 first.
--
Ricardo
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#35207] [PATCH] Resurrect pplacer.
2019-04-11 12:55 ` Ricardo Wurmus
@ 2019-04-11 13:02 ` Julien Lepiller
2019-04-11 14:56 ` Ricardo Wurmus
0 siblings, 1 reply; 10+ messages in thread
From: Julien Lepiller @ 2019-04-11 13:02 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 35207
Le 11 avril 2019 14:55:44 GMT+02:00, Ricardo Wurmus <rekado@elephly.net> a écrit :
>
>Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Julien Lepiller <julien@lepiller.eu> writes:
>>
>>> What's the most recent version of ocaml pplacer can use?
>>
>> It’s actually 4.01. I don’t know how much effort it’s going to be to
>> make it work with the latest version.
>
>I gave patching pplacer a try, but in more recent versions of OCaml
>strings are byte streams, so it’s quite a bit of work to figure out
>where exactly to convert strings to byte streams and back again.
>
>I’ll keep working on this for a while, but for now I’d like to get
>pplacer resurrected with 4.02 first.
>
>--
>Ricardo
Ok, I guess it's acceptable. I'll fully review your patches later today.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#35207] [PATCH] Resurrect pplacer.
2019-04-11 13:02 ` Julien Lepiller
@ 2019-04-11 14:56 ` Ricardo Wurmus
2019-04-11 15:23 ` bug#35207: " Ricardo Wurmus
0 siblings, 1 reply; 10+ messages in thread
From: Ricardo Wurmus @ 2019-04-11 14:56 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 35207
Julien Lepiller <julien@lepiller.eu> writes:
> Le 11 avril 2019 14:55:44 GMT+02:00, Ricardo Wurmus <rekado@elephly.net> a écrit :
>>
>>Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> Julien Lepiller <julien@lepiller.eu> writes:
>>>
>>>> What's the most recent version of ocaml pplacer can use?
>>>
>>> It’s actually 4.01. I don’t know how much effort it’s going to be to
>>> make it work with the latest version.
>>
>>I gave patching pplacer a try, but in more recent versions of OCaml
>>strings are byte streams, so it’s quite a bit of work to figure out
>>where exactly to convert strings to byte streams and back again.
>>
>>I’ll keep working on this for a while, but for now I’d like to get
>>pplacer resurrected with 4.02 first.
>>
>>--
>>Ricardo
>
> Ok, I guess it's acceptable. I'll fully review your patches later today.
Thanks for the offer, but it won’t be necessary after all. I figured
out how to make it work with the latest OCaml. I had to also patch
ocaml-mcl, but that seems okay.
New patches coming in a few minutes!
--
Ricardo
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#35207: [PATCH] Resurrect pplacer.
2019-04-11 14:56 ` Ricardo Wurmus
@ 2019-04-11 15:23 ` Ricardo Wurmus
0 siblings, 0 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2019-04-11 15:23 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 35207-done
Ricardo Wurmus <rekado@elephly.net> writes:
> Julien Lepiller <julien@lepiller.eu> writes:
>
>> Le 11 avril 2019 14:55:44 GMT+02:00, Ricardo Wurmus <rekado@elephly.net> a écrit :
>>>
>>>Ricardo Wurmus <rekado@elephly.net> writes:
>>>
>>>> Julien Lepiller <julien@lepiller.eu> writes:
>>>>
>>>>> What's the most recent version of ocaml pplacer can use?
>>>>
>>>> It’s actually 4.01. I don’t know how much effort it’s going to be to
>>>> make it work with the latest version.
>>>
>>>I gave patching pplacer a try, but in more recent versions of OCaml
>>>strings are byte streams, so it’s quite a bit of work to figure out
>>>where exactly to convert strings to byte streams and back again.
>>>
>>>I’ll keep working on this for a while, but for now I’d like to get
>>>pplacer resurrected with 4.02 first.
>>>
>>>--
>>>Ricardo
>>
>> Ok, I guess it's acceptable. I'll fully review your patches later today.
>
> Thanks for the offer, but it won’t be necessary after all. I figured
> out how to make it work with the latest OCaml. I had to also patch
> ocaml-mcl, but that seems okay.
>
> New patches coming in a few minutes!
I pushed the new patches to the “master” branch with commit 12327d7447.
--
Ricardo
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-04-11 15:40 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-09 13:00 [bug#35207] [PATCH] Resurrect pplacer Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 1/3] gnu: Add ocaml4.02-mcl Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 2/3] gnu: Add ocaml4.02-gsl Ricardo Wurmus
2019-04-09 13:13 ` [bug#35207] [PATCH 3/3] gnu: Add pplacer Ricardo Wurmus
2019-04-09 17:12 ` [bug#35207] [PATCH] Resurrect pplacer Julien Lepiller
2019-04-09 17:41 ` Ricardo Wurmus
2019-04-11 12:55 ` Ricardo Wurmus
2019-04-11 13:02 ` Julien Lepiller
2019-04-11 14:56 ` Ricardo Wurmus
2019-04-11 15:23 ` bug#35207: " 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.