Quickstart Instructions
This guide provides a quick overview of how to get started with peakipy
. Follow these instructions to set up your environment, install the necessary components, and execute basic commands.
Inputs
To work with peakipy
, you will need the following input files:
1. Peak List: A formatted file that describes the peaks of interest. Refer to the instructions for formatting guidance.
2. NMRPipe Frequency Domain Dataset: This can be a 2D or pseudo 3D dataset for processing.
Main Commands
peakipy
provides four main commands to facilitate peak analysis:
-
peakipy read
Converts your peak list into a.csv
file while selecting clusters of peaks.
Usage:
-
peakipy edit
Interactively checks and adjusts fit parameters (i.e., clusters and mask radii) if the initial clustering is not satisfactory.
Usage:
-
peakipy fit
Fits clusters of peaks using the.csv
peak list generated (or edited) by theread
(oredit
) command(s).
Usage:
-
peakipy check
Checks individual fits or groups of fits and generates plots.
Usage:
For more details on how to run these scripts, check the instructions. You can also use the --help
flag for further guidance on running each command (e.g., peakipy read --help
).
How to Install peakipy
Using uv
(recommended)
Either of the following approaches should work:
- Clone the
peakipy
repository:
The uv sync
command will automatically create a virtual environment for you in .venv
which you can then activate with the usual source .venv/bin/activate
.
- Install from PyPI:
Using pip
- Install
peakipy
using pip:
Example Bash Script
Below is an example of an installation script and a basic use case:
#!/bin/bash
# Create a virtual environment and activate it
uv venv --python 3.12
source .venv/bin/activate
# Install peakipy
uv pip install peakipy
# Process some data using peakipy
peakipy read peaks.a2 test.ft2 a2 --y-radius-ppm 0.213 --show
peakipy edit peaks.csv test.ft2 # Adjust fitting parameters
peakipy fit peaks.csv test.ft2 fits.csv --vclist vclist --max-cluster-size 15
peakipy check fits.csv test.ft2 --clusters 1 --clusters 2 --clusters 3 --colors purple green --show --outname tmp.pdf
Run this script by sourcing the file:
Note: It is recommended to use a virtual environment:
Requirements
Latest
The latest version (2.1.2) of peakipy
requires Python 3.11 or above (see pyproject.toml
for details).
Legacy Version (0.2.0)
peakipy
version 0.2.0, which runs on Python 3.8, can be installed as follows: