{"id":32178372,"url":"https://github.com/brsynth/rr_cache","last_synced_at":"2025-10-21T20:54:10.975Z","repository":{"id":60722861,"uuid":"355925261","full_name":"brsynth/rr_cache","owner":"brsynth","description":"RetroRules Cache","archived":false,"fork":false,"pushed_at":"2025-09-25T16:49:08.000Z","size":186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-25T17:19:14.393Z","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/brsynth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-04-08T13:48:18.000Z","updated_at":"2025-09-25T16:49:12.000Z","dependencies_parsed_at":"2025-07-28T10:01:46.166Z","dependency_job_id":"f4ec2581-8639-43a7-b4f1-2ffdadab52f3","html_url":"https://github.com/brsynth/rr_cache","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/brsynth/rr_cache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frr_cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frr_cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frr_cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frr_cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brsynth","download_url":"https://codeload.github.com/brsynth/rr_cache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frr_cache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280333496,"owners_count":26312845,"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-21T02:00:06.614Z","response_time":58,"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-21T20:54:09.321Z","updated_at":"2025-10-21T20:54:10.961Z","avatar_url":"https://github.com/brsynth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rr_cache\nRetroRules and MetaNetX cache\n| Name | Downloads | Version | Platforms |\n| --- | --- | --- | --- |\n| [![Conda Recipe](https://img.shields.io/badge/recipe-rr_cache-green.svg)](https://anaconda.org/conda-forge/rr_cache) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/rr_cache.svg)](https://anaconda.org/conda-forge/rr_cache) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/rr_cache.svg)](https://anaconda.org/conda-forge/rr_cache) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/rr_cache.svg)](https://anaconda.org/conda-forge/rr_cache) |\n\n## Description\n*rr_cache* provides a cache for RetroRules and MetaNetX compounds and reactions\n\n## Requirements\nrr_cache has the following dependencies:\n- `brs_utils`\n- `requests`\n- `rdkit`\n- `colored`\n\nThese dependencies can be installed through conda package manager with:\n```sh\nconda install -c conda-forge brs_utils requests rdkit colored\n```\nor by creating a dedicated environment:\n```sh\nconda env create -f environment.yaml\n```\n\n## Install\n### From Conda\n```sh\n[sudo] conda install -c conda-forge rr_cache\n```\n\n## Use\n\nAll cache data are stored into files on disk and loaded in memory each time the tool is used. Memory fingerprint is equal to the size of cache files loaded in memory multiplied by the number of processes which are running at the same time.\n\nIf the cache is present in the current working directory, it will be used. Otherwise, it will be downloaded from the remote repository. If it not possible to download the cache, either because it is not possible to reach it remotely or because the option `--do-not-dwnl-cache` is set, it will be generated from scratch.\n\n### Load rrCache in memory\n```python\nfrom rr_cache import rrCache\n\ncache = rrCache()\nprint(cache.cid_strc)\n```\n\n**A part of cache**\nFor less loading time and memory footprint, a part of the cache can be loaded:\n```python\nfrom rr_cache import rrCache\n\ncache = rrCache(['cid_strc'])\ncache.get_compound('MNXM2')\n```\n***From CLI***\n```sh\npython -m rr_cache --reaction-rules \u003cRuleID_1\u003e \u003cRuleID_2\u003e...\n```\nIf `RuleID_i` is(are) set, prints out the reaction rule(s) or all reaction rules if nothing is specified.\n\n```sh\npython -m rr_cache --reactions \u003cRxnID_1\u003e \u003cRxnID_2\u003e...\n```\nIf `RxnID_i` is(are) set, prints out the reaction(s) or all reactions if nothing is specified.\n\n```sh\npython -m rr_cache --compounds \u003cCmpdID_1\u003e \u003cCmpdID_2\u003e...\n```\nIf `CmpdID_i` is(are) set, prints out the compound(s) or all compounds if nothing is specified.\n\n```sh\npython -m rr_cache --data-type \u003cDataType\u003e\n```\nIf `DataType` is set, set the data type of the cache (default is `mnx3.1`).\n\n### (Re-)build the cache\n**From Python code**\n```python\nfrom rr_cache import rrCache\n\nrrCache.Build(outdir)\n```\n\n**From CLI**\n```sh\npython -m rr_cache --build \u003cfolder\u003e\n```\n\n\n## Test\nPlease follow instructions below ti run tests:\n```\ncd tests\npytest -v\n```\nFor further tests and development tools, a CI toolkit is provided in `ci` folder (see [ci/README.md](ci/README.md)).\n\n\n## Authors\n\n* **Joan Hérisson**\n* **Melchior du Lac**\n\n## Acknowledgments\n\n* Thomas Duigou\n\n\n## Licence\nrr_cache is released under the MIT licence. See the LICENCE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsynth%2Frr_cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrsynth%2Frr_cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsynth%2Frr_cache/lists"}