A bioinf tool for finding genome rearrangements in bacterial genomes
Project description
PaReBrick: PArallel REarrangements and BReakpoints Identification Toolkit
Motivation
The high plasticity of bacterial genomes is facilitated by numerous mechanisms, including horizontal gene transfer and recombination via flanking repeats.
Genome rearrangements such as inversions, deletions, insertions, and duplications may occur independently in different strains, leading to parallel adaptation or phenotypic diversity.
Such rearrangements may be responsible for virulence, antibiotic resistance, and antigenic variation.
However, identifying these events often requires laborious manual inspection and verification of phyletic pattern consistency.
Methods and Results
We present PaReBrick — a tool implementing an algorithm for identifying parallel rearrangements in bacterial populations.
We define "parallel rearrangements" as events that occur independently in phylogenetically distant bacterial strains and provide a formalization for calling these events.
The tool takes a collection of strains represented as sequences of oriented synteny blocks and a phylogenetic tree as input.
It identifies rearrangements, tests them for consistency with the tree, and ranks events by their parallelism score.
The tool also generates diagrams for each block of interest, facilitating the detection of horizontally transferred blocks, their extra copies, and any inversions involving duplicated blocks.
We demonstrated PaReBrick’s efficiency and accuracy, showing its potential for detecting genome rearrangements responsible for pathogenicity and adaptation in bacterial genomes.
Installation
PaReBrick can be installed using pip
.
Please note that Python <= 3.8 is required (caused by dependencies). To create and activate a Python 3.8 environment using Conda, run the following commands:
conda create -n py38 python=3.8
conda activate py38
Then, install PaReBrick:
pip install PaReBrick
Now you can run the tool from any directory using PaReBrick
(or parebrick
).
Script Parameters
The main script of the project, which includes all modules, can be run from any location as a console tool.
Required Input
Important: Identifiers in the tree and blocks must match.
--tree/-t
Path to a phylogenetic tree in Newick format, parsable by the ete3
library.
For more information about supported formats, see the ete3 documentation.
--blocks_folder/-b
Path to a folder containing synteny blocks, generated by tools such as Sibelia or maf2synteny
.
Refer to BLOCKS-OBTAIN.md for instructions on obtaining synteny blocks using SibeliaZ.
Optional Input
--labels/-l
Path to a CSV file with tree labels for visualization.
The file must contain two columns: strain
and label
.
--output/-o
Path to the output folder.
Default is ./parebrick_output
.
Output
The output consists of three main folders:
preprocessed_data
— Contains all synteny blocks ininfercars
,GRIMM
, andCSV
formats, as well asgenomes_lengths.csv
, which lists the lengths of the provided genomes.balanced_rearrangements_output
— Contains astats.csv
file with statistics of non-convex characters from balanced rearrangements, as well as folders (characters
,tree_colorings
) containing character representations in.pdf
trees and.csv
formats.unbalanced_rearrangements_output
— Similar to the above, but for unbalanced rearrangements. Contains astats.csv
file and subfolders with tree renderings in.pdf
and.csv
formats.
Example Run and Data
Example data is available in the example-data
folder.
How to Run the Example:
- Clone the repository:
git clone https://github.com/ctlab/parallel-rearrangements
- Navigate to the example data folder:
cd parallel-rearrangements/example-data/streptococcus_pyogenes
- Run PaReBrick using the example input:
PaReBrick -t input/tree.nwk -b input/maf2synteny-output -l input/labels.csv
Or, run with minimal required arguments (without labels):
PaReBrick -t input/tree.nwk -b input/maf2synteny-output
Citation
If you use PaReBrick
in your research, please cite:
Alexey Zabelkin, Yulia Yakovleva, Olga Bochkareva, Nikita Alexeev, PaReBrick: PArallel REarrangements and BReakpoints identification toolkit, Bioinformatics, 2021; btab691, https://doi.org/10.1093/bioinformatics/btab691
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
File details
Details for the file PaReBrick-0.5.7.tar.gz
.
File metadata
- Download URL: PaReBrick-0.5.7.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
87aea585e0bc340abad2a4a37d532b5be75872284cabf3c9ad0be83ef372f0e4
|
|
MD5 |
6cdce222d125c436016acc5a17425148
|
|
BLAKE2b-256 |
a59a66cdd176ee86114736a927c1408bc1e5e8b1f46a065384d575facacf8142
|
File details
Details for the file PaReBrick-0.5.7-py3-none-any.whl
.
File metadata
- Download URL: PaReBrick-0.5.7-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3cdf9bbfe066d6cb3ba29c025db83b225a3c3842eab9a9617ae3e71b8d6c631e
|
|
MD5 |
8144361e0e08af7542bb8fcded5da983
|
|
BLAKE2b-256 |
58c9fcc62b7f348705f61368aeccd5dc2c319ffcda311e9ed3b0097f6828c40c
|