Skip to content

Commit fc2ca88

Browse files
Merge pull request #48 from bioconda/recipe-docs/install
docs: improved and modernized installation instructions
2 parents aa5a327 + afda81f commit fc2ca88

2 files changed

Lines changed: 47 additions & 22 deletions

File tree

source/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To build the documentation locally, first create an environment using
44
bioconda_utils/bioconda_utils-requirements.txt.
55
6-
mamba create -p ./env --file https://raw.githubusercontent.com/bioconda/bioconda-utils/master/bioconda_utils/bioconda_utils-requirements.txt -y
6+
conda create -p ./env --file https://raw.githubusercontent.com/bioconda/bioconda-utils/master/bioconda_utils/bioconda_utils-requirements.txt -y
77
88
With that env activated, run:
99
@@ -22,6 +22,8 @@ biomedical research using the `conda <https://conda.io>`_ package manager.
2222

2323
**NOTE**: *Bioconda supports only Linux (64-bit and AArch64) and macOS (x86_64 and ARM64)*
2424

25+
.. _bioconda_setup:
26+
2527
Usage
2628
=====
2729

source/templates/readme.rst_t

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@
6060
{% endif %}
6161

6262
{% for dependency in package.depends %}
63-
:depends {{dependency[0]}}: {% if dependency[1] %}``{{ dependency[1].replace(" ", "\xa0") }}``{% endif %}
63+
:depends on {{dependency[0]}}: {% if dependency[1] %}``{{ dependency[1].replace(" ", "\xa0") }}``{% endif %}
6464
{%- endfor %}
65-
:requirements:
6665

6766
:additional platforms:
6867
{% if extra and extra['additional-platforms']|length > 0 %}
@@ -78,39 +77,63 @@
7877
</span>
7978
{% endif %}
8079

81-
.. rubric:: Installation
80+
Installation
81+
------------
8282

83-
You need a conda-compatible package manager
84-
(currently either `micromamba <https://mamba.readthedocs.io>`_, `mamba <https://mamba.readthedocs.io>`_, or `conda <https://docs.conda.io/projects/conda>`_)
85-
and the Bioconda channel already activated (see :ref:`set-up-channels`).
83+
You need a conda-compatible package manager
84+
(currently either `pixi <https://pixi.sh>`__, `conda <https://docs.conda.io/projects/conda>`__, or `micromamba <https://mamba.readthedocs.io>`__)
85+
and the Bioconda channel already activated (see :ref:`bioconda_setup`).
86+
Below, we show how to install with either pixi or conda (for micromamba and mamba, commands are essentially the same as with conda).
8687

87-
While any of above package managers is fine, it is currently recommended to use either
88-
micromamba or mamba (see `here <https://mamba.readthedocs.io>`_ for installation instructions).
89-
We will show all commands using mamba below, but the arguments are the same for the two
90-
others.
88+
Pixi
89+
""""
9190

92-
Given that you already have a conda environment in which you want to have this package, install with::
91+
With pixi_ installed and the Bioconda channel set up (see :ref:`bioconda_setup`),
92+
to install globally, run::
9393

94-
mamba install {{ package.name }}
94+
pixi global install {{ package.name }}
9595

96-
and update with::
96+
to add into an existing workspace instead, run::
9797

98-
mamba update {{ package.name }}
98+
pixi add {{ package.name }}
9999

100-
To create a new environment, run::
100+
In the latter case, make sure to first add bioconda and conda-forge to the channels considered by the workspace::
101101

102-
mamba create --name myenvname {{ package.name }}
102+
pixi workspace channel add conda-forge
103+
pixi workspace channel add bioconda
103104

104-
with ``myenvname`` being a reasonable name for the environment
105-
(see e.g. the `mamba docs <https://mamba.readthedocs.io>`_ for details and further options).
105+
Conda
106+
"""""
106107

107-
Alternatively, use the docker container::
108+
With conda_ installed and the Bioconda channel set up (see :ref:`bioconda_setup`), to install into an existing and activated environment, run::
108109

109-
docker pull quay.io/biocontainers/{{ package.name }}:<tag>
110+
conda install {{ package.name }}
110111

111-
(see `{{package.name}}/tags`_ for valid values for ``<tag>``)
112+
Alternatively, to install into a new environment, run::
112113

114+
conda create -n envname {{ package.name }}
113115

116+
with ``envname`` being the name of the desired environment.
117+
118+
Container
119+
"""""""""
120+
121+
Alternatively, every Bioconda package is available as a container image for usage with your preferred container runtime.
122+
For e.g. docker, run::
123+
124+
docker pull quay.io/biocontainers/{{ package.name }}:<tag>
125+
126+
(see `{{package.name}}/tags`_ for valid values for ``<tag>``).
127+
128+
Integrated deployment
129+
"""""""""""""""""""""
130+
131+
Finally, note that many scientific workflow management systems directly integrate both conda and container based software deployment.
132+
Thus, workflow steps can be often directly annotated to use the package, leading to automatic deployment by the respective workflow management system, thereby improving reproducibility and transparency.
133+
Check the documentation of your workflow management system to find out about the integration.
134+
135+
.. _conda: https://conda.io
136+
.. _pixi: https://pixi.sh
114137
.. |downloads_{{package.name}}| image:: https://img.shields.io/conda/dn/bioconda/{{package.name}}.svg?style=flat
115138
:target: https://anaconda.org/bioconda/{{package.name}}
116139
:alt: (downloads)

0 commit comments

Comments
 (0)