sequana-multitax


Namesequana-multitax JSON
Version 0.12.1 PyPI version JSON
download
home_pagehttps://github.com/sequana/multitax
SummaryA multi-sample and multi-databases taxonomic analysis using Kraken
upload_time2023-12-04 23:52:30
maintainer
docs_urlNone
authorSequana Team
requires_python>=3.8,<4.0
licenseBSD-3
keywords snakemake ngs sequana taxonomy kraken
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
.. image:: https://badge.fury.io/py/sequana-multitax.svg
     :target: https://pypi.python.org/pypi/sequana_multitax


.. image:: https://github.com/sequana/multitax/actions/workflows/main.yml/badge.svg
   :target: https://github.com/sequana/multitax/actions/workflows/main.yaml 

.. image:: https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C3.10-blue.svg
    :target: https://pypi.python.org/pypi/sequana
    :alt: Python 3.8 | 3.9 | 3.10

.. image:: http://joss.theoj.org/papers/10.21105/joss.00352/status.svg
    :target: http://joss.theoj.org/papers/10.21105/joss.00352
    :alt: JOSS (journal of open source software) DOI

This is is the **multitax** pipeline from the `Sequana <https://sequana.readthedocs.org>`_ project

:Overview: Runs taxonomic analysis on a set of samples using sequana_taxonomy (kraken behing the scene)
:Input: A set of Fastq files
:Output: HTML report for each sample and a summary HTML report for all samples.
:Status: Production
:Citation: Cokelaer et al, (2017), ‘Sequana’: a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI doi:10.21105/joss.00352


Installation
~~~~~~~~~~~~

If you already have all requirements, you can install the packages using pip::

    pip install sequana_multitax --upgrade


Usage
~~~~~

In order to use this pipeline, you will need Kraken databases. Please see Kraken pages for help.

We will also need a taxonomic databases. In principle this pipeline will download the file in your home, in 
/home/user/.config/sequana/taxonomy.dat one for all. Note, that with singularity, this file will be downloaded locally in your working directory for each analysis,except if it is found in your home, in which case a simple copy is performed.

::

    sequana_multitax --help
    sequana_multitax --input-directory DATAPATH  --databases toydb

For the database, you will need to provide your own databases. You can check out
the documentation of kraken. The toydb here above is shipped with sequana and
should work for demo. See sequana_taxonomy standalone for more help and
information. You can also checkout the sequana documentation (kraken module).


The Kraken final report and blast analysis (if set) will need a taxonomic file
stored in the sequana config directory (HOME/.config/sequana/taxonomy.dat). If
not already done, type this command::

    sequana_multitax --update-taxonomy

You may need to call this command from time to time if unknown taxon appears in
the HTML reports.


This creates a directory with the pipeline and configuration file. You will then need 
to execute the pipeline::

    cd multitax
    sh multitax.sh  # for a local run

This launch a snakemake pipeline. If you are familiar with snakemake, you can 
retrieve the pipeline itself and its configuration files and then execute the pipeline yourself with specific parameters::

    snakemake -s multitax.rules -c config.yaml --cores 4 --stats stats.txt

Or use `sequanix <https://sequana.readthedocs.io/en/main/sequanix.html>`_ interface.


Usage with singularity::
~~~~~~~~~~~~~~~~~~~~~~~~~

With singularity, initiate the working directory as follows::

    sequana_multitax --use-singularity ...

Images are downloaded in the working directory but you can store then in a directory globally (e.g.)::

    sequana_multitax --use-singularity --singularity-prefix ~/.sequana/apptainers

and then::

    cd multitax
    sh multitax.sh

if you decide to use snakemake manually, do not forget to add singularity options::

    snakemake -s multitax.rules -c config.yaml --cores 4 --stats stats.txt --use-singularity --singularity-prefix ~/.sequana/apptainers --singularity-args "-B /home:/home"


Requirements
~~~~~~~~~~~~

This pipelines requires the following executable(s):

- kraken2
- sequana_taxonomy
- krona


.. image:: https://raw.githubusercontent.com/sequana/multitax/main/sequana_pipelines/multitax/dag.png

You can download databases from kraken website. We provide some databases on
https://github.com/sequana/resources. You can download a toy database as follows::

    sequana_taxonomy --download toydb

The first time, a taxonomic database will be downloaded and stored locally in
.config/sequana/taxonomy.dat file. You can update it from time to time using::

    sequana_taxonomy --update-taxonomy


Details
~~~~~~~~~

This pipeline runs **sequana_taxonomy** (based on kraken) in parallel on the input fastq files (paired or not). 
A brief sequana summary report is also produced. For each sample, a HTML page is
reported with the following kind of image. This pie chart is a static image
summarizing the species found in your sample. Unclassified reads are in grey.
Colors correspond to a kingdom (green for viruses). If you click on the image,
you will be redirect to a more precise pie chart base on Krona pie chart, which
is more interactive.

.. image:: https://raw.githubusercontent.com/sequana/multitax/main/doc/images/piechart.png

The analysis is enterily based on Kraken tool. If several databases are
provided, they are run sequentially. This requires a careful interpretation of
the results. Indeed analysing data with viruses then bacteria may give different
results as compare to analysing with bacteria then viruses. 


Rules and configuration details
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Here is the `latest documented configuration file <https://raw.githubusercontent.com/sequana/multitax/main/sequana_pipelines/multitax/config.yaml>`_
to be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file. 

Changelog
~~~~~~~~~

========= ====================================================================
Version   Description
========= ====================================================================
0.12.0    * Refactor to use new Click framework
0.11.1    * add missing import in the main script
          * add wrapper version in config
0.11.0    * use latest wrappers and graphivz apptainer
          * create and use a sequana-wrappers for the sequana_taxonomy ruke
          * fix type when downloading taxonomy.dat
0.10.2    * add singularity containers
0.10.1    * fix blast run when no taxid is found and HTML report
0.10.0    * uses new sequana wrappers and framework
          * add ability to run blast on unclassified reads
          * handle case of empty FastQ files
0.9.2     * add --update-taxonomy DB option
          * add --store-unclassified option
0.9.1     * fix a logger issue 
0.9.0     * fix plot summary dbs (sample names). Add options in schema+config
            file to tune the image if required.
          * HTML now includes links towards data that generates the top plots
          * fix case where zero sequences are found
          * check existence of input databases
          * add the --run argument
          * add multitax version in the header
          * add search box (Sequana feature) in the CSV tables
0.8.7     * Update HTML report: fix the title of images. include table with DB
            proportion. Text to explain images and reports
0.8.6     * A better report with new features from sequana.taxonomy
0.8.5     * fix typo in doc, factorise multiqc rule
0.8.4     * implement the --from-project option
0.8.3     * add the confidence option in sequana_taxonomy rule
          * improve html report
          * uses new sequana framework to speed up --help calls
0.8.2     * less stringent on requirements (mode warning)  
          * fix input of the multiqc rule
0.8.1     Fix requirements.
0.8.0     **First release.**
========= ====================================================================



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sequana/multitax",
    "name": "sequana-multitax",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "snakemake,NGS,sequana,taxonomy,kraken",
    "author": "Sequana Team",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ea/fb/1362cd39e3571cf0645fc73bbdd6bf1acfc33ee5e662b772ff7c385c5916/sequana_multitax-0.12.1.tar.gz",
    "platform": null,
    "description": "\n.. image:: https://badge.fury.io/py/sequana-multitax.svg\n     :target: https://pypi.python.org/pypi/sequana_multitax\n\n\n.. image:: https://github.com/sequana/multitax/actions/workflows/main.yml/badge.svg\n   :target: https://github.com/sequana/multitax/actions/workflows/main.yaml \n\n.. image:: https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C3.10-blue.svg\n    :target: https://pypi.python.org/pypi/sequana\n    :alt: Python 3.8 | 3.9 | 3.10\n\n.. image:: http://joss.theoj.org/papers/10.21105/joss.00352/status.svg\n    :target: http://joss.theoj.org/papers/10.21105/joss.00352\n    :alt: JOSS (journal of open source software) DOI\n\nThis is is the **multitax** pipeline from the `Sequana <https://sequana.readthedocs.org>`_ project\n\n:Overview: Runs taxonomic analysis on a set of samples using sequana_taxonomy (kraken behing the scene)\n:Input: A set of Fastq files\n:Output: HTML report for each sample and a summary HTML report for all samples.\n:Status: Production\n:Citation: Cokelaer et al, (2017), \u2018Sequana\u2019: a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI doi:10.21105/joss.00352\n\n\nInstallation\n~~~~~~~~~~~~\n\nIf you already have all requirements, you can install the packages using pip::\n\n    pip install sequana_multitax --upgrade\n\n\nUsage\n~~~~~\n\nIn order to use this pipeline, you will need Kraken databases. Please see Kraken pages for help.\n\nWe will also need a taxonomic databases. In principle this pipeline will download the file in your home, in \n/home/user/.config/sequana/taxonomy.dat one for all. Note, that with singularity, this file will be downloaded locally in your working directory for each analysis,except if it is found in your home, in which case a simple copy is performed.\n\n::\n\n    sequana_multitax --help\n    sequana_multitax --input-directory DATAPATH  --databases toydb\n\nFor the database, you will need to provide your own databases. You can check out\nthe documentation of kraken. The toydb here above is shipped with sequana and\nshould work for demo. See sequana_taxonomy standalone for more help and\ninformation. You can also checkout the sequana documentation (kraken module).\n\n\nThe Kraken final report and blast analysis (if set) will need a taxonomic file\nstored in the sequana config directory (HOME/.config/sequana/taxonomy.dat). If\nnot already done, type this command::\n\n    sequana_multitax --update-taxonomy\n\nYou may need to call this command from time to time if unknown taxon appears in\nthe HTML reports.\n\n\nThis creates a directory with the pipeline and configuration file. You will then need \nto execute the pipeline::\n\n    cd multitax\n    sh multitax.sh  # for a local run\n\nThis launch a snakemake pipeline. If you are familiar with snakemake, you can \nretrieve the pipeline itself and its configuration files and then execute the pipeline yourself with specific parameters::\n\n    snakemake -s multitax.rules -c config.yaml --cores 4 --stats stats.txt\n\nOr use `sequanix <https://sequana.readthedocs.io/en/main/sequanix.html>`_ interface.\n\n\nUsage with singularity::\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWith singularity, initiate the working directory as follows::\n\n    sequana_multitax --use-singularity ...\n\nImages are downloaded in the working directory but you can store then in a directory globally (e.g.)::\n\n    sequana_multitax --use-singularity --singularity-prefix ~/.sequana/apptainers\n\nand then::\n\n    cd multitax\n    sh multitax.sh\n\nif you decide to use snakemake manually, do not forget to add singularity options::\n\n    snakemake -s multitax.rules -c config.yaml --cores 4 --stats stats.txt --use-singularity --singularity-prefix ~/.sequana/apptainers --singularity-args \"-B /home:/home\"\n\n\nRequirements\n~~~~~~~~~~~~\n\nThis pipelines requires the following executable(s):\n\n- kraken2\n- sequana_taxonomy\n- krona\n\n\n.. image:: https://raw.githubusercontent.com/sequana/multitax/main/sequana_pipelines/multitax/dag.png\n\nYou can download databases from kraken website. We provide some databases on\nhttps://github.com/sequana/resources. You can download a toy database as follows::\n\n    sequana_taxonomy --download toydb\n\nThe first time, a taxonomic database will be downloaded and stored locally in\n.config/sequana/taxonomy.dat file. You can update it from time to time using::\n\n    sequana_taxonomy --update-taxonomy\n\n\nDetails\n~~~~~~~~~\n\nThis pipeline runs **sequana_taxonomy** (based on kraken) in parallel on the input fastq files (paired or not). \nA brief sequana summary report is also produced. For each sample, a HTML page is\nreported with the following kind of image. This pie chart is a static image\nsummarizing the species found in your sample. Unclassified reads are in grey.\nColors correspond to a kingdom (green for viruses). If you click on the image,\nyou will be redirect to a more precise pie chart base on Krona pie chart, which\nis more interactive.\n\n.. image:: https://raw.githubusercontent.com/sequana/multitax/main/doc/images/piechart.png\n\nThe analysis is enterily based on Kraken tool. If several databases are\nprovided, they are run sequentially. This requires a careful interpretation of\nthe results. Indeed analysing data with viruses then bacteria may give different\nresults as compare to analysing with bacteria then viruses. \n\n\nRules and configuration details\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nHere is the `latest documented configuration file <https://raw.githubusercontent.com/sequana/multitax/main/sequana_pipelines/multitax/config.yaml>`_\nto be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file. \n\nChangelog\n~~~~~~~~~\n\n========= ====================================================================\nVersion   Description\n========= ====================================================================\n0.12.0    * Refactor to use new Click framework\n0.11.1    * add missing import in the main script\n          * add wrapper version in config\n0.11.0    * use latest wrappers and graphivz apptainer\n          * create and use a sequana-wrappers for the sequana_taxonomy ruke\n          * fix type when downloading taxonomy.dat\n0.10.2    * add singularity containers\n0.10.1    * fix blast run when no taxid is found and HTML report\n0.10.0    * uses new sequana wrappers and framework\n          * add ability to run blast on unclassified reads\n          * handle case of empty FastQ files\n0.9.2     * add --update-taxonomy DB option\n          * add --store-unclassified option\n0.9.1     * fix a logger issue \n0.9.0     * fix plot summary dbs (sample names). Add options in schema+config\n            file to tune the image if required.\n          * HTML now includes links towards data that generates the top plots\n          * fix case where zero sequences are found\n          * check existence of input databases\n          * add the --run argument\n          * add multitax version in the header\n          * add search box (Sequana feature) in the CSV tables\n0.8.7     * Update HTML report: fix the title of images. include table with DB\n            proportion. Text to explain images and reports\n0.8.6     * A better report with new features from sequana.taxonomy\n0.8.5     * fix typo in doc, factorise multiqc rule\n0.8.4     * implement the --from-project option\n0.8.3     * add the confidence option in sequana_taxonomy rule\n          * improve html report\n          * uses new sequana framework to speed up --help calls\n0.8.2     * less stringent on requirements (mode warning)  \n          * fix input of the multiqc rule\n0.8.1     Fix requirements.\n0.8.0     **First release.**\n========= ====================================================================\n\n\n",
    "bugtrack_url": null,
    "license": "BSD-3",
    "summary": "A multi-sample and multi-databases taxonomic analysis using Kraken",
    "version": "0.12.1",
    "project_urls": {
        "Homepage": "https://github.com/sequana/multitax",
        "Repository": "https://github.com/sequana/multitax"
    },
    "split_keywords": [
        "snakemake",
        "ngs",
        "sequana",
        "taxonomy",
        "kraken"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "537e21954e09c84c10c8c154709af2ce012117913861257ed12fec9edd68591d",
                "md5": "f6f0974ce19d70d311812ea6bbdbec85",
                "sha256": "010da0df4a233f4a70835e1416c0d0878bbeeba58e7d63f0bdb7272d9dc72918"
            },
            "downloads": -1,
            "filename": "sequana_multitax-0.12.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f6f0974ce19d70d311812ea6bbdbec85",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 156000,
            "upload_time": "2023-12-04T23:52:28",
            "upload_time_iso_8601": "2023-12-04T23:52:28.160106Z",
            "url": "https://files.pythonhosted.org/packages/53/7e/21954e09c84c10c8c154709af2ce012117913861257ed12fec9edd68591d/sequana_multitax-0.12.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eafb1362cd39e3571cf0645fc73bbdd6bf1acfc33ee5e662b772ff7c385c5916",
                "md5": "be243572437a1ec4a88d1c3eb454d757",
                "sha256": "79139e4c0f9809a4a7e7a6dc729b903092896a12ab581a2f076cc21ca5a0dff1"
            },
            "downloads": -1,
            "filename": "sequana_multitax-0.12.1.tar.gz",
            "has_sig": false,
            "md5_digest": "be243572437a1ec4a88d1c3eb454d757",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 157822,
            "upload_time": "2023-12-04T23:52:30",
            "upload_time_iso_8601": "2023-12-04T23:52:30.516818Z",
            "url": "https://files.pythonhosted.org/packages/ea/fb/1362cd39e3571cf0645fc73bbdd6bf1acfc33ee5e662b772ff7c385c5916/sequana_multitax-0.12.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 23:52:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sequana",
    "github_project": "multitax",
    "github_not_found": true,
    "lcname": "sequana-multitax"
}
        
Elapsed time: 0.15482s