sequana-mapper


Namesequana-mapper JSON
Version 1.3.1 PyPI version JSON
download
home_pagehttps://github.com/sequana/mapper
SummaryA multi-sample mapper to map reads onto a reference
upload_time2024-11-22 09:21:40
maintainerNone
docs_urlNone
authorSequana Team
requires_python<4.0,>=3.9
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-mapper.svg
     :target: https://pypi.python.org/pypi/sequana_mapper

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

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

.. 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 the **mapper** pipeline from the `Sequana <https://sequana.readthedocs.org>`_ projet

:Overview: This is a simple pipeline to map several FastQ files onto a reference using different mappers/aligners
:Input: A set of FastQ files (illumina, pacbio, etc).
:Output: A set of BAM files (and/or bigwig) and HTML report
:Status: Production
:Documentation: This README file, and https://sequana.readthedocs.io
: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_mapper --upgrade

You will need third-party software such as fastqc. Please see below for details.

Usage
~~~~~

This command will scan all files ending in .fastq.gz found in the local
directory, create a directory called mapper/ where a snakemake pipeline can be executed.::

    sequana_mapper --input-directory DATAPATH  --mapper bwa --create-bigwig
    sequana_mapper --input-directory DATAPATH  --mapper bwa --do-coverage


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

    cd mapper
    sh mapper.sh  # for a local run

This launch a snakemake pipeline. See .sequana/profile/config.yaml to tune the behaviour of Snakemake.

Usage with apptainer
~~~~~~~~~~~~~~~~~~~~~

With apptainer, initiate the working directory as follows::

    sequana_rnaseq --use-apptainer 

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

    sequana_rnaseq --use-apptainer --apptainer-prefix ~/.sequana/apptainers

and then::

    cd rnaseq
    sh rnaseq.sh


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

This pipelines requires the following executable(s):

- bamtools
- bwa
- multiqc
- sequana_coverage
- minimap2
- bowtie2
- deeptools

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


Details
~~~~~~~~~

This pipeline runs **mapper** in parallel on the input fastq files (paired or not).
A brief sequana summary report is also produced. When using **--pacbio** option,
*-x map-pb* options is automatically added to the config.yaml file and the
readtag is set to None.

The BAM files are filtered to remove unmapped reads to keep BAM files to minimal size. However,
the multiqc and statistics to be found in  {sample}/bamtools_stats/ includes mapped and unmapped reads information. Each BAM file is stored in a directory named after the sample.



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

Here is the `latest documented configuration file <https://raw.githubusercontent.com/sequana/mapper/main/sequana_pipelines/mapper/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
========= ======================================================================
1.3.1     * remove temp on BWA BAM file (more practical to keep them)
1.3.0     * uses new sequana_coverage wrapper
1.2.1     * fix bwa_split bwa aggreate stage (bug fix)
1.2.0     * Implement a bwa_split method to speed up mapping of very large
            fastq files.
1.1.0     * BAM files are now filtered to remove unmapped reads
          * set wrappers branch in config file and update pipeline.
          * refactorise to use click and new sequana-pipetools
1.0.0     * Use latest sequana-wrappers and graphviz apptainer
0.12.0    * Use latest pipetools and add singularity containers
0.11.1    * Fix typo when setting coverage to True and allow untagged filenames
0.11.0    * implement feature counts for capture-seq projects
0.10.1    * remove getlogdir and getname
0.10.0    * use new wrappers framework
0.9.0     * fix issue with logger and increments requirements
          * add new option --pacbio to automatically set the options for
            pacbio data (-x map-pb and readtag set to None)
0.8.13    * add the thread option in minimap2 case
0.8.12    * factorise multiqc rule
0.8.11    * Implemente the --from-project option and new framework
          * custom HTMrLl report
0.8.10    * change samtools_depth rule and switched to bam2cov to cope with null
            coverage
0.8.9     * fix requirements
0.8.8     * fix pipeline rule for bigwig + renamed output_bigwig into
            create_bigwig; fix the multiqc config file
0.8.7     * fix config file creation (for bigwig)
0.8.6     * added bowtie2 mapper + bigwig as output, make coverage optional
0.8.5     * create a sym link to the HTML report. Better post cleaning.
0.8.4     * Fixing multiqc (synchronized with sequana updates)
0.8.3     * add sequana_coverage rule.
0.8.2     * add minimap2 mapper
0.8.1     * fix bamtools stats rule to have different output name for multiqc
0.8.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/main/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/mapper",
    "name": "sequana-mapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "snakemake, NGS, sequana, bwa, minimap2",
    "author": "Sequana Team",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/df/6e/f5731da038e2c4344b98ef8e0768fbd8f8325f2b1a196825eb9c9155d582/sequana_mapper-1.3.1.tar.gz",
    "platform": null,
    "description": "\n.. image:: https://badge.fury.io/py/sequana-mapper.svg\n     :target: https://pypi.python.org/pypi/sequana_mapper\n\n.. image:: https://github.com/sequana/mapper/actions/workflows/main.yml/badge.svg\n   :target: https://github.com/sequana/mapper/actions/\n\n.. image:: https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C3.11-blue.svg\n    :target: https://pypi.python.org/pypi/sequana\n    :alt: Python  3.9 | 3.10 | 3.11\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 the **mapper** pipeline from the `Sequana <https://sequana.readthedocs.org>`_ projet\n\n:Overview: This is a simple pipeline to map several FastQ files onto a reference using different mappers/aligners\n:Input: A set of FastQ files (illumina, pacbio, etc).\n:Output: A set of BAM files (and/or bigwig) and HTML report\n:Status: Production\n:Documentation: This README file, and https://sequana.readthedocs.io\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\nInstallation\n~~~~~~~~~~~~\n\nIf you already have all requirements, you can install the packages using pip::\n\n    pip install sequana_mapper --upgrade\n\nYou will need third-party software such as fastqc. Please see below for details.\n\nUsage\n~~~~~\n\nThis command will scan all files ending in .fastq.gz found in the local\ndirectory, create a directory called mapper/ where a snakemake pipeline can be executed.::\n\n    sequana_mapper --input-directory DATAPATH  --mapper bwa --create-bigwig\n    sequana_mapper --input-directory DATAPATH  --mapper bwa --do-coverage\n\n\nThis creates a directory with the pipeline and configuration file. You will then need\nto execute the pipeline::\n\n    cd mapper\n    sh mapper.sh  # for a local run\n\nThis launch a snakemake pipeline. See .sequana/profile/config.yaml to tune the behaviour of Snakemake.\n\nUsage with apptainer\n~~~~~~~~~~~~~~~~~~~~~\n\nWith apptainer, initiate the working directory as follows::\n\n    sequana_rnaseq --use-apptainer \n\nImages are downloaded in the working directory but you can store them in a directory globally (e.g.):\n\n    sequana_rnaseq --use-apptainer --apptainer-prefix ~/.sequana/apptainers\n\nand then::\n\n    cd rnaseq\n    sh rnaseq.sh\n\n\nRequirements\n~~~~~~~~~~~~\n\nThis pipelines requires the following executable(s):\n\n- bamtools\n- bwa\n- multiqc\n- sequana_coverage\n- minimap2\n- bowtie2\n- deeptools\n\n.. image:: https://raw.githubusercontent.com/sequana/mapper/main/sequana_pipelines/mapper/dag.png\n\n\nDetails\n~~~~~~~~~\n\nThis pipeline runs **mapper** in parallel on the input fastq files (paired or not).\nA brief sequana summary report is also produced. When using **--pacbio** option,\n*-x map-pb* options is automatically added to the config.yaml file and the\nreadtag is set to None.\n\nThe BAM files are filtered to remove unmapped reads to keep BAM files to minimal size. However,\nthe multiqc and statistics to be found in  {sample}/bamtools_stats/ includes mapped and unmapped reads information. Each BAM file is stored in a directory named after the sample.\n\n\n\nRules and configuration details\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nHere is the `latest documented configuration file <https://raw.githubusercontent.com/sequana/mapper/main/sequana_pipelines/mapper/config.yaml>`_\nto be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file.\n\n\nChangelog\n~~~~~~~~~\n\n========= ======================================================================\nVersion   Description\n========= ======================================================================\n1.3.1     * remove temp on BWA BAM file (more practical to keep them)\n1.3.0     * uses new sequana_coverage wrapper\n1.2.1     * fix bwa_split bwa aggreate stage (bug fix)\n1.2.0     * Implement a bwa_split method to speed up mapping of very large\n            fastq files.\n1.1.0     * BAM files are now filtered to remove unmapped reads\n          * set wrappers branch in config file and update pipeline.\n          * refactorise to use click and new sequana-pipetools\n1.0.0     * Use latest sequana-wrappers and graphviz apptainer\n0.12.0    * Use latest pipetools and add singularity containers\n0.11.1    * Fix typo when setting coverage to True and allow untagged filenames\n0.11.0    * implement feature counts for capture-seq projects\n0.10.1    * remove getlogdir and getname\n0.10.0    * use new wrappers framework\n0.9.0     * fix issue with logger and increments requirements\n          * add new option --pacbio to automatically set the options for\n            pacbio data (-x map-pb and readtag set to None)\n0.8.13    * add the thread option in minimap2 case\n0.8.12    * factorise multiqc rule\n0.8.11    * Implemente the --from-project option and new framework\n          * custom HTMrLl report\n0.8.10    * change samtools_depth rule and switched to bam2cov to cope with null\n            coverage\n0.8.9     * fix requirements\n0.8.8     * fix pipeline rule for bigwig + renamed output_bigwig into\n            create_bigwig; fix the multiqc config file\n0.8.7     * fix config file creation (for bigwig)\n0.8.6     * added bowtie2 mapper + bigwig as output, make coverage optional\n0.8.5     * create a sym link to the HTML report. Better post cleaning.\n0.8.4     * Fixing multiqc (synchronized with sequana updates)\n0.8.3     * add sequana_coverage rule.\n0.8.2     * add minimap2 mapper\n0.8.1     * fix bamtools stats rule to have different output name for multiqc\n0.8.0     **First release.**\n========= ======================================================================\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/main/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 mapper to map reads onto a reference",
    "version": "1.3.1",
    "project_urls": {
        "Homepage": "https://github.com/sequana/mapper",
        "Repository": "https://github.com/sequana/mapper"
    },
    "split_keywords": [
        "snakemake",
        " ngs",
        " sequana",
        " bwa",
        " minimap2"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9d272959f8fd3a5d3a74139d0b70f1ddc08cff5aa500d004a0aa6ebec4ddd9f",
                "md5": "2fb9aa9cdb7496facd38e0971b33af4e",
                "sha256": "6109dd824b9f0efc6277eb7d9839b86a8d9a3da9bac822b2b2a76891507a886b"
            },
            "downloads": -1,
            "filename": "sequana_mapper-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2fb9aa9cdb7496facd38e0971b33af4e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 71371,
            "upload_time": "2024-11-22T09:21:39",
            "upload_time_iso_8601": "2024-11-22T09:21:39.319174Z",
            "url": "https://files.pythonhosted.org/packages/d9/d2/72959f8fd3a5d3a74139d0b70f1ddc08cff5aa500d004a0aa6ebec4ddd9f/sequana_mapper-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df6ef5731da038e2c4344b98ef8e0768fbd8f8325f2b1a196825eb9c9155d582",
                "md5": "f6bbe17b09e0f6c303831b11157ed132",
                "sha256": "3d388f0d3cba15bcca2a1de97186e5b06a07e909a92c65e52170e3b5cb2fb4aa"
            },
            "downloads": -1,
            "filename": "sequana_mapper-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f6bbe17b09e0f6c303831b11157ed132",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 72454,
            "upload_time": "2024-11-22T09:21:40",
            "upload_time_iso_8601": "2024-11-22T09:21:40.970928Z",
            "url": "https://files.pythonhosted.org/packages/df/6e/f5731da038e2c4344b98ef8e0768fbd8f8325f2b1a196825eb9c9155d582/sequana_mapper-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 09:21:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sequana",
    "github_project": "mapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sequana-mapper"
}
        
Elapsed time: 0.35839s