Skip to main content

A multi-sample mapper to map reads onto a reference

Project description

https://badge.fury.io/py/sequana-mapper.svg https://github.com/sequana/mapper/actions/workflows/main.yml/badge.svg Python 3.8 | 3.9 | 3.10 JOSS (journal of open source software) DOI

This is the mapper pipeline from the Sequana 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. 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 mapper.rules -c config.yaml --cores 4 \
    --wrapper-prefix https://raw.githubusercontent.com/sequana/sequana-wrappers/

Or use sequanix interface.

Requirements

This pipelines requires the following executable(s):

  • bamtools

  • bwa

  • multiqc

  • sequana_coverage

  • minimap2

  • bowtie2

  • deeptools

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 to be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file.

Changelog

Version

Description

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 first. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sequana_mapper-1.2.0.tar.gz (72.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sequana_mapper-1.2.0-py3-none-any.whl (71.4 kB view details)

Uploaded Python 3

File details

Details for the file sequana_mapper-1.2.0.tar.gz.

File metadata

  • Download URL: sequana_mapper-1.2.0.tar.gz
  • Upload date:
  • Size: 72.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for sequana_mapper-1.2.0.tar.gz
Algorithm Hash digest
SHA256 51634b487e2efb05e3f3e14fa141059682e6833a9445c3ac9f933641f95d4ce4
MD5 4b63736c2f31f27790d649f01f6105be
BLAKE2b-256 073ff15ec49ab4ca6861c2313071db20ea90211f8b5600c79f30857630b57d16

See more details on using hashes here.

File details

Details for the file sequana_mapper-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: sequana_mapper-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 71.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for sequana_mapper-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37eb165863be9b15b800fc14d9436f64f2a1d711aa6532cdbc65f4ffdc808fcb
MD5 dd40decd6b01657d450e3d5bf17e1e63
BLAKE2b-256 0a3ed5d54bf40b6c8e44aeee01224ceed9bf6ac45176f1557fe9094ca4c79c9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page