unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gábor Boskovits" <boskovits@gmail.com>
To: "Asfaw, Nardos" <nasfaw@iu.edu>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: [External] Re: New outreachy participant introduction
Date: Wed, 16 Oct 2019 10:00:14 +0200	[thread overview]
Message-ID: <CAE4v=pjAVbcmOfYMjBRPXAZ3JeVaVdWvTjSeLdbWZ9NWGPAxRg@mail.gmail.com> (raw)
In-Reply-To: <1570927278147.77440@iu.edu>

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

Hello Nardos,

We have not heard from you for a while. Should you need any help, please
feel free to reach out to us.

Asfaw, Nardos <nasfaw@iu.edu> ezt írta (időpont: 2019. okt. 13., Vas 2:41):

> Thank you Zimon.
>
> This has been very helpful.
> ________________________________________
> From: zimoun <zimon.toutoune@gmail.com>
> Sent: Tuesday, October 8, 2019 9:24 AM
> To: Christopher Baines
> Cc: Asfaw, Nardos; Guix Devel
> Subject: Re: [External] Re: New outreachy participant introduction
>
> Hi Nardos,
>
> Welcome ! :-)
>
>
> On Tue, 8 Oct 2019 at 08:48, Christopher Baines <mail@cbaines.net> wrote:
>
> > One good starting point would be an importer, there are a set of
> > importers included in Guix that take a package definition from somewhere
> > else (like the Python package index, or Rubygems) and try to generate a
> > Guix package definition. If you're familiar with some packages from one
> > of the collections with a corresponding importer, that might be a good
> > place to start.
>
> As an example, let consider packages from BioConductor [1] (mainly R
> packages used in bioinformatics field). If I have right, then 2002
> packages are still missing in Guix, so there is materials. ;-)
>
> Well, let's pick one which is not packaged yet: zinbwave [2]. Then it is
> easy:
>
>   guix import cran -r -a bioconductor zinbwave
>
> This will download TAR archives and automatically compute the hash. It
> corresponds to the manual:
>
>   guix download
>
> https://bioconductor.org/packages/release/bioc/src/contrib/zinbwave_1.6.0.tar.gz
>
>
> [1] https://bioconductor.org/
> [2] https://bioconductor.org/packages/release/bioc/html/zinbwave.html
>
>
> Moreover, the importer provides the definition of the package:
>
> --8<---------------cut here---------------start------------->8---
> (define-public r-zinbwave
>   (package
>     (name "r-zinbwave")
>     (version "1.6.0")
>     (source
>       (origin
>         (method url-fetch)
>         (uri (bioconductor-uri "zinbwave" version))
>         (sha256
>           (base32
>             "187r7l9jf2q74qaqx63df5zx6iphmvl817448balvfv9vqyhrp2j"))))
>     (properties `((upstream-name . "zinbwave")))
>     (build-system r-build-system)
>     (propagated-inputs
>       `(("r-biocparallel" ,r-biocparallel)
>         ("r-copula" ,r-copula)
>         ("r-edger" ,r-edger)
>         ("r-genefilter" ,r-genefilter)
>         ("r-glmnet" ,r-glmnet)
>         ("r-matrix" ,r-matrix)
>         ("r-singlecellexperiment"
>          ,r-singlecellexperiment)
>         ("r-softimpute" ,r-softimpute)
>         ("r-summarizedexperiment"
>          ,r-summarizedexperiment)))
>     (home-page
>       "https://bioconductor.org/packages/zinbwave")
>     (synopsis
>       "Zero-Inflated Negative Binomial Model for RNA-Seq Data")
>     (description
>       " Implements a general and flexible zero-inflated negative
> binomial model that can be used to provide a low-dimensional
> representations of single-cell RNA-seq data.  The model accounts for
> zero inflation (dropouts), over-dispersion, and the count nature of
> the data.  The model also accounts for the difference in library sizes
> and optionally for batch effects and/or other covariates, avoiding the
> need for pre-normalize the data.")
>     (license artistic2.0)))
> --8<---------------cut here---------------end--------------->8---
>
> In the propagated input, you can see the package `r-copula` which is
> not yet packaged neither. But, the nice option --recursive does the
> job for you and it also gives you the package definition.
>
> Now, let add them to the Guix source. Clone the repo and go in the
> folder. The command:
>
>   guix environment guix
>
> will download the dependencies to build Guix and setup all the
> variables correctly. Well, refer to the documentation to compile Guix
> from source. Basically:
>
>   ./bootstrap
>   ./configure --localstatedir=/var
>   make
>
> Now, you can run this version with ./pre-inst-env, for example:
>
>    ./pre-inst-env guix describe
>
>
> Well, ready to add one package! For example, add `r-copula` to the
> file gnu/package/cran.scm then recompile with make. Check if it is ok:
>
>   ./pre-inst-env guile show r-copula
>
> Ouch! `r-psline` is missing so let also add it (the definition was
> provided by the importer), run make again. Now "./pre-inst-env guix
> show r-copula" should work.
> Add the package definition of zinbwave to the file
> gnu/package/bioconductor.scm.
>
> Let build them:
>
>   ./pre-inst-env guix build r-zinbwave
>
> and time to breath. ;-)
>
>
> If something fails, try to investigate by yourself and do not hesitate
> to ask advices or help.
> If everything is ok, the package still needs some polishing: synopsis,
> description, indentation, etc and really important: check the license
> field.
>
> The next step is to commit the changes. In this case, three commits
> (one per package) seem nice. Give a look to previous commits as
> example of commit message (ChangeLog format, etc.). Now, it is time to
> prepare the submission:
>
>   git format-patch --cover-letter - o patches master
>
> this will create the 3 patches in the folder patches/ and one cover
> letter. Edit the cover letter to describe what the patches are about
> then submit it to the bug tracker:
>
>   git send-email --to=guix-patches@gnu.org patches/0000-cover-letter.patch
>
> Wait the answer to the bug tracker.
> You should receive an email (if your .gitconfig is ok) with the bug
> number. Last submit the patches:
>
>   git send-email --to=ABCDEF@debbugs.gnu.org patches/000{1,2,3}-*
>
> where ABCDEF is the bug number.
>
>
>
> Well, if you need some inspiration to find unpackaged tools from
> BioConductor:
>
>   wget https://git.bioconductor.org -qO - | sed -ne
> '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest
>   ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm
> bioc_manifest
>
> where the file `missing-bioconductor.scm` is given by:
>
> --8<---------------cut here---------------start------------->8---
> (use-modules ((guix import utils) #:select (guix-name))
>              (gnu packages)
>              (srfi srfi-1)  ;lists
>              (ice-9 textual-ports))
>
> (define (fetch-names manifest)
>   "Return a list of strings, each corresponding to a name from the
> input file MANIFEST."
>   (call-with-input-file manifest
>     (lambda (port)
>       (let loop ((lines '())
>                  (line (get-line port)))
>         (if (eof-object? line)
>             (reverse lines)
>             (loop (cons line lines)
>                   (get-line port)))))))
>
> ;;; Start!
>
> (map (lambda (name)
>        (when (null? (find-packages-by-name (guix-name "r-" name)))
>          (begin
>            (display name)
>            (newline))))
>      (fetch-names (cadr (command-line))))
>
> ;; wget https://git.bioconductor.org -qO - | sed -ne
> '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest
> ;; ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm
> bioc_manifest
> --8<---------------cut here---------------end--------------->8---
>
>
> Hope that help.
>
> All the best,
> simon
>
>

[-- Attachment #2: Type: text/html, Size: 9508 bytes --]

  reply	other threads:[~2019-10-16  8:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 16:11 New outreachy participant introduction Asfaw, Nardos
2019-10-03 17:29 ` Christopher Baines
2019-10-03 19:18 ` Gábor Boskovits
2019-10-05  9:28   ` Gábor Boskovits
2019-10-08  3:23     ` [External] " Asfaw, Nardos
2019-10-08  6:48       ` Christopher Baines
2019-10-08 13:24         ` zimoun
2019-10-13  0:41           ` Asfaw, Nardos
2019-10-16  8:00             ` Gábor Boskovits [this message]
2019-10-16 14:16               ` Asfaw, Nardos
2019-10-19 20:33                 ` Ludovic Courtès
2019-10-24 12:51                 ` Gábor Boskovits
2019-10-04 18:50 ` Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAE4v=pjAVbcmOfYMjBRPXAZ3JeVaVdWvTjSeLdbWZ9NWGPAxRg@mail.gmail.com' \
    --to=boskovits@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=nasfaw@iu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).