Skip to main content

FASTX trimming tools

Project description

fastx-barber

A Python3.6+ package to trim and extract flags from FASTA and FASTQ files.

Features

  • Supports both FASTA and FASTQ files.
  • Select your reads based on a pattern (regular expression).
  • Trim your reads based on a pattern (regular expression).
  • Extract parts (flags) of reads based on a pattern and store them in the read headers.
    • Extract the corresponding portions of the quality string too (only for fastq files).
  • All patterns use the regex Python package to support fuzzy matching.
    • Using fuzzy matching might affect the barber's speed).
  • Export reads that do not match the provided pattern.
  • Parallelized processing by splitting the fastx file in chunks.
  • Filter reads based on quality score of extracted flags.
    • Supports Sanger QSCORE definition (not old Solexa/Illumina one), and allows to specify different PHRED offsets.

Requirements

fastx-barber has been tested with Python 3.6, 3.7, and 3.8. We recommend installing it using pipx (see below) to avoid dependency conflicts with other packages. The packages it depends on are listed in our dependency graph. We use poetry to handle our dependencies.

Install

We recommend installing fastx-barber using pipx. Check how to install pipx here if you don't have it yet!

Once you have pipx ready on your system, install the latest stable release of fastx-barber by running: pipx install fastx-barber. If you see the stars (✨ 🌟 ✨), then the installation went well!

Usage

Run:

  • fbarber to access the barber's services.
  • fbarber trim to trim your reads.
  • fbarber match to select reads based on a pattern (regular expression).
  • fbarber extract to extract parts of a read and store them in the read name, and then trim it.

Add -h to see the full help page of a command!

Contributing

We welcome any contributions to fastx-barber. In short, we use black to standardize code format. Any code change also needs to pass mypy checks. For more details, please refer to our contribution guidelines if this is your first time contributing! Also, check out our code of conduct.

License

MIT License - Copyright (c) 2020 Gabriele Girelli

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

fastx-barber-0.0.1.tar.gz (14.5 kB view hashes)

Uploaded Source

Built Distribution

fastx_barber-0.0.1-py3-none-any.whl (21.3 kB view hashes)

Uploaded Python 3

Supported by

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