Skip to main content

A Python library for working with protein containing FASTA files.

Project description

ProFASTA

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Python Version from PEP 621 TOML pypi unit-tests

Introduction

ProFASTA is a Python library for working with FASTA files containing protein records. Unlike other packages, ProFASTA prioritizes simplicity, while aiming to provide a set of useful features required in the field of proteomics based mass spectrometry.

The library is still in early development and the interface might change over time. At the current stage ProFASTA provides functionality for parsing and writing FASTA files, as well as for providing access to protein records imported from FASTA files.

ProFASTA is developed as part of the computational toolbox for the Mass Spectrometry Facility at the Max Perutz Labs (University of Vienna).

Similar projects

If ProFASTA doesn't meet your requirements, consider exploring these alternative Python packages with a focus on protein-containing FASTA files:

  • fastapy is a lightweight package with no dependencies that offers FASTA reading functionality.
  • protfasta is another library with no dependencies that provides reading functionality along with basic validation (e.g., duplicate headers, conversion of non-canonical amino acids). The library also allows writing FASTA files with the ability to specify the sequence line length.
  • pyteomics is a feature-rich package that provides tools to handle various sorts of proteomics data. It provides functions for FASTA reading, automatic parsing of headers (in various formats defined at uniprot.org), writing, and generation of decoy entries. Note that pyteomics is a large package with many dependencies.

Usage example

The following code snippet shows how to import a FASTA file containing UniProt protein entries, retrieve a protein record by its UniProt accession number and print its gene name:

>>> import profasta
>>> 
>>> fasta_path = "./examples/uniprot_hsapiens_10entries.fasta"
>>> db = profasta.db.ProteinDatabase()
>>> db.add_fasta(fasta_path, header_parser="uniprot")
>>> protein_record = db["O75385"]
>>> print(protein_record.header_fields["gene_name"])
ULK1

For more examples how to use the ProFASTA library please refer to the code snippets Jupyter notebook.

Requirements

Python >= 3.9

Installation

The following command will install the latest version of ProFASTA and its dependencies from PyPi, the Python Packaging Index:

pip install profasta

To uninstall the ProFASTA library use:

pip uninstall profasta

Planned features

Main requirements

  • parse FASTA file
  • parse FASTA header
    • built-in parser that never fails
    • built-in parser for uniprot format
    • allow user defined parser
  • write FASTA file
    • allow custom FASTA header generation

Additional features

  • read multiple FASTA files and write a combined file
  • add protein records to an existing FASTA file
  • generate decoy protein records by reversing the sequence
    • add decoy protein records to an existing FASTA file
  • validate FASTA file / FASTA records

Contributors

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

profasta-0.0.5.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distribution

profasta-0.0.5-py3-none-any.whl (11.9 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