Skip to content

Commit

Permalink
Update usage page in documentation (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon authored Sep 16, 2024
1 parent 48448c2 commit e9ef3f5
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 16 deletions.
11 changes: 8 additions & 3 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
DEBUG=1
USE_CACHE=1
# Disable debug mode per default
DEBUG=0
# Disable cache to avoid memory issues
USE_CACHE=0
# Use the REEV API. Change it if you have other instance of REEV.
API_REEV_URL=https://reev.cubi.bihealth.org/internal/proxy
SEQREPO_DATA_DIR=/home/username/seqrepo/master
# Default path to seqrepo data for Docker. Change it to your local development path.
# It can look like this: "/home/<username>/seqrepo/master"
SEQREPO_DATA_DIR=
3 changes: 3 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
},
]
}

// chr7:155592673:A:C
// chr20:36014577:T:C
16 changes: 4 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,15 @@ RUN sed -i -e 's/if aliases_cur.fetchone() is not None/if next(aliases_cur, None
.venv/lib/python3.12/site-packages/biocommons/seqrepo/cli.py

# Set up seqrepo
RUN mkdir -p /usr/local/share/seqrepo \
&& chown -R root:root /usr/local/share/seqrepo
RUN pipenv run seqrepo init -i auto-acmg
RUN pipenv run seqrepo fetch-load -i auto-acmg -n RefSeq NC_000001.10 NC_000002.11 NC_000003.11 \
NC_000004.11 NC_000005.9 NC_000006.11 NC_000007.13 NC_000008.10 NC_000009.11 NC_000010.10 \
NC_000011.9 NC_000012.11 NC_000013.10 NC_000014.8 NC_000015.9 NC_000016.9 NC_000017.10 \
NC_000018.9 NC_000019.9 NC_000020.10 NC_000021.8 NC_000022.10 NC_000023.10 NC_000024.9 \
NC_012920.1 NC_000001.11 NC_000002.12 NC_000003.12 NC_000004.12 NC_000005.10 NC_000006.12 \
NC_000007.14 NC_000008.11 NC_000009.12 NC_000010.11 NC_000011.10 NC_000012.12 NC_000013.11 \
NC_000014.9 NC_000015.10 NC_000016.10 NC_000017.11 NC_000018.10 NC_000019.10 NC_000020.11 \
NC_000021.9 NC_000022.11 NC_000023.11 NC_000024.10 NC_012920.1
# The seqrepo data is too large to be included in the image
VOLUME /usr/local/share/seqrepo/
VOLUME /home/auto-acmg/seqrepo/master

# ----------------
# AutoACMG runtime
# ----------------

COPY . /app
COPY . /auto-acmg

CMD ["pipenv", "run", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]

Expand Down
42 changes: 41 additions & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,50 @@ containing the Dockerfile. Use the following command to build the image:
This command builds the Docker image with the tag ``auto-acmg``. You can replace ``auto-acmg`` with
any other tag suitable for your deployment or versioning schema.

Setting Up Volumes
------------------

The AutoACMG Docker container requires access to SeqRepo data directories for sequence information.
You must set up volumes that the Docker container can use to access this data without needing to
copy it into the container directly. Here's how you set up these volumes:

1. **SeqRepo Data Volume:** This volume stores the SeqRepo datasets.
2. **Custom Project Data Volume:** This volume stores the custom project seqrepo data.

Ensure these directories exist on your host and are populated with the necessary data:

.. code-block:: bash
mkdir -p /usr/local/share/seqrepo
chown -R root:root /usr/local/share/seqrepo
.. code-block:: bash
pipenv run seqrepo init -i auto-acmg
.. code-block:: bash
pipenv run seqrepo fetch-load -i auto-acmg -n RefSeq NC_000001.10 NC_000002.11 NC_000003.11 \
NC_000004.11 NC_000005.9 NC_000006.11 NC_000007.13 NC_000008.10 NC_000009.11 NC_000010.10 \
NC_000011.9 NC_000012.11 NC_000013.10 NC_000014.8 NC_000015.9 NC_000016.9 NC_000017.10 \
NC_000018.9 NC_000019.9 NC_000020.10 NC_000021.8 NC_000022.10 NC_000023.10 NC_000024.9 \
NC_012920.1 NC_000001.11 NC_000002.12 NC_000003.12 NC_000004.12 NC_000005.10 NC_000006.12 \
NC_000007.14 NC_000008.11 NC_000009.12 NC_000010.11 NC_000011.10 NC_000012.12 NC_000013.11 \
NC_000014.9 NC_000015.10 NC_000016.10 NC_000017.11 NC_000018.10 NC_000019.10 NC_000020.11 \
NC_000021.9 NC_000022.11 NC_000023.11 NC_000024.10 NC_012920.1
.. note::

The paths used in this example are for demonstration purposes! You should adjust the paths
to match your actual directory structure and ensure that the directories have the correct
permissions for Docker to access them. The ``/usr/local/share/seqrepo`` directory is the default
location for Linux systems. The ``/home/auto-acmg/seqrepo/master`` directory is an example of
a custom project data directory.

Running the Docker Image
------------------------

Once the Docker image is built, you can run it using the following command:
Once the Docker image is built, you can run it using the following command to include the volumes:

.. code-block:: bash
Expand Down

0 comments on commit e9ef3f5

Please sign in to comment.