digitalcytometry / cytospace

CytoSPACE: Optimal mapping of scRNA-seq data to spatial transcriptomics data
Other
115 stars 19 forks source link

Create releases for each version #73

Closed leej3 closed 1 year ago

leej3 commented 1 year ago

Hi, nice project! Could you create releases for the different versions please? No need to do so retrospectively but for future releases if you follow the instructions here then people wishing to package the software for conda etc. can reference specific zip/tar.gz archives.

hsjeon-k commented 1 year ago

Hi, thank you so much for the suggestion! We will start creating releases for version updates in the future. Please feel free to let us know if you have any other suggestions!

leej3 commented 1 year ago

Great thanks. Since you are making use of R the packaging is a little more complicated. Your current strategy of using setup.py to manage things and defining the R scripts should work nicely. You likely shouldn't release it on PyPI though if those R scripts are core to the functionality of the software as a user install will lack the R dependencies. You will need a language agnostic package manager for that like conda, which you have already happened upon. Currently your dependencies are pinned very precisely... ultimately you will want to handle a wider range of dependencies to be compatible with community infrastructures like conda-forge.

The end result would be that someone could run conda install -c conda-forge cytospace and have that work for a number of versions of R and Python. If you don't have the resources to sustain compatibility with multiple R versions (it can be very tricky sometimes) then you should just try to keep up with currently supported versions of R on conda-forge so that as you make new releases you will at least have your software released for at least a single version of R.

There's certainly a balance of resources to consider though. If you need to put all your energy into algorithm development keeping up with changes in the dependency stack can become too onerous. If your users are happy to install the software into it's own conda environment using an environment file that you provide then that can be a perfectly sustainable long-term solution.

If you choose to go the conda-forge route, the meta.yaml will look something like the following but until you can relax some of the version pinning (and update the base R version) you won't be able to submit it as a recipe...

{% set name = "cytospace" %}
{% set posix = 'm2-' if win else '' %}
{% set version = "1.0.3" %}
package: 

package:
  name: "{{ name|lower }}"
  version: "{{ version }}"

source:
  url: "https://github.com/digitalcytometry/{{ name }}/archive/v{{ version }}.tar.gz"
  sha256: ...

build:
  number: 0
  script: "{{ PYTHON }} -m pip install . -vv"

requirements:
  build:
    - setuptools
  host:
    - python
    - ortools-python=9.2
    - scanpy=1.9.3
    - datatable=0.11.1
    - numpy
    - lap=0.4.0
    - scipy=1.8.0
    - pip=22.0.4
    - pandas=1.4.1
    - matplotlib=3.5.1
    - r-seurat=3.2.3
    - r-spatstat=1.64-1
    - gdown=4.4.0
    - r-argparse=2.1.6
  run:
    - python
    - ortools-python=9.2
    - scanpy=1.9.3
    - datatable=0.11.1
    - numpy
    - lap=0.4.0
    - scipy=1.8.0
    - pip=22.0.4
    - pandas=1.4.1
    - matplotlib=3.5.1
    - r-seurat=3.2.3
    - r-spatstat=1.64-1
    - gdown=4.4.0
    - r-argparse=2.1.6

test:
  imports:
    - cytospace

about:
  home: "https://github.com/digitalcytometry/cytospace"
  license: Custom
  license_file: LICENSE
  summary: "CytoSPACE is a novel computational tool for assigning single-cell transcriptomes to in situ spatial transcriptomics (ST) data."
  doc_url: https://github.com/digitalcytometry/cytospace
  dev_url: https://github.com/digitalcytometry/cytospace

extra:
  recipe-maintainers:
    - conda-forge
hsjeon-k commented 1 year ago

Hi, thank you so much for your detailed input, and apologies for the delay.

For now, we may keep the current installation instructions and not extend this to Conda. Part of the reason is that we specifically chose to use an older version of an R library as it better suited the purposes of our scripts, and it might be easier for the users to keep CytoSPACE (at its current stage) inside a separate conda environment so as not to conflict with the newer versions of these libraries that they may be using for other purposes.

But if there are any difficulties or ambiguity with how the installation instructions are currently outlined, we would certainly like to improve on the process, so please let us know if you had any issues. In any case, we really appreciate your suggestions and will continue to create releases for easier reference going forward!