Skip to content

pem131/Rust_isoelectric_point_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust_isoelectric_point_calculator

A command line tool to estimate the isoelectric point of a protein.

Features

  • Amino Acid Input: Reads amino acid letters as input from the command line, with case-insensitivity for ease of use.
  • FASTA Support: Can extract amino acid letters from a fasta file, making it suitable for larger datasets.
  • Cross-Platform Compatibility: Being based on Rust, the command line tool can be compiled and run on different operating systems, including Linux, macOS and Windows.
  • Efficient and Memory safe: The tool is built in Rust, known for its efficiency, performance and memory safety.

Background

This tool estimates the isoelectric point of a protein by finding the pH value at which the protein's net charge is zero. The net charge is the sum of the charges contributed by the ionizable groups (residues and termini), calculated using the Henderson-Hasselbalch equation.

For the negatively charged residues (and C-terminus), the total negative charge contribution, Qn, is calculated as follows:

Qn neg charge equation

where pKni is the pK value of the i-th negative specie.

For positively charged residues (and N-terminus), the total positive charge contribution, Qp, is calculated as follows:

Qn pos charge equation

where pKpi is the pK value of the i-th positive specie.

The net charge of the protein is the sum of the negative and positive charges:

Qn tot charge equation

The tool applies a bisection algorithm to search for the pH value where the protein's net charge (Qt) is zero. Starting at an initial pH value of 7, the algorithm iteratively changes the pH value until the isoelectric point is found with a precision of 0.0001.

Limitations

The tool outputs an estimation of the isoelectric point. This estimation is based on a set of experimental pKa values whose accuracy is dependent on the original experimental conditions. The calculation does not account for structural effects (e.g., Born effect, Coulombic interactions and Hydrogen bonding) nor Post-Translational Modifications (e.g., Glycosylation and Phosphorylation), factors that can shift the protein's isoelectric point in vivo.

Prerequisites

The isoelectric point calculator is built in Rust and requires the Rust programming language and Cargo (Rust's package manager) to be installed.

To install Rust and Cargo (included in the Rust installation), use rustup by following the instructions at the Rust website.

The tool was developed and verified to compile successfully on Rust version 1.89.0. While earlier versions may work, Rust version 1.89.0 or newer is recommended for full compatibility.

Setting up the tool

1. Clone the repository

git clone https://github.com/pem131/Rust_isoelectric_point_calculator

2. Navigate to the directory

cd Rust_isoelectric_point_calculator

3. Compile the tool

cargo build

Usage

The tool can take amino acid letters directly (case insensitive) or extract them from a fasta file.

Example of how to use it in amino acid mode (default):

cargo run -- HKAQQVVYYTT

cargo run -- hkaqqvvyytt

To use it in fasta mode you need to (1) locate the fasta file in the tool's directory and (2) set an environment variable. If you are using Linux/UNIX/macOS:

FASTA=1 cargo run -- example.fasta

If you are using PowerShell, you need to set the environment variable and unset it when finished:

$Env:FASTA=1; cargo run -- example.fasta

Remove-Item Env:FASTA

The output will look like the following:

Isoelectric point estimation: rounded value (value)

where the value has been rounded with bankers' rounding (default rounding algorithm in Rust).

License

Licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages