A bioinf tool for finding genome rearrangements in bacterial genomes
Project description
PaReBrick (Parallel Rearrangement and Breakpoints)
Project goals
Bacterial genomes are remarkably plastic on the evolutionary time scale, and genomic rearrangements such as inversions, deletions, insertions, and duplications independently occur in the genomes of different strains, which may serve a mechanism of the adaptation to changing environmental conditions. Identification of these events requires laborious manual inspection and verification of the phyletic pattern consistency. Thus, the main goal of this project is identification and description of parallel rearrangements occurring in bacterial genomes.
More strictly, our goal is to find characters which are non-convex on a phylogenetic tree, or in other words characters with homoplasy. Homoplasy is when a character state has been gained independently in separate lineages over the course of evolution. You can see an example of convex and non-convex characters below:
Non-convex character (character with homoplasy) |
Convex character (homoplasy-free character) |
---|---|
Methods
This method takes synteny blocks and phylogenetic tree for some strains as input and Method consist of two main parts:
- Constructing characters and them states (~colors of leaves) with synteny blocks:
- Balanced rearrangements (focused in inversions) — search pattern in multiple breakpoint graph;
- Unbalanced rearrangements — considered as copy number variation.
- Checking convexity of constructed characters on a phylogenetic tree. Also counting "measure" of non-convexity for all non-convex characters and sort by its value.
For output size reduction and detection of phyletic patterns of blocks in unbalanced rearrangements case, character clustering is performed.
Installation
PaReBrick can be installed with pip
:
pip install PaReBrick
Now you can run tool from any directory as PaReBrick
(or parebrick
).
Script parameters
Main script of project including all modules together can be run from anywhere as console tool.
Required input
Important for input: Identifiers in tree and on in blocks must be equal;
--tree/t
Tree in newick format, must be parsable by ete3 library. You can read more about formats supported by ete3
--blocks_folder/-b
Path to folder with blocks resulted as output of original Sibelia or maf2synteny tool.
BLOCKS-OBTAIN.md — instruction about how to obtain synteny blocks using SibeliaZ.
Optional input
--labels/-l
Path to csv file with tree labels for showing on phylogenetic tree.
Must contain two columns: strain
and label
.
--output/-o
Path to output folder.
Default is ./parebrick_output
Output
Output consist of tree folders.
preprocessed_data
— here you can findblocks_coords.infercars
for better blocks representation and region annotation. Andgenomes_permutations_unique.txt
file used for calling balanced characters.balanced_rearrangements_output
— this folder containsstats.csv
file with all non-convex characters statistics of balanced rearrangements. And folderscharacters
,trees
with character representation in rendered.pdf
tree and.csv
formats.unbalanced_rearrangements_output
— this folder containsstats.csv
file with all non-convex characters statistics of unbalanced rearrangements. And folderscharacters
,trees
with character in rendered.pdf
tree and.csv
formats in subfolders according to their clustering representation.
Example run and data
Example data is available in example-data
folder.
How to run:
Clone all repository with data:
git clone https://github.com/ctlab/parallel-rearrangements
Change directory to data folder:
cd parallel-rearrangements/example-data/e_coli
Running tool on example input:
PaReBrick -t input/tree.nwk -b input/maf2synteny-output/ -l input/labels.csv
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
Hashes for PaReBrick-0.1.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 956a8b0c65f355a799e8f1d07ecd126d94e825b88bf96d5a769ab5d7f5a29441 |
|
MD5 | 820d4f6e19e5d6fcf8b10704d8afd2ec |
|
BLAKE2b-256 | deae7e54d38865a7395a9c71d87e52f1ad51b437b43a084b933f6b5f5c2aa220 |