diff --git a/docs/getversion.py b/docs/getversion.py new file mode 100644 index 000000000..115e18c61 --- /dev/null +++ b/docs/getversion.py @@ -0,0 +1,15 @@ + +def define_env(env): + + @env.macro + def spades_version(): + try: + lines = open("VERSION").readlines() + version = lines[0].strip() + # FIXME: dirty hack for current VERSION file + if version.find("dev") != -1: + version = "3.15.5" + return version + except: + return "3.15.5" + diff --git a/docs/index.md b/docs/index.md index d13467cbe..5d2150164 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,6 +9,6 @@ SPAdes package contains assembly pipelines for isolated and single-cell bacteria Additional modes allow to discover bacterial plasmids and RNA viruses, as well as perform HMM-guided assembly. Besides, SPAdes package includes supplementary tools for efficient k-mer counting and k-mer-based read filtering, assembly graph construction and simplification, sequence-to-graph alignment and metagenomic binning refinement. -SPAdes version 3.15.5 was released under GPLv2 on July 14th, 2022 and can be downloaded [here](https://github.com/ablab/spades/releases/latest/). +SPAdes version {{ spades_version() }} was released under GPLv2 on July 14th, 2022 and can be downloaded [here](https://github.com/ablab/spades/releases/latest/). The latest SPAdes paper describing various pipelines in a protocol format is available [here](https://currentprotocols.onlinelibrary.wiley.com/doi/abs/10.1002/cpbi.102). diff --git a/docs/installation.md b/docs/installation.md index 1b48ada32..c1f4e44e1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -25,12 +25,12 @@ In case of successful installation the following files will be placed in the `bi ## Downloading SPAdes Linux binaries -To download [SPAdes Linux binaries](https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5-Linux.tar.gz) and extract them, go to the directory in which you wish SPAdes to be installed and run: +To download [SPAdes Linux binaries](https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}-Linux.tar.gz) and extract them, go to the directory in which you wish SPAdes to be installed and run: ``` bash - wget https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5-Linux.tar.gz - tar -xzf SPAdes-3.15.5-Linux.tar.gz - cd SPAdes-3.15.5-Linux/bin/ + wget https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}-Linux.tar.gz + tar -xzf SPAdes-{{ spades_version() }}-Linux.tar.gz + cd SPAdes-{{ spades_version() }}-Linux/bin/ ``` In this case you do not need to run any installation scripts - SPAdes is ready to use. We also suggest adding SPAdes installation directory to the `PATH` variable. @@ -40,12 +40,12 @@ Note, that pre-build binaries do not work on new Linux kernels. ## Downloading SPAdes binaries for Mac -To obtain [SPAdes binaries for Mac](https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5-Darwin.tar.gz), go to the directory in which you wish SPAdes to be installed and run: +To obtain [SPAdes binaries for Mac](https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}-Darwin.tar.gz), go to the directory in which you wish SPAdes to be installed and run: ``` bash - curl https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5-Darwin.tar.gz - tar -zxf SPAdes-3.15.5-Darwin.tar.gz - cd SPAdes-3.15.5-Darwin/bin/ + curl https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}-Darwin.tar.gz + tar -zxf SPAdes-{{ spades_version() }}-Darwin.tar.gz + cd SPAdes-{{ spades_version() }}-Darwin/bin/ ``` Just as in Linux, SPAdes is ready to use and no further installation steps are required. We also suggest adding SPAdes installation directory to the `PATH` variable. @@ -60,12 +60,12 @@ If you wish to compile SPAdes by yourself you will need the following libraries - zlib - libbz2 -If you meet these requirements, you can download the [SPAdes source code](https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5.tar.gz): +If you meet these requirements, you can download the [SPAdes source code](https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}.tar.gz): ``` bash - wget https://github.com/ablab/spades/releases/download/v3.15.5/SPAdes-3.15.5.tar.gz - tar -xzf SPAdes-3.15.5.tar.gz - cd SPAdes-3.15.5 + wget https://github.com/ablab/spades/releases/download/v{{ spades_version() }}/SPAdes-{{ spades_version() }}.tar.gz + tar -xzf SPAdes-{{ spades_version() }}.tar.gz + cd SPAdes-{{ spades_version() }} ``` and build it with the following script: diff --git a/mkdocs.yml b/mkdocs.yml index bfd3c649a..f6d77f82f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -22,6 +22,7 @@ use_directory_urls: false theme: name: material logo: spades.png + favicon: spades.png palette: primary: white features: @@ -38,3 +39,8 @@ markdown_extensions: - pymdownx.superfences - attr_list - md_in_html + +plugins: + - macros: + module_name: docs/getversion +