GNU bug report logs - #55615
[PATCH] gnu: Add r-pscbs.

Previous Next

Package: guix-patches;

Reported by: zimoun <zimon.toutoune <at> gmail.com>

Date: Tue, 24 May 2022 18:10:02 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55615 in the body.
You can then email your comments to 55615 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to rekado <at> elephly.net, guix-patches <at> gnu.org:
bug#55615; Package guix-patches. (Tue, 24 May 2022 18:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to zimoun <zimon.toutoune <at> gmail.com>:
New bug report received and forwarded. Copy sent to rekado <at> elephly.net, guix-patches <at> gnu.org. (Tue, 24 May 2022 18:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: zimoun <zimon.toutoune <at> gmail.com>
Subject: [PATCH] gnu: Add r-pscbs.
Date: Tue, 24 May 2022 20:08:50 +0200
* gnu/packages/bioconductor.scm (r-pscbs): New variable.
---
 gnu/packages/bioconductor.scm | 42 +++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/bioconductor.scm b/gnu/packages/bioconductor.scm
index 80cf28c954..7fed1aa18b 100644
--- a/gnu/packages/bioconductor.scm
+++ b/gnu/packages/bioconductor.scm
@@ -4560,6 +4560,48 @@ (define-public r-pcamethods
 structure (pcaRes) to provide a common interface to the PCA results.")
     (license license:gpl3+)))
 
+;; This is a CRAN package, but it depends on a Bioconductor package:
+;; r-aroma-light, r-dnacopy..
+(define-public r-pscbs
+  (package
+    (name "r-pscbs")
+    (version "0.66.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (cran-uri "PSCBS" version))
+       (sha256
+        (base32 "14rs2wywipbkia3dbzfhpnkmfgdvm2bf586lggsx63sywlv5d02q"))))
+    (properties `((upstream-name . "PSCBS")))
+    (build-system r-build-system)
+    (arguments
+     `(#:phases
+      (modify-phases %standard-phases
+          (add-before 'install 'change-home-dir
+            (lambda _
+              ;; Change from /homeless-shelter to /tmp for write permission.
+              (setenv "HOME" "/tmp"))))))
+    (propagated-inputs
+     (list r-aroma-light
+           r-dnacopy
+           r-future
+           r-listenv
+           r-matrixstats
+           r-r-cache
+           r-r-methodss3
+           r-r-oo
+           r-r-utils))
+    (native-inputs
+     (list r-r-rsp       ;used to build vignettes
+           r-r-devices))
+    (home-page "https://github.com/HenrikBengtsson/PSCBS")
+    (synopsis "Analysis of Parent-Specific DNA Copy Numbers")
+    (description
+     "Segmentation of allele-specific DNA copy number data and detection of
+regions with abnormal copy number within each parental chromosome.  Both
+tumor-normal paired and tumor-only analyses are supported.")
+    (license license:gpl2+)))
+
 (define-public r-protgenerics
   (package
     (name "r-protgenerics")

base-commit: 01793ed03e8aa0960bff7adc21fd270e1527e68e
-- 
2.36.0





Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Tue, 24 May 2022 21:30:03 GMT) Full text and rfc822 format available.

Notification sent to zimoun <zimon.toutoune <at> gmail.com>:
bug acknowledged by developer. (Tue, 24 May 2022 21:30:03 GMT) Full text and rfc822 format available.

Message #10 received at 55615-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 55615-done <at> debbugs.gnu.org
Subject: Re: [bug#55615] [PATCH] gnu: Add r-pscbs.
Date: Tue, 24 May 2022 23:29:36 +0200
zimoun <zimon.toutoune <at> gmail.com> writes:

> * gnu/packages/bioconductor.scm (r-pscbs): New variable.

Applied with formatting changes.  Thanks!

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#55615; Package guix-patches. (Wed, 25 May 2022 07:32:02 GMT) Full text and rfc822 format available.

Message #13 received at 55615-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 55615-done <at> debbugs.gnu.org
Subject: Re: [bug#55615] [PATCH] gnu: Add r-pscbs.
Date: Wed, 25 May 2022 09:31:17 +0200
Hi,

On Tue, 24 May 2022 at 23:30, Ricardo Wurmus <rekado <at> elephly.net> wrote:

> Applied with formatting changes.  Thanks!

Indeed, sorry.  I reformatted the output of "guix import" but then I
forgot to reformat again the phase modification (my bad!).  And I ran
"guix lint" which reported nothing.   But "guix style" reformats;
which I do not use (yet).

Well, it is many manual error-prone steps.  My questions are :

 1. Could we adapted "guix import cran" to output something using the
format of "guix style"?
 2. Could we add a checker in "guix lint" using "guix style" and warn?


Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#55615; Package guix-patches. (Fri, 27 May 2022 08:14:01 GMT) Full text and rfc822 format available.

Message #16 received at 55615-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 55615-done <at> debbugs.gnu.org
Subject: Re: [bug#55615] [PATCH] gnu: Add r-pscbs.
Date: Fri, 27 May 2022 10:12:51 +0200
[Message part 1 (text/plain, inline)]
zimoun <zimon.toutoune <at> gmail.com> writes:

> Hi,
>
> On Tue, 24 May 2022 at 23:30, Ricardo Wurmus <rekado <at> elephly.net> wrote:
>
>> Applied with formatting changes.  Thanks!
>
> Indeed, sorry.  I reformatted the output of "guix import" but then I
> forgot to reformat again the phase modification (my bad!).  And I ran
> "guix lint" which reported nothing.   But "guix style" reformats;
> which I do not use (yet).
>
> Well, it is many manual error-prone steps.  My questions are :
>
>  1. Could we adapted "guix import cran" to output something using the
> format of "guix style"?

How about this:

[0001-scripts-import-Use-pretty-printer-from-guix-scripts-.patch (text/x-patch, inline)]
From a10afc4c60ce734941c3c080cf13ec6636f0be33 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado <at> elephly.net>
Date: Fri, 27 May 2022 10:07:26 +0200
Subject: [PATCH] scripts/import: Use pretty printer from (guix scripts style).

* guix/scripts/import.scm (guix-import): Use pretty-print-with-comments.
(newline-rewriting-port): Remove procedure.
---
 guix/scripts/import.scm | 39 +++------------------------------------
 1 file changed, 3 insertions(+), 36 deletions(-)

diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index fa79f3211e..62aa7bdbc5 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2014 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2018 Kyle Meyer <kyle <at> kyleam.com>
-;;; Copyright © 2019 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2019, 2022 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune <at> gmail.com>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
 ;;; Copyright © 2022 Philip McGrath <philip <at> philipmcgrath.com>
@@ -25,6 +25,7 @@
 (define-module (guix scripts import)
   #:use-module (guix ui)
   #:use-module (guix scripts)
+  #:use-module (guix scripts style)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-11)
@@ -32,41 +33,9 @@ (define-module (guix scripts import)
   #:use-module (srfi srfi-37)
   #:use-module (ice-9 format)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 pretty-print)
   #:export (%standard-import-options
             guix-import))
 
-
-;;;
-;;; Helper.
-;;;
-
-(define (newline-rewriting-port output)
-  "Return an output port that rewrites strings containing the \\n escape
-to an actual newline.  This works around the behavior of `pretty-print'
-and `write', which output these as \\n instead of actual newlines,
-whereas we want the `description' field to contain actual newlines
-rather than \\n."
-  (define (write-string str)
-    (let loop ((chars (string->list str)))
-      (match chars
-        (()
-         #t)
-        ((#\\ #\n rest ...)
-         (newline output)
-         (loop rest))
-        ((chr rest ...)
-         (write-char chr output)
-         (loop rest)))))
-
-  (make-soft-port (vector (cut write-char <>)
-                          write-string
-                          (lambda _ #t)           ; flush
-                          #f
-                          (lambda _ #t)           ; close
-                          #f)
-                  "w"))
-
 
 ;;;
 ;;; Command line options.
@@ -119,9 +88,7 @@ (define-command (guix-import . args)
     ((importer args ...)
      (if (member importer importers)
          (let ((print (lambda (expr)
-                        (pretty-print expr (newline-rewriting-port
-                                            (current-output-port))
-                                      #:max-expr-width 80))))
+                        (pretty-print-with-comments (current-output-port) expr))))
            (match (apply (resolve-importer importer) args)
              ((and expr (or ('package _ ...)
                             ('let _ ...)
-- 
2.36.1

[Message part 3 (text/plain, inline)]
-- 
Ricardo

Information forwarded to guix-patches <at> gnu.org:
bug#55615; Package guix-patches. (Wed, 01 Jun 2022 09:03:02 GMT) Full text and rfc822 format available.

Message #19 received at 55615-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 55615-done <at> debbugs.gnu.org
Subject: Re: [bug#55615] [PATCH] gnu: Add r-pscbs.
Date: Wed, 1 Jun 2022 11:02:09 +0200
Hi Ricardo,

On Fri, 27 May 2022 at 10:13, Ricardo Wurmus <rekado <at> elephly.net> wrote:

> How about this:

I am late and you already applied it.  Cool!  :-)

Thanks,
simon




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 29 Jun 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 295 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.