sequana-variant-calling


Namesequana-variant-calling JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/sequana/variant_calling
SummaryA multi-sample variant calling pipeline
upload_time2024-01-31 08:46:23
maintainer
docs_urlNone
authorSequana Team
requires_python>=3.8,<4.0
licenseBSD-3
keywords snakemake ngs sequana bwa minimap2
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
.. image:: https://badge.fury.io/py/sequana-variant-calling.svg
     :target: https://pypi.python.org/pypi/sequana_variant_calling

.. 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

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

.. 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

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

:Overview: Variant calling from FASTQ files
:Input: FASTQ files from Illumina Sequencing instrument
:Output: VCF and HTML files
:Status: production
:Citation: Cokelaer et al, (2017), 'Sequana': a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI https://doi:10.21105/joss.00352


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

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

    pip install sequana_variant_calling --upgrade

Otherwise, you can create a *sequana_variant_calling* conda environment executing::

    conda env create -f environment.yml

and later activate the environment::

  conda activate sequana_variant_calling

A third option is to install the pipeline with pip method (see above) and use singularity as explained afterwards.


Usage
~~~~~

::

    sequana_variant_calling --help
    sequana_variant_calling --input-directory DATAPATH --reference-file measles.fa

This creates a directory **variant_calling**. You just need to execute the pipeline::

    cd variant_calling
    sh variant_calling.sh

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 variant_calling.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_variant_calling --use-singularity

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

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

and then::

    cd variant_calling
    sh variant_calling.sh

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

    snakemake -s variant_calling.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):

- bwa
- freebayes
- picard (picard-tools)
- sambamba
- minimap2
- samtools
- snpEff you will need 5.0 or 5.1d (note the d); 5.1 does not work.

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

Details
~~~~~~~~

Snakemake variant calling pipeline is based on
`tutorial <https://github.com/ekg/alignment-and-variant-calling-tutorial>`_
written by Erik Garrison. Input reads (paired or single) are mapped using
`bwa <http://bio-bwa.sourceforge.net/>`_ and sorted with
`sambamba-sort <http://lomereiter.github.io/sambamba/docs/sambamba-sort.html>`_.
PCR duplicates are marked with
`sambamba-markdup <http://lomereiter.github.io/sambamba/docs/sambamba-sort.html>`_.
`Freebayes <https://github.com/ekg/freebayes>`_ is used to detect SNPs and short
INDELs. The INDEL realignment and base quality recalibration are not necessary
with Freebayes. For more information, please refer to a post by Brad Chapman on
`minimal BAM preprocessing methods
<https://bcbio.wordpress.com/2013/10/21/updated-comparison-of-variant-detection-methods-ensemble-freebayes-and-minimal-bam-preparation-pipelines/>`_.

The pipeline provides an analysis of the mapping coverage using
`sequana coverage <http://www.biorxiv.org/content/early/2016/12/08/092478>`_.
It detects and characterises automatically low and high genome coverage regions.

Detected variants are annotated with `SnpEff <http://snpeff.sourceforge.net/>`_ if a
GenBank file is provided. The pipeline does the database building automatically.
Although most of the species should be handled automatically, some special cases
such as particular codon table will required edition of the snpeff configuration file.

Finally, joint calling is also available and can be switch on if desired.


Changelog
~~~~~~~~~

========= ======================================================================
Version   Description
========= ======================================================================
1.2.0     * -Xmx8g option previously added is not robust. Does not work with
            snpEff 5.1 for instance.
          * add minimap aligner
          * add --nanopore and --pacbio to automatically set minimap2 as the
            aligner and the minimap options (map-pb or map-ont)
          * add minimap2 container.
          * add missing resources in snpeff section
1.1.2     * add -Xmx8g option in snpeff rule at the build stage.
          * add resources (8G) in the snpeff rule at run stage
          * fix missing output_directory in sequana_coverage rule
          * fix joint calling (regression) input function and inputs
1.1.1     * Fix regression in coverage rule
1.1.0     * add specific apptainer for freebayes (v1.2.0)
          * Update API to use click
1.0.2     * Fixed failure in multiqc if coverage and snpeff are off
1.0.1     * automatically fill the bwa index algorithm and fix bwa_index rule to
            use the options in the config file (not the harcoded one)
1.0.0     * use last warppers and graphviz apptainer
0.12.0    * set all apptainers containers and add vcf to bcf conversions
          * Update rule sambamba to use latest wrappers
0.11.0    * Add singularity containers
0.10.0    * fully integrated sequana wrappers and simplification of HTML reports
0.9.10    * Uses new sequana_pipetools and wrappers
0.9.5     * fix typo in the onsuccess and update sequana requirements to use
            most up-to-date snakemake rules
0.9.4     * fix typo related to the reference-file option new name not changed
            everyhere in the pipeline.
0.9.3     * use new framework (faster --help, --from-project option)
          * rename --reference into --reference-file and --annotation to
            --annotation-file
          * add custom summary page
          * add multiqc config file
0.9.2     * snpeff output files are renamed sample.snpeff (instead of
            samplesnpeff)
          * add multiqc to show sequana_coverage and snpeff summary sections
          * cleanup onsuccess section
          * more options sanity checks and options (e.g.,
          * genbank_file renamed into annotation_file in the config
          * use --legacy in freebayes options
          * fix coverage section to use new sequana api
          * add the -do-coverage, --do-joint-calling options as well as
            --circular and --frebayes--ploidy
0.9.1     * Fix input-readtag, which was not populated
0.9.0     First release
========= ======================================================================

Contribute & Code of Conduct
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To contribute to this project, please take a look at the
`Contributing Guidelines <https://github.com/sequana/sequana/blob/maib/CONTRIBUTING.rst>`_ first. Please note that this project is released with a
`Code of Conduct <https://github.com/sequana/sequana/blob/main/CONDUCT.md>`_. By contributing to this project, you agree to abide by its terms.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sequana/variant_calling",
    "name": "sequana-variant-calling",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "snakemake,NGS,sequana,bwa,minimap2",
    "author": "Sequana Team",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/cb/7c/6b5e549e4ff2bccd6f900da34f76337f09b9125cbda9f230f8a6e138dc22/sequana_variant_calling-1.2.0.tar.gz",
    "platform": null,
    "description": "\n.. image:: https://badge.fury.io/py/sequana-variant-calling.svg\n     :target: https://pypi.python.org/pypi/sequana_variant_calling\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\n.. image:: https://github.com/sequana/variant_calling/actions/workflows/main.yml/badge.svg\n   :target: https://github.com/sequana/variant_calling/actions\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\nThis is the **variant_calling** pipeline from the `Sequana <https://sequana.readthedocs.org>`_ projet\n\n:Overview: Variant calling from FASTQ files\n:Input: FASTQ files from Illumina Sequencing instrument\n:Output: VCF and HTML files\n:Status: production\n:Citation: Cokelaer et al, (2017), 'Sequana': a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI https://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_variant_calling --upgrade\n\nOtherwise, you can create a *sequana_variant_calling* conda environment executing::\n\n    conda env create -f environment.yml\n\nand later activate the environment::\n\n  conda activate sequana_variant_calling\n\nA third option is to install the pipeline with pip method (see above) and use singularity as explained afterwards.\n\n\nUsage\n~~~~~\n\n::\n\n    sequana_variant_calling --help\n    sequana_variant_calling --input-directory DATAPATH --reference-file measles.fa\n\nThis creates a directory **variant_calling**. You just need to execute the pipeline::\n\n    cd variant_calling\n    sh variant_calling.sh\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 variant_calling.rules -c config.yaml --cores 4 --stats stats.txt\n\nOr use `sequanix <https://sequana.readthedocs.io/en/main/sequanix.html>`_ interface.\n\nUsage with singularity::\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWith singularity, initiate the working directory as follows::\n\n    sequana_variant_calling --use-singularity\n\nImages are downloaded in the working directory but you can store then in a directory globally (e.g.)::\n\n    sequana_variant_calling --use-singularity --singularity-prefix ~/.sequana/apptainers\n\nand then::\n\n    cd variant_calling\n    sh variant_calling.sh\n\nif you decide to use snakemake manually, do not forget to add singularity options::\n\n    snakemake -s variant_calling.rules -c config.yaml --cores 4 --stats stats.txt --use-singularity --singularity-prefix ~/.sequana/apptainers --singularity-args \"-B /home:/home\"\n\n\n\nRequirements\n~~~~~~~~~~~~\n\nThis pipelines requires the following executable(s):\n\n- bwa\n- freebayes\n- picard (picard-tools)\n- sambamba\n- minimap2\n- samtools\n- snpEff you will need 5.0 or 5.1d (note the d); 5.1 does not work.\n\n.. image:: https://raw.githubusercontent.com/sequana/sequana_variant_calling/main/sequana_pipelines/variant_calling/dag.png\n\nDetails\n~~~~~~~~\n\nSnakemake variant calling pipeline is based on\n`tutorial <https://github.com/ekg/alignment-and-variant-calling-tutorial>`_\nwritten by Erik Garrison. Input reads (paired or single) are mapped using\n`bwa <http://bio-bwa.sourceforge.net/>`_ and sorted with\n`sambamba-sort <http://lomereiter.github.io/sambamba/docs/sambamba-sort.html>`_.\nPCR duplicates are marked with\n`sambamba-markdup <http://lomereiter.github.io/sambamba/docs/sambamba-sort.html>`_.\n`Freebayes <https://github.com/ekg/freebayes>`_ is used to detect SNPs and short\nINDELs. The INDEL realignment and base quality recalibration are not necessary\nwith Freebayes. For more information, please refer to a post by Brad Chapman on\n`minimal BAM preprocessing methods\n<https://bcbio.wordpress.com/2013/10/21/updated-comparison-of-variant-detection-methods-ensemble-freebayes-and-minimal-bam-preparation-pipelines/>`_.\n\nThe pipeline provides an analysis of the mapping coverage using\n`sequana coverage <http://www.biorxiv.org/content/early/2016/12/08/092478>`_.\nIt detects and characterises automatically low and high genome coverage regions.\n\nDetected variants are annotated with `SnpEff <http://snpeff.sourceforge.net/>`_ if a\nGenBank file is provided. The pipeline does the database building automatically.\nAlthough most of the species should be handled automatically, some special cases\nsuch as particular codon table will required edition of the snpeff configuration file.\n\nFinally, joint calling is also available and can be switch on if desired.\n\n\nChangelog\n~~~~~~~~~\n\n========= ======================================================================\nVersion   Description\n========= ======================================================================\n1.2.0     * -Xmx8g option previously added is not robust. Does not work with\n            snpEff 5.1 for instance.\n          * add minimap aligner\n          * add --nanopore and --pacbio to automatically set minimap2 as the\n            aligner and the minimap options (map-pb or map-ont)\n          * add minimap2 container.\n          * add missing resources in snpeff section\n1.1.2     * add -Xmx8g option in snpeff rule at the build stage.\n          * add resources (8G) in the snpeff rule at run stage\n          * fix missing output_directory in sequana_coverage rule\n          * fix joint calling (regression) input function and inputs\n1.1.1     * Fix regression in coverage rule\n1.1.0     * add specific apptainer for freebayes (v1.2.0)\n          * Update API to use click\n1.0.2     * Fixed failure in multiqc if coverage and snpeff are off\n1.0.1     * automatically fill the bwa index algorithm and fix bwa_index rule to\n            use the options in the config file (not the harcoded one)\n1.0.0     * use last warppers and graphviz apptainer\n0.12.0    * set all apptainers containers and add vcf to bcf conversions\n          * Update rule sambamba to use latest wrappers\n0.11.0    * Add singularity containers\n0.10.0    * fully integrated sequana wrappers and simplification of HTML reports\n0.9.10    * Uses new sequana_pipetools and wrappers\n0.9.5     * fix typo in the onsuccess and update sequana requirements to use\n            most up-to-date snakemake rules\n0.9.4     * fix typo related to the reference-file option new name not changed\n            everyhere in the pipeline.\n0.9.3     * use new framework (faster --help, --from-project option)\n          * rename --reference into --reference-file and --annotation to\n            --annotation-file\n          * add custom summary page\n          * add multiqc config file\n0.9.2     * snpeff output files are renamed sample.snpeff (instead of\n            samplesnpeff)\n          * add multiqc to show sequana_coverage and snpeff summary sections\n          * cleanup onsuccess section\n          * more options sanity checks and options (e.g.,\n          * genbank_file renamed into annotation_file in the config\n          * use --legacy in freebayes options\n          * fix coverage section to use new sequana api\n          * add the -do-coverage, --do-joint-calling options as well as\n            --circular and --frebayes--ploidy\n0.9.1     * Fix input-readtag, which was not populated\n0.9.0     First release\n========= ======================================================================\n\nContribute & Code of Conduct\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo contribute to this project, please take a look at the\n`Contributing Guidelines <https://github.com/sequana/sequana/blob/maib/CONTRIBUTING.rst>`_ first. Please note that this project is released with a\n`Code of Conduct <https://github.com/sequana/sequana/blob/main/CONDUCT.md>`_. By contributing to this project, you agree to abide by its terms.\n\n",
    "bugtrack_url": null,
    "license": "BSD-3",
    "summary": "A multi-sample variant calling pipeline",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/sequana/variant_calling",
        "Repository": "https://github.com/sequana/variant_calling"
    },
    "split_keywords": [
        "snakemake",
        "ngs",
        "sequana",
        "bwa",
        "minimap2"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3779fd9316345201561a7b138307875787d7f46f62ad8d49a64eced81d24d093",
                "md5": "c03d347a8f8a0c381b35691155c034e5",
                "sha256": "35d7d29a7e828c7af0646b63a8bf583fd9f675855d04a8d0058a01d4ff32dac8"
            },
            "downloads": -1,
            "filename": "sequana_variant_calling-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c03d347a8f8a0c381b35691155c034e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 109229,
            "upload_time": "2024-01-31T08:46:20",
            "upload_time_iso_8601": "2024-01-31T08:46:20.912661Z",
            "url": "https://files.pythonhosted.org/packages/37/79/fd9316345201561a7b138307875787d7f46f62ad8d49a64eced81d24d093/sequana_variant_calling-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb7c6b5e549e4ff2bccd6f900da34f76337f09b9125cbda9f230f8a6e138dc22",
                "md5": "f5bfee9a4c3c268855a02cc9b086f9ac",
                "sha256": "47ba19db5d7709e8598f8fe84e5611a6850e8f1d0e97e8464dd85ca2978fc2c6"
            },
            "downloads": -1,
            "filename": "sequana_variant_calling-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f5bfee9a4c3c268855a02cc9b086f9ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 111004,
            "upload_time": "2024-01-31T08:46:23",
            "upload_time_iso_8601": "2024-01-31T08:46:23.366725Z",
            "url": "https://files.pythonhosted.org/packages/cb/7c/6b5e549e4ff2bccd6f900da34f76337f09b9125cbda9f230f8a6e138dc22/sequana_variant_calling-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-31 08:46:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sequana",
    "github_project": "variant_calling",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sequana-variant-calling"
}
        
Elapsed time: 1.96255s