Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Filtering and trimming of Oxford Nanopore Sequencing data

Project Description

Filtering and trimming of long read sequencing data.

Filtering on quality and/or read length, and optional trimming after passing filters.
Reads from stdin, writes to stdout.
Intended to be used:
- directly after fastq extraction
- prior to mapping
- in a stream between extraction and mapping
Due to a discrepancy between calculated read quality and the quality as summarized by albacore this script takes since v1.1.0 optionally also a --summary argument. Using this argument with the sequencing_summary.txt file from albacore will do the filtering using the quality scores from the summary. It’s also faster.

INSTALLATION AND UPGRADING:

pip install nanofilt
pip install nanofilt --upgrade

or

conda install -c bioconda nanofilt

NanoFilt is written for Python 3.

USAGE:

NanoFilt [-h] [-q QUALITY] [-l LENGTH] [--headcrop HEADCROP] [--tailcrop TAILCROP]

optional arguments:
  -h, --help            show this help message and exit
  -s --summary SUMMARYFILE optional, the sequencing_summary file from albacore for extracting quality scores
  -q, --quality QUALITY  Filter on a minimum average read quality score
  -l, --length LENGTH Filter on a minimum read length
  --headcrop HEADCROP   Trim n nucleotides from start of read
  --tailcrop TAILCROP   Trim n nucleotides from end of read
  --minGC MINGC         Sequences must have GC content >= to this. Float
                        between 0.0 and 1.0. Ignored if using summary file.
  --maxGC MAXGC         Sequences must have GC content <= to this. Float
                        between 0.0 and 1.0. Ignored if using summary file.

EXAMPLES

gunzip -c reads.fastq.gz | NanoFilt -q 10 -l 500 --headcrop 50 | minimap2 genome.fa - | samtools sort -O BAM -@24 -o alignment.bam -
gunzip -c reads.fastq.gz | NanoFilt -q 12 --headcrop 75 | gzip > trimmed-reads.fastq.gz
gunzip -c reads.fastq.gz | NanoFilt -q 10 | gzip > highQuality-reads.fastq.gz

I welcome all suggestions, bug reports, feature requests and contributions. Please leave an issue or open a pull request. I will usually respond within a day, or rarely within a few days.

Release History

This version
History Node

2.0.1

History Node

2.0.0

History Node

1.9.3

History Node

1.9.2

History Node

1.8.0

History Node

1.7.0

History Node

1.5.3

History Node

1.5.2

History Node

1.4.0

History Node

1.2.0

History Node

1.1.4

History Node

1.1.3

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.6

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

History Node

0.9.3

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
NanoFilt-2.0.1.tar.gz
(5.8 kB) Copy SHA256 Hash SHA256
Source None Feb 13, 2018

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting