diff --git a/docs/installation.rst b/docs/installation.rst index 1ad4e69..4368817 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -17,11 +17,11 @@ First, install `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:: @@ -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 ----------------------------------- diff --git a/docs/quickstart.rst b/docs/quickstart.rst index b1611b8..d17e3ca 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -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 ------------------ @@ -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 :/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 diff --git a/test/pneumo_CL_group2_docker.txt b/test/pneumo_CL_group2_docker.txt new file mode 100644 index 0000000..a0f68a7 --- /dev/null +++ b/test/pneumo_CL_group2_docker.txt @@ -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