Giter Site home page Giter Site logo

profasta's Introduction

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

profasta's People

Contributors

hollenstein avatar xeniorn avatar

Watchers

 avatar

Forkers

xeniorn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.