From a6e3eabeefcb9236d15871ba76605323eec66240 Mon Sep 17 00:00:00 2001 From: Sam Horsfield Date: Wed, 5 Jun 2024 08:50:31 +0100 Subject: [PATCH 1/5] Updates docs and prevents warning message with biopython --- README.md | 32 +++++++++++++++---------------- docs/installation.rst | 10 +++------- docs/quickstart.rst | 6 +----- panaroo_runner/generate_output.py | 4 ++-- 4 files changed, 21 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 44dce94..b5345a5 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,21 @@ ggCaller is available on Linux. If you are running Windows 10/11, Linux can be i We plan to get a MacOS version up and running in the future. -NOTE: We are aware of issues installing from conda at the moment. We recommend installing via docker at this time. +### Installation via conda/mamba -### Installing with Docker (recommended) +Install through [bioconda](http://bioconda.github.io/): + +```conda install ggcaller``` + +If conda is not installed, first install [miniconda](https://docs.conda.io/en/latest/miniconda.html), then add the correct channels: + +``` +conda config --add channels defaults +conda config --add channels bioconda +conda config --add channels conda-forge +``` + +### Installing with Docker First, install [Docker](https://docs.docker.com/get-docker/) for your OS. If running with WSL2, you should still download Docker Desktop for Windows. @@ -26,7 +38,7 @@ Then pull the latest image:: To run ggCaller, run:: - cd test && docker run --rm -it -v $(pwd):/workdir samhorsfield96/ggcaller:latest ggcaller --refs pneumo_CL_group2.txt + cd test && docker run --rm -it -v $(pwd):/workdir -v $(pwd):/data samhorsfield96/ggcaller:latest ggcaller --balrog-db /app/ggc_db --refs /workdir/pneumo_CL_group2_docker.txt --out /workdir/ggc_out ### Installation from source Required packages and versions can be found in ```environment_linux.yml``` and ```environment_macOS.yml``` depending on your operating system. In addition, a C++17 compiler (e.g. gcc >=7.3) is required. @@ -46,20 +58,6 @@ cd ggCaller python setup.py install ``` -### Installation via conda - -Install through [bioconda](http://bioconda.github.io/): - -```conda install ggcaller``` - -If conda is not installed, first install [miniconda](https://docs.conda.io/en/latest/miniconda.html), then add the correct channels: - -``` -conda config --add channels defaults -conda config --add channels bioconda -conda config --add channels conda-forge -``` - ## Citation Please cite the ggCaller pre-print: diff --git a/docs/installation.rst b/docs/installation.rst index 4368817..be8d0f4 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -10,18 +10,18 @@ We plan to get a MacOS version up and running in the future. (which on many default Linux installations is run using ``python3`` rather than ``python``). -Installing with Docker (recommended) +Installing with Docker ----------------------------------- First, install `Docker `_ for your OS. If running with WSL2, you should still download Docker Desktop for Windows. To use the latest image, run:: - docker pull samhorsfield96/ggcaller:master + docker pull samhorsfield96/ggcaller:latest To run ggCaller from the Docker Hub image, run:: - 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 + cd test && docker run --rm -it -v $(pwd):/workdir -v $(pwd):/data samhorsfield96/ggcaller:latest 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:: @@ -54,10 +54,6 @@ Once loaded, add the conda bin directory to your path variable and run ggCaller Installing with conda ----------------------------------- -.. important:: - We are aware of issues installing from conda at the moment. - We recommend installing from docker or source at this time. - Installing with conda is the easiest way to get ggCaller up and running, and will install all dependencies. If you do not have ``conda`` you can install it through diff --git a/docs/quickstart.rst b/docs/quickstart.rst index d17e3ca..34e70eb 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -1,10 +1,6 @@ Quickstart ================================== -.. important:: - We are aware of issues installing from conda version at the moment. - We recommend installing via Docker at this time. - Installation ------------ @@ -45,7 +41,7 @@ To run ggCaller with just reads:: 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 -v :/data samhorsfield96/ggcaller:master ggcaller --balrog-db /app/ggc_db --refs /workdir/input_docker.txt --out /workdir/output_path + docker run --rm -it -v $(pwd):/workdir -v :/data samhorsfield96/ggcaller:latest 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/panaroo_runner/generate_output.py b/panaroo_runner/generate_output.py index 8cb2b7c..fade936 100644 --- a/panaroo_runner/generate_output.py +++ b/panaroo_runner/generate_output.py @@ -340,8 +340,8 @@ def generate_GFF(graph, high_scoring_ORFs, input_colours, isolate_names, contig_ .replace(";", " ")], } feature = SeqFeature( - FeatureLocation(entry[1][0][0], entry[1][0][1]), - type="CDS", strand=strand, qualifiers=qualifiers + FeatureLocation(entry[1][0][0], entry[1][0][1], strand=strand), + type="CDS", qualifiers=qualifiers ) gff_record.features.append(feature) entry_ID += 1 From fa773f0c39fff2c98a2b3685c711f3cad2182f55 Mon Sep 17 00:00:00 2001 From: Sam Horsfield Date: Wed, 5 Jun 2024 08:55:03 +0100 Subject: [PATCH 2/5] updates ggCaller version --- ggCaller/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggCaller/__init__.py b/ggCaller/__init__.py index 1bd017c..8893bbb 100644 --- a/ggCaller/__init__.py +++ b/ggCaller/__init__.py @@ -2,4 +2,4 @@ '''ggCaller: a gene caller for Bifrost graphs''' -__version__ = '1.3.5' +__version__ = '1.3.6' From dc1eead8e000a788bf67b6f2e6c0bcf2bd1e831a Mon Sep 17 00:00:00 2001 From: Sam Horsfield Date: Wed, 5 Jun 2024 10:15:38 +0100 Subject: [PATCH 3/5] Updates .readthedocs.yaml --- .readthedocs.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a85f0f5..cbcfde6 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,6 +12,12 @@ sphinx: # Optionally build your docs in additional formats such as PDF and ePub formats: all +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.8" + # Optionally set the version of Python and requirements required to build your docs python: version: 3.8 From 6197b4082ae72e7785d4e61428425734e2719808 Mon Sep 17 00:00:00 2001 From: Sam Horsfield Date: Wed, 5 Jun 2024 10:16:58 +0100 Subject: [PATCH 4/5] Updates .readthedocs.yaml --- .readthedocs.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index cbcfde6..5b14207 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -14,9 +14,9 @@ formats: all # Set the OS, Python version and other tools you might need build: - os: ubuntu-22.04 - tools: - python: "3.8" + os: ubuntu-22.04 + tools: + python: "3.8" # Optionally set the version of Python and requirements required to build your docs python: From d09e50128de2ea7068ce00bdc88301feeeaaf31b Mon Sep 17 00:00:00 2001 From: Sam Horsfield Date: Wed, 5 Jun 2024 10:34:28 +0100 Subject: [PATCH 5/5] Updates with --balrog-db path specification --- docs/advanced.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/advanced.rst b/docs/advanced.rst index 881dfda..7612fd0 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -8,6 +8,7 @@ Input/output - ``--kmer``: value of k used to build Bifrost DBG (Default and max value = 31). - ``--all-seq-in-graph``: Output gene graph GML file with all DNA and amino acid sequences. Off by default due to large file size. +- ``--balrog-db``: Path to an existing download of the balrog annotation database. If this does not exist, downloaded and placed in path for future use. Traversal and gene-calling cut-off settings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^