A simple package for VTNA analysis of chemical reactions
Kinalite - Simple VTNA
Kinalite is a Python package that provides a simple API for running Variable Time Normalization Analysis on chemical data.
Kinalite can be installed with pip:
$ pip install kinalite
To use kinalite you will need to provide two DataFrames with experiment data to compare. Kinalite will then use VTNA to find a best order for the first experiment.
The first step is using the Pandas package to convert your experiment data into DataFrames:
import pandas as pd # supply an absolute or relative path to CSV files experiment_a_data = pd.read_csv('./data/experiment_a.csv') experiment_b_data = pd.read_csv('./data/experiment_b.csv')
These CSV files need to have a single header row and time in the first columns. All values, including Time, are numbers. For example:
Next you can use your converted data to create an
Experiment and run VTNA. You must also provide the
column indexes for the substrate and product, starting at 0 (Time is column index 0):
import pandas as pd from kinalite.experiment import Experiment # supply an absolute or relative path to CSV files experiment_a_data = pd.read_csv('./data/experiment_a.csv') experiment_b_data = pd.read_csv('./data/experiment_b.csv') # create an experiment and supply the column indexes for the substrate and product experiment = Experiment('A', [experiment_a_data, experiment_b_data], substrate_index=2, product_index=4) # run VTNA and print out the best order result = experiment.calculate_best_result() print('Order in A: ', result.order)
Kinalite provides some plotting methods to help visualize the results of running VTNA:
from kinalite.plots import plot_experiment_results plot_experiment_results(experiment)
There is also an example script with a comparison of multiple sets of data: kinalite_example/main.py
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.