Skip to content

Commit

Permalink
Adds docs for docker installation
Browse files Browse the repository at this point in the history
  • Loading branch information
samhorsfield96 committed May 30, 2024
1 parent e13ed1b commit 6ab1bb8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ First, install `Docker <https://docs.docker.com/get-docker/>`_ for your OS. If r

To use the latest image, run::

docker pull samhorsfield96/ggcaller:latest
docker pull samhorsfield96/ggcaller:master

To run ggCaller from the Docker Hub image, run::

cd test && docker run --rm -it -v $(pwd):/workdir samhorsfield96/ggcaller:latest ggcaller --refs pneumo_CL_group2.txt --balrog-db ggc_db
cd test && docker run --rm -it -v $(pwd):/workdir -v $(pwd):/data samhorsfield96/ggcaller:master ggcaller --balrog-db /app/ggc_db --refs /workdir/pneumo_CL_group2_docker.txt --out /workdir/ggc_out

You can also build the image yourself. First download and switch to the ggCaller repository::

Expand All @@ -33,9 +33,9 @@ Finally, build with Docker. This should take between 5-10 minutes to fully insta

To run ggCaller from a local Docker build, run::

cd test && docker run --rm -it -v $(pwd):/workdir ggc_env:latest ggcaller --refs pneumo_CL_group2.txt --balrog-db ggc_db
cd test && docker run --rm -it -v $(pwd):/workdir -v $(pwd):/data ggc_env:latest ggcaller --balrog-db /app/ggc_db --refs /workdir/pneumo_CL_group2_docker.txt --out /workdir/ggc_out

Please ensure you keep ``--balrog-db ggc_db`` as specified above in all cases.
Please ensure you keep ``--balrog-db /app/ggc_db`` and ``/workdir`` paths as specified above.

Installing with singularity
-----------------------------------
Expand Down
10 changes: 7 additions & 3 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ Place all of your samples to be analysed in the same directory. Then navigate in

If using Docker, instead navigate to the directory containing the fasta files and run the below command, to ensure file paths are relative (the docker version will not work with absolute paths)::

ls -d -1 *.fasta > input.txt
ls -d -1 *.fasta > input_docker.txt

Then, append the prefix ``/data/`` to each line to enable ggCaller to find the files::

sed -i -e 's|^|/data/|' input_docker.txt

Running ggCaller
------------------
Expand All @@ -39,9 +43,9 @@ To run ggCaller with just reads::

ggcaller --reads input.txt --out output_path

If using Docker, run with the below command, ensuring you keep ``--balrog-db ggc_db`` as specified below. You must ensure all paths are relative, including in ``input.txt``::
If using Docker, run with the below command, ensuring you keep ``--balrog-db /app/ggc_db`` and ``/workdir`` paths as specified below. Replace ``path to files`` with the absolute path to the directory of files in ``input_docker.txt``::

docker run --rm -it -v $(pwd):/workdir samhorsfield96/ggcaller:latest ggcaller --balrog-db ggc_db --refs input.txt --out output_path
docker run --rm -it -v $(pwd):/workdir -v <path to files>:/data samhorsfield96/ggcaller:master ggcaller --balrog-db /app/ggc_db --refs /workdir/input_docker.txt --out /workdir/output_path

.. important::
We haven't extensively tested calling genes within
Expand Down
5 changes: 5 additions & 0 deletions test/pneumo_CL_group2_docker.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/data/CR931658_Streptococcus_pneumoniae_strain_559_66_serotype_12a.fa
/data/CR931659_Streptococcus_pneumoniae_strain_Gambia_1_81_serotype_12b.fa
/data/CR931660_Streptococcus_pneumoniae_strain_6312_serotype_12f.fa
/data/CR931717_Streptococcus_pneumoniae_strain_Hammer_serotype_44.fa
/data/CR931719_Streptococcus_pneumoniae_strain_Eddy_nr._73_serotype_46.fa

0 comments on commit 6ab1bb8

Please sign in to comment.