{"id":32611464,"url":"https://github.com/ctlab/parallel-rearrangements","last_synced_at":"2025-10-30T13:59:06.288Z","repository":{"id":45516305,"uuid":"268780601","full_name":"ctlab/parallel-rearrangements","owner":"ctlab","description":"parallel rearrangements caller","archived":false,"fork":false,"pushed_at":"2024-10-06T19:24:31.000Z","size":237777,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-27T10:08:41.468Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-02T11:18:58.000Z","updated_at":"2025-08-04T21:26:41.000Z","dependencies_parsed_at":"2022-07-16T10:46:23.435Z","dependency_job_id":null,"html_url":"https://github.com/ctlab/parallel-rearrangements","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ctlab/parallel-rearrangements","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2Fparallel-rearrangements","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2Fparallel-rearrangements/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2Fparallel-rearrangements/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2Fparallel-rearrangements/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctlab","download_url":"https://codeload.github.com/ctlab/parallel-rearrangements/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctlab%2Fparallel-rearrangements/sbom","scorecard":{"id":311803,"data":{"date":"2025-08-11","repo":{"name":"github.com/ctlab/parallel-rearrangements","commit":"3128939c8aa1ffab1a28196e42ff1ca05638820f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T23:17:50.507Z","repository_id":45516305,"created_at":"2025-08-17T23:17:50.508Z","updated_at":"2025-08-17T23:17:50.508Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281818072,"owners_count":26566859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-30T13:58:10.233Z","updated_at":"2025-10-30T13:59:06.279Z","avatar_url":"https://github.com/ctlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PaReBrick: PArallel REarrangements and BReakpoints Identification Toolkit\n\n---\n## Motivation\nThe high plasticity of bacterial genomes is facilitated by numerous mechanisms, including horizontal gene transfer and recombination via flanking repeats.  \nGenome rearrangements such as inversions, deletions, insertions, and duplications may occur independently in different strains, leading to parallel adaptation or phenotypic diversity.  \nSuch rearrangements may be responsible for virulence, antibiotic resistance, and antigenic variation.  \nHowever, identifying these events often requires laborious manual inspection and verification of phyletic pattern consistency.\n\n## Methods and Results\n\n![Pipeline of tool](figs/pipeline.svg)\n\nWe present **PaReBrick** — a tool implementing an algorithm for identifying parallel rearrangements in bacterial populations.  \nWe define \"parallel rearrangements\" as events that occur independently in phylogenetically distant bacterial strains and provide a formalization for calling these events.\n\nThe tool takes a collection of strains represented as sequences of oriented synteny blocks and a phylogenetic tree as input.  \nIt identifies rearrangements, tests them for consistency with the tree, and ranks events by their parallelism score.  \nThe 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.\n\nWe [demonstrated](https://doi.org/10.1093/bioinformatics/btab691) PaReBrick’s efficiency and accuracy, showing its potential for detecting genome rearrangements responsible for pathogenicity and adaptation in bacterial genomes.\n\n## Installation\n\nPaReBrick can be installed using `pip`.  \nPlease note that Python \u003c= 3.8 is required (caused by dependencies). To create and activate a Python 3.8 environment using Conda, run the following commands:\n\n```bash\nconda create -n py38 python=3.8\nconda activate py38\n```\n\nThen, install PaReBrick:\n\n```bash\npip install PaReBrick\n```\n\nNow you can run the tool from any directory using `PaReBrick` (or `parebrick`).\n\n## Script Parameters\nThe main script of the project, which includes all modules, can be run from any location as a console tool.\n\n### Required Input\n\n**Important:** Identifiers in the tree and blocks must match.\n\n#### `--tree/-t`\nPath to a phylogenetic tree in Newick format, parsable by the `ete3` library.  \nFor more information about supported formats, see the [ete3 documentation](http://etetoolkit.org/docs/latest/tutorial/tutorial_trees.html#reading-and-writing-newick-trees).\n\n#### `--blocks_folder/-b`\nPath to a folder containing synteny blocks, generated by tools such as Sibelia or `maf2synteny`.  \nRefer to [BLOCKS-OBTAIN.md](BLOCKS-OBTAIN.md) for instructions on obtaining synteny blocks using SibeliaZ.\n\n### Optional Input\n\n#### `--labels/-l`\nPath to a CSV file with tree labels for visualization.  \nThe file must contain two columns: `strain` and `label`.\n\n#### `--output/-o`\nPath to the output folder.  \nDefault is `./parebrick_output`.\n\n### Output\nThe output consists of three main folders:\n\n1. **`preprocessed_data`** — Contains all synteny blocks in `infercars`, `GRIMM`, and `CSV` formats, as well as `genomes_lengths.csv`, which lists the lengths of the provided genomes.\n2. **`balanced_rearrangements_output`** — Contains a `stats.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.\n3. **`unbalanced_rearrangements_output`** — Similar to the above, but for unbalanced rearrangements. Contains a `stats.csv` file and subfolders with tree renderings in `.pdf` and `.csv` formats.\n\n## Example Run and Data\nExample data is available in the `example-data` folder.\n\n### How to Run the Example:\n1. Clone the repository:\n```bash\ngit clone https://github.com/ctlab/parallel-rearrangements\n```\n\n2. Navigate to the example data folder:\n```bash\ncd parallel-rearrangements/example-data/streptococcus_pyogenes\n```\n\n3. Run PaReBrick using the example input:\n```bash\nPaReBrick -t input/tree.nwk -b input/maf2synteny-output -l input/labels.csv\n```\n\nOr, run with minimal required arguments (without labels):\n```bash\nPaReBrick -t input/tree.nwk -b input/maf2synteny-output\n```\n\n## Citation\nIf you use `PaReBrick` in your research, please cite:\n\nAlexey 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_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctlab%2Fparallel-rearrangements","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctlab%2Fparallel-rearrangements","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctlab%2Fparallel-rearrangements/lists"}