Skip to main content

Latest Github release Conda Code style: black Tests codecov

GFFtk: genome annotation tool kit

GFFtk is a comprehensive toolkit for working with genome annotation files in GFF3, GTF, and TBL formats. It provides powerful conversion, filtering, and manipulation capabilities for genomic data.

Features

  • Format Conversion: Convert between GFF3, GTF, TBL, and GenBank formats
  • Combined GFF3+FASTA: Support for combined files containing both annotations and sequences
  • Sequence Extraction: Extract protein and transcript sequences from annotations
  • Advanced Filtering: Filter annotations using flexible regex patterns
  • Consensus Models: Generate consensus gene models from multiple sources
  • Non-Standard Features: Support for intron, noncoding_exon, five_prime_UTR_intron, and pseudogenic_exon features
  • File Manipulation: Sort, sanitize, and rename features in annotation files

Installation

To install release versions use the pip package manager:

python -m pip install gfftk

To install the most updated code in master you can run:

python -m pip install git+https://github.com/nextgenusfs/gfftk.git

Quick Start

Basic Format Conversion

# Convert GFF3 to GTF
gfftk convert -i input.gff3 -f genome.fasta -o output.gtf

# Extract protein sequences
gfftk convert -i input.gff3 -f genome.fasta -o proteins.faa --output-format proteins

Combined GFF3+FASTA Format

# Create a combined file from separate GFF3 and FASTA files
gfftk convert -i input.gff3 -f genome.fasta -o combined.gff --output-format combined

# Read a combined file (no separate FASTA file needed)
gfftk convert -i combined.gff -o output.gff3 --output-format gff3

Advanced Filtering

# Keep only kinase genes
gfftk convert -i input.gff3 -f genome.fasta -o kinases.gff3 --grep product:kinase

# Remove augustus predictions
gfftk convert -i input.gff3 -f genome.fasta -o filtered.gff3 --grepv source:augustus

# Case-insensitive filtering with regex
gfftk convert -i input.gff3 -f genome.fasta -o results.gff3 --grep product:KINASE:i

# Combined filtering
gfftk convert -i input.gff3 -f genome.fasta -o filtered.gff3 \
    --grep product:kinase --grepv source:augustus

Filter Pattern Syntax

  • key:pattern - Basic string matching
  • key:pattern:i - Case-insensitive matching
  • key:regex - Regular expression patterns
  • Multiple --grep or --grepv flags for complex filtering

Common filter keys: product, source, name, note, contig, strand, type, db_xref, go_terms

For more examples and detailed documentation, see the tutorial.

Development

Code Formatting

This project uses pre-commit to ensure code quality and consistency. The pre-commit hooks run Black (code formatter), isort (import sorter), and flake8 (linter).

To set up pre-commit:

  1. Install pre-commit:
pip install pre-commit
  1. Install the git hooks:
pre-commit install
  1. (Optional) Run against all files:
pre-commit run --all-files

After installation, the pre-commit hooks will run automatically on each commit to ensure your code follows the project's style guidelines.

Metadata

Release files for gfftk 26.5.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gfftk 26.5.22
File Size Uploaded
gfftk-26.5.22.tar.gz 4.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gfftk 26.5.22
File Interpreter ABI Platform
gfftk-26.5.22-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 MB

Release files / gfftk-26.5.22.tar.gz

Download URL gfftk-26.5.22.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
bf90e0e7006c8ed90349cf5a7d0d03c99b4c745d384226e9c8383db5594de571
BLAKE2b-256 checksum
How to use checksums
2c73b014784b181d9ee0eee21335cdd411c8e55077008bf385bfe1328c4ce999
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 23, 2026.

Transparency log

Release files / gfftk-26.5.22-py3-none-any.whl

Download URL gfftk-26.5.22-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
721e4d8a5c28831707a5fcce0a7c580e6fc9096a3882fe0d29ffd5661440d199
BLAKE2b-256 checksum
How to use checksums
3dcbd0d829646b9ee685898d3c35712a43458af6f80f74e1bc632c1a4178af01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

26.5.22 This release

2 release files

23.9.6

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page