{"id":37610979,"url":"https://github.com/brsynth/brs-libs","last_synced_at":"2026-01-16T10:20:53.476Z","repository":{"id":57416435,"uuid":"293841666","full_name":"brsynth/brs-libs","owner":"brsynth","description":"Libraries for rpTools","archived":false,"fork":false,"pushed_at":"2020-12-11T13:02:51.000Z","size":2230,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-04T04:35:38.926Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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":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-09-08T14:52:04.000Z","updated_at":"2020-12-11T13:02:54.000Z","dependencies_parsed_at":"2022-09-26T17:11:30.026Z","dependency_job_id":null,"html_url":"https://github.com/brsynth/brs-libs","commit_stats":null,"previous_names":["brsynth/brs_libs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brsynth/brs-libs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Fbrs-libs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Fbrs-libs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Fbrs-libs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Fbrs-libs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brsynth","download_url":"https://codeload.github.com/brsynth/brs-libs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Fbrs-libs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-16T10:20:53.084Z","updated_at":"2026-01-16T10:20:53.465Z","avatar_url":"https://github.com/brsynth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# brs-libs\n\n[![Anaconda-Server Badge](https://anaconda.org/brsynth/brs_libs/badges/latest_release_date.svg)](https://anaconda.org/brsynth/brs_libs)\n[![Anaconda-Server Badge](https://anaconda.org/brsynth/brs_libs/badges/version.svg)](https://anaconda.org/brsynth/brs_libs)\n![Test suite)](https://github.com/brsynth/brs-libs/workflows/Test%20suite/badge.svg)\n\nLibraries for rpTools:\n* rpSBML\n* rpCache\n* inchikeyMIRIAM\n\n## rpSBML\nDefines SBML structure with additional fields relative to [RetroPath2](https://github.com/brsynth/RetroPath2-wrapper) objects.\n\n\u003c!-- ### Prerequisites\n* Python 3 with the following modules:\n    * python-libsbml\n    * [RDKit](https://www.RDKit.org) --\u003e\n\n## rpCache\n\n### Memory management\n\n#### File mode\nThis is the default mode. All cache data are stored into files on disk and loaded in memory each time the tool is used. In this mode, fingerprint in memory is equal to the size of cache files loaded in memory multiplied by the number of processes which are running at the same time. Option can be specified by `--store-mode file`.\n\n#### DB mode\nIn order to save memory space, cache data can be loaded once in a database (redis) so that the memory space taken is equal to one instance of the cache, whatever the number of processes whic are running. Option can be specified by `--store-mode \u003cdb_host\u003e`, where `db_host` is the hostname on which redis server is running.\n\n\n### Install\n#### From Conda\n```sh\n[sudo] conda install -c brsynth -c conda-forge brs_libs\n```\n\n### Use\n\n#### Load rpCache in memory\n**Full cache into files**\n```python\nfrom brs_libs import rpCache\n\nrpcache = rpCache(db='file')\nprint(rpcache.cid_src)\n```\n\n**Full cache into Redis DB**\nFor multiple instances of rpCache simultaneously, rpCache can be loaded into one single Redis database:\n```python\nfrom brs_libs import rpCache\n\nrpcache = rpCache(db='localhost')\nprint(rpcache.cid_src)\n```\n`localhost` means that rpCache will look for a redis database locally. If there is not, it will start a brand new redis server. `localhost` could be replaced by any hostname that hosts the Redis database.\n\n**A part of cache**\nFor less loading time and memory footprint, a part of the cache can be loaded:\n```python\nfrom brs_libs import rpCache\n\nrpcache = rpCache(attrs='cid_strc')\nprint(rpcache.cid_src)\n```\n\n#### (Re-)generate the cache\n**From Python code**\n```python\nfrom brs_libs import rpCache\n\nrpCache.generate_cache(outdir)\n```\n\n**From CLI**\nAfter having installed brs_libs Python module:\n```sh\npython -m brs_libs --gen_cache \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## inchikeyMIRIAM\nUses the rpCache to parse an SBML file to find all the chemical species, and try to recover the inchikey and add it to the MIRIAM annotation.\n\n\n\n## Authors\n\n* **Melchior du Lac**\n* **Joan Hérisson**\n\n## Acknowledgments\n\n* Thomas Duigou\n\n\n## Licence\nbrs_libs 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%2Fbrs-libs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrsynth%2Fbrs-libs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsynth%2Fbrs-libs/lists"}