diff --git a/docs/index.rst b/docs/index.rst index 34be8ae..7fae029 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,5 +12,6 @@ Documentation Contents .. toctree:: :maxdepth: 2 + install.rst api.rst diff --git a/docs/install.rst b/docs/install.rst new file mode 100644 index 0000000..f2dd1a5 --- /dev/null +++ b/docs/install.rst @@ -0,0 +1,43 @@ +============ +Installation +============ + +1. Clone the :code:`pybwa` repo (note the :code:`--recurse-submodules` flag, as :code:`bwa` is a submodule) + +.. code-block:: bash + + git clone --recurse-submodules https://github.com/fulcrumgenomics/pybwa + +2. Install the environment manager :code:`mamba` +3. Install the Python build tool :code:`poetry` + +4. Create an environment with Python, Cython, and Pysam: + +.. code-block:: bash + + mamba env create -f pybwa.yml + +5. Activate the environment: + +.. code-block:: bash + + mamba activate pybwa + +6. Configure poetry to install into pre-existing virtual environments: + +.. code-block:: bash + + poetry config virtualenvs.create false + +7. Install :code:`pybwa` into the virtual environment: + +.. code-block:: bash + + poetry install + +8. Check your build: + +.. code-block:: bash + + poetry run pytest +