pyfaidx

pyfaidx retrieves subsequences from FASTA files using on-disk indexing to enable memory-efficient access and manipulation of genomic sequences.


Key Features:

  • On-disk FASTA indexing: Provides an index of FASTA files that enables random access to sequences without loading entire files into memory.
  • Memory-efficient subsequence retrieval: Allows extraction of subsequences directly from disk to support large genomic datasets.
  • Dictionary-like sequence access: Exposes Python classes that map FASTA headers to sequences and support positional slicing.
  • samtools index compatibility: Produces and uses index files compatible with samtools indexing formats.
  • In-place FASTA modification: Supports modifications to FASTA files while leveraging the on-disk index.
  • Test suite for reproducibility: Includes automated tests to verify correct and reproducible behavior.

Scientific Applications:

  • Large-scale genomic data handling: Enables access to specific regions of large FASTA files without full-file reads, facilitating analyses on large genomes.
  • Integration with alignment workflows: Provides samtools-compatible indexing to support sequence retrieval for sequence alignment and downstream analysis workflows.
  • Targeted subsequence extraction: Supports positional slicing for extracting regions of interest for downstream computational analyses.

Methodology:

Builds on on-disk FASTA indexing (samtools-compatible), dictionary-like Python classes that map headers to sequences, positional slicing to retrieve subsequences without loading entire files, and support for in-place FASTA modification.

Topics

Collections

Details

License:
Not licensed
Tool Type:
command-line tool, library
Operating Systems:
Linux, Windows, Mac
Programming Languages:
Python
Added:
8/20/2017
Last Updated:
1/19/2020

Operations

Data Inputs & Outputs

Data handling

Publications

Shirley MD, Ma Z, Pedersen BS, Wheelan SJ. Efficient "pythonic" access to FASTA files using pyfaidx. Unknown Journal. 2015. doi:10.7287/peerj.preprints.970v1.

Documentation