A command-line utility to rotate and reverse complement GenBank files.
Project description
gb_rotate
A basic Python for rotating and reverse complementing GenBank files based on a numerical offset. This tool updates feature annotations to ensure consistency with the transformed sequence. Intended for personal use and originally developed for rotating plastid genomes.
Features
- Rotate GenBank sequences around a specified offset.
- Reverse complement sequences and update annotations accordingly.
- Compatible with GenBank formatting, preserving header and feature details.
Installation
From PyPI
pip install gb_rotate
From repository
- Clone the repository:
git clone https://github.com/kherronism/gb_rotate.git
- Build and install locally:
cd gb_rotate
pip install .
Usage
Basic usage
After installation, use the gb_rotate command:
gb_rotate -i <input_file> -o <output_file> -r <rotation_offset> -c
Options
| Option | Description |
|---|---|
| -i, --input-file | Path to the input GenBank file (required). |
| -o, --output-file | Path to the output GenBank file (required). |
| -r, --rotation-offset | Rotation offset position (default: 0). |
| -rc, --reverse-complement | Reverse complement the sequence (optional). |
Examples
Rotate only
Rotations should be in the range of 0 to the sequence length. With a rotation_offset of 1000, the first position in the sequence will be the 1001st position in the output.
Rotate a sequence around offset 50000 and save the result:
gb_rotate -i example.gb -o example_rotated.gb -r 50000
Reverse Complement only
Reverse complement a sequence and save the result:
gb_rotate -i example.gb -o example_rc.gb -rc
Combine both
When combining, the reverse complement operation takes place first, followed by the rotation, therefore the offset is applied to the reverse complemented sequence.
Combine both operations:
gb_rotate -i example.gb -o example_modified.gb -r 50000 -rc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gb_rotate-0.1.4.tar.gz.
File metadata
- Download URL: gb_rotate-0.1.4.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d33d83d712ce3e739715bf7a76903855cab671e8a9eb160c6342ad90eacd5bfa
|
|
| MD5 |
6037ad04584d99e982ca0bea6ff9cb71
|
|
| BLAKE2b-256 |
a571bc79db57b1b46185542cb128ff20981e76e9cde09337abb52236863d78fb
|
File details
Details for the file gb_rotate-0.1.4-py3-none-any.whl.
File metadata
- Download URL: gb_rotate-0.1.4-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ba978d28fa51975110eff6268f7985678e60a6d24197b67535e2b5e883ac352
|
|
| MD5 |
63f1785ed20fc137ba513b635f7745d1
|
|
| BLAKE2b-256 |
3a170f347d624bc68e40ff80ad100ec6c53b53b2e9f08d1cfdb973aa76a3e17c
|