Olink-Proteomics/OlinkRPackage

Packaging for conda?

abiddanda54gene opened this issue · 7 comments

Is there any potential of this package to be distributed via a conda channel for packaging?

It is possible to run:

conda install conda-build
conda skeleton cran OlinkAnalyze
conda build r-olinkanalyze -c r -c bioconda -c conda-forge
conda install  r-olinkanalyze -c local -c r -c bioconda -c conda-forge

and build the package (albeit after a very long time), but it would save a lot of time (and fiddling with environments) if this was included in an olink conda channel even. If possible this would be a great addition for accessibility!

I should note that currently this effort fails on conda without some modification of the meta.yaml file:

  • removing r-dplyr -> r-tidyverse
  • pinning r-base=4.1.3 (because OLinkAnalyze will not work on any version prior to this).

This is important because it affects how conda users might use the package within pipelines and for automated report generation as well.

Dear @abiddanda54gene,

thank you for your suggestion and the details on changes to the template to get the package build successfully. We are looking into adding OlinkAnalyze to conda forge but currently there is no set timeline for this.
Could you share some more details about your use case? Are you using OlinkAnalyze in some form of workflow orchestration tool (e.g. Snakemake) or is this mostly about version handling in your environment?

Best regards,
Pascal

Hi @AskPascal,

Thanks very much for the kind reply. For the time being I have just created a conda environment using the following yaml:



name: olink-analyze
channels:
  - r
  - conda-forge
  - bioconda
dependencies:
  - r-base=4.1.3
  - r-broom
  - r-car
  - r-tidyverse
  - r-emmeans
  - r-forcats
  - r-generics
  - r-ggplot2
  - r-ggpubr
  - r-ggrepel
  - r-lme4
  - r-lmertest
  - r-magrittr
  - r-readxl
  - r-rlang
  - r-stringr
  - r-tibble
  - r-tidyr
  - r-tidyselect

and then within the first script calling:

if ("OlinkAnalyze" %in% rownames(installed.packages()) == FALSE) {
  install.packages("OlinkAnalyze", repos = c("http://cran.us.r-project.org"))
}

I am indeed working on applying some of the functions within a snakemake workflow and I suspect that for high-throughput pipeline development others might want to have the same stability as well. I am happy to fiddle on my end and see if I might be able to get a recipe that works well out of the box and share with you for upload to conda-forge within the next day or two. It would certainly help with environment management for other users of the software as well.

Hej @abiddanda54gene

I was looking a little closer into this from our end during the day and I have come a decent step towards a conda-forge submission. So, conda packaging might actually happen rather soon. This will obviously also make it even easier to build e.g. docker containers but that might be further down the line.

For snakemake and version freeze in an environment conda (or renv) should however be sufficient and your usecase would be covered by a conda forge package, right?

Hi @AskPascal,

That's great to hear! Yeah if there is a command like conda install -c r -c conda-forge r-olinkanalyze that should be sufficient for all of my usecases that I imagine.

I'm happy to test this out as well. Thanks for the prompt answer!

Now OlinkAnalyze 3.0.0 is available through conda-forge.

A new enironment containing OlinkAnalyze can be created with

conda create -n OlinkAnalyze -c conda-forge r-olinkanalyze

Amazing - thanks @AskPascal!