{"id":32175367,"url":"https://github.com/brsynth/rpbasicdesign","last_synced_at":"2026-02-21T12:01:28.354Z","repository":{"id":42973249,"uuid":"306582969","full_name":"brsynth/rpbasicdesign","owner":"brsynth","description":"Convert rpSBML file to SBOL + CSV files ready to be used by DNA-Bot.","archived":false,"fork":false,"pushed_at":"2023-05-17T09:45:08.000Z","size":346,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T19:40:04.687Z","etag":null,"topics":["dna-bot","synbio","synthetic-biology"],"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":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-23T09:03:10.000Z","updated_at":"2023-07-18T09:13:02.000Z","dependencies_parsed_at":"2025-09-09T18:43:45.562Z","dependency_job_id":"cadbb6f0-b665-4f31-8897-1cb28f124e8b","html_url":"https://github.com/brsynth/rpbasicdesign","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/brsynth/rpbasicdesign","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpbasicdesign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpbasicdesign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpbasicdesign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpbasicdesign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brsynth","download_url":"https://codeload.github.com/brsynth/rpbasicdesign/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brsynth%2Frpbasicdesign/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29680147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T11:29:27.227Z","status":"ssl_error","status_checked_at":"2026-02-21T11:29:20.292Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["dna-bot","synbio","synthetic-biology"],"created_at":"2025-10-21T19:33:56.684Z","updated_at":"2026-02-21T12:01:28.348Z","avatar_url":"https://github.com/brsynth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpbasicdesign\n\n\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/rpbasicdesign/badges/latest_release_date.svg)](https://anaconda.org/conda-forge/rpbasicdesign)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/rpbasicdesign/badges/version.svg)](https://anaconda.org/conda-forge/rpbasicdesign)\n\n**A command-line tool to convert rpSBML files into SBOL and CSV files ready-to-be used with DNA-Bot.**\n\n**rpbasicdesign** extracts enzyme IDs from rpSBML files -- produced by the RP suite available in the \n[SynBioCAD Galaxy platform](https://galaxy-synbiocad.org) -- to generate genetic constructs compliant with \nthe [BASIC](https://doi.org/10.1021/sb500356d) assembly approach. CSV files produced are ready to be used with\n[DNA-Bot](https://github.com/BASIC-DNA-ASSEMBLY/DNA-BOT) to generate instructions for automated build of the \ngenetic constructs using [OpenTrons](https://opentrons.com/) liquid handling robots.\n\n## Installation\n\n```sh\nconda install -c brsynth -c conda-forge rpbasicdesign\n``` \n\n\n## Usage\n\nSimple call:\n```sh\nconda activate \u003cmyenv\u003e\npython -m rpbasicdesign.cli --rpsbml_file tests/input/muconate_example.xml\n```\n\nOutput folders for dnabot-ready files and SBOL export can be set using `o_dnabot_dir` and `o_sbol_dir` options:\n```sh\npython -m rpbasicdesign.cli \\\n  --rpsbml_file tests/input/muconate_example.xml \\\n  --o_dnabot_dir out/dnabot_input \\\n  --o_sbol_dir out/sbol_export\n```\n\nThe number of constructs to design is tuned using `sample_size`:\n```sh\npython -m rpbasicdesign.cli \\\n  --rpsbml_file tests/input/muconate_example.xml \\\n  --sample_size 5\n```\n\nThe complete list options is provided the embedded help, which can be printed using the `--help` or `-h` keywords:\n```\npython -m rpbasicdesign.cli -h\n\nusage: python -m rpbasicdesign.cli [-h]\n                            --rpsbml_file RPSBML_FILE \n                            [--parts_files PARTS_FILES [PARTS_FILES ...]]\n                            [--lms_id LMS_ID]\n                            [--lmp_id LMP_ID]\n                            [--backbone_id BACKBONE_ID]\n                            [--sample_size SAMPLE_SIZE]\n                            [--cds_permutation CDS_PERMUTATION]\n                            [--max_enz_per_rxn MAX_ENZ_PER_RXN]\n                            [--o_dnabot_dir O_DNABOT_DIR]\n                            [--o_sbol_dir O_SBOL_DIR]\n\nConvert rpSBML enzyme info in to BASIC construct. UniProt IDs corresponding enzyme variants are extracted rpSBMl files. Promoters and RBSs are randomly chosen from a default list. CDSs, in other words gene variants,\nof enzymes are randomly chosen from amongst the UniProt IDs extracted. Constructs generated can be stored as (i) a CSV file ready to be used by DNA-Bot, (ii) as SBOL files.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --rpsbml_file RPSBML_FILE\n                        rpSBML file from which enzymes UniProt IDs will be collected.\n  --parts_files PARTS_FILES [PARTS_FILES ...]\n                        List of files providing available linkers and user parts (backbone, promoters, ...) for constructs. Default: [data/biolegio_parts.csv, user_parts.csv]\n  --lms_id LMS_ID       part ID to be used as the LMS methylated linker. Default: LMS\n  --lmp_id LMP_ID       part ID to be used as the LMP methylated linker. Default: LMP\n  --backbone_id BACKBONE_ID\n                        part ID to be used as the backbone. Default: BASIC_SEVA_37_CmR-p15A.1\n  --sample_size SAMPLE_SIZE\n                        Number of construct to generate.Default: 88\n  --cds_permutation CDS_PERMUTATION\n                        Whether all combinations of CDS permutation should be built Default: true\n  --max_enz_per_rxn MAX_ENZ_PER_RXN\n                        Maximum number of enyzme to consider per reaction. If more enzymes are available for a given reaction, then only the last one listed in the MIRIAM annotation section will be kept.\n  --max_gene_per_construct MAX_GENE_PER_CONSTRUCT\n                        Maximum number of genes per construct. If more genes are required, i.e. more reactions are described in the inputet SBML file, then the execution will failed.\n  --o_dnabot_dir O_DNABOT_DIR\n                        Output folder to write construct and plate files. It will be created if it does not exist yet. Existing files will be overwritten. Default: out/dnabot_in\n  --o_sbol_dir O_SBOL_DIR\n                        Output folder to write SBOL depictions of constructs. Existing files will be overwritten. Default: not output.\n```\n\n## Lycopene example\n\nIf one wishes to only use a subset of BASIC parts, the way to go is to\nprovide a restricted list of parts with the `--parts_file` option. \n\nThe command below generates up to 88 constructs for the lycopene producing\npathway (CrtEBI pathway) defined in `examples/lycopene_CrtEBI_from_selenzy.xml.xml`, using the parts\ndescribed in `examples/parts_for_lycopene.csv`. Output files will be written\nin `examples/lycopene_sbol` folder for SBOL files and `examples/lycopene_dnabot`\nfor DNA-Bot. At the end 88 constructs should be outputted.\n\n```bash\npython -m rpbasicdesign.cli --rpsbml_file examples/lycopene_CrtEBI_from_selenzy.xml --sample_size 88 --parts_files examples/parts_for_lycopene.csv --o_sbol_dir examples/lycopene_sbol_crtEBI --o_dnabot_dir examples/lycopene_dnabot_crtEBI --max_enz_per_rxn 1\n```\n\n## Inputs\n\nThis section documents input files required / optional, their purpose, and how information should be structured.\n\n### rpSBML file [required]\n\nSBML with retropath-like annotations. UnitProt IDs of enzyme are expected to be listed here. More information of rpSBML file at [https://github.com/brsynth/rptools](https://github.com/brsynth/rptools). Some examples or rpSBML files are provided in `tests/input`.\n\n### Parts files [optional]\n\nThese are CSV files listing the linker IDs available for the constructs (BASIC linkers), as well as the user parts (backbone, promoters, ...). The format should be comma separated on 4 columns with header. Example below:\n```\nid,type,sequence,comment\nL1,neutral linker,,\nL2,neutral linker,,\nL3,neutral linker,,\n```\n\nBy default, the `rpbasicdesign/data/biolegio_parts.csv` file is used which corresponds to the BioLegio commercial plate ([link](https://www.biolegio.com/products-services/basic/)). A second predefined file corresponding to older version of the BioLegio plate is also described in `rpbasicdesign/data/legacy_parts.csv`.\n\nFor linkers, the `type` annotation should be one of `neutral linker`, `methylated linker`, `peptide fusion linker` or `RBS linker`. For user parts, `type` should be one of `backbone` or `constitutive promoter`. Other type will raise a warning and will be omited. By default, [biolegio_parts.csv](rpbasicdesign/data/biolegio_parts.csv) and [user_parts.csv](rpbasicdesign/data/user_parts.csv) are used.\n\nUse the `parts_files` arguments to override.\n\n**Important**:\n- IDs should match the linker naming conventions (see below).\n- IDs should match the IDs used in the plate file inputed to dnabot. As example -- but also ready to be used -- the [biolegio_plate.csv](rpbasicdesign/data/biolegio_plate.csv) is a valid input files for dnabot, with consistent IDs between `biolegio_parts.csv` and `biolegio_plate.csv`.\n\n\n## For developers\n\n### Installation\n\n```sh\ngit clone https://github.com/brsynth/rpbasicdesign.git\ncd rpbasicdesign\nconda env create -f environment.yaml -n \u003cmyenv\u003e\nconda develop -n \u003cmyenv\u003e .\n```\n\n### Tests\n\n```sh\nconda activate \u003cmyenv\u003e\npython -m pytest -v --cov=rpbasicdesign --cov-report html\n```\n\n\n\n## Constraints and limitations\n\nThe BASIC linker set is a major piece of the BASIC assembly method. For a detailed explanation of the BASIS approach,\nsee Storch et. al., ACS Synth. Biol., 2015 (doi: [10.1021/sb500356d](https://doi.org/10.1021/sb500356d)).\n\n### Polycistronic constructs\n\nOnly polycistronic constructs are enabled at the moment.\n\n### Predefined set of linkers\n\nBy default, the set of linkers used is the one presented available in from the commercial plate from BioLegio.\nIf one wants to use its own set of linkers, the user is advised to do it carefully and to look for more information.\n\n### Linker naming conventions\n\nDue to DNA-Bot implementation:\n- RBS linkers should start with the `Un` suffix, where `n` could be any alphanumeric character.\n- Any linkers should have its two half linkers ending with the `-P` and `-S` suffixes listed in the \"plate\" file, ie in the file that provides the well locations containing the DNA fragment. See the BASIC approach paper, and especially the supplementary files for more information.  \n\n### Controlled vocabulary for parts file\n\nParts and linkers provided in the `*_parts.csv` files have to match on the following type:\n\n- `neutral linker`\n- `methylated linker`\n- `RBS linker`\n- `peptide fusion linker`\n- `backbone`\n- `constitutive promoter`\n\n### Providing CDSs \n\nAs of today, CDS are obtained only by parsing rpSBML files. \n\n### Custom linkers\nFor advanced users wishing to play with custom linkers:\n- Linkers and parts can be provided using a custom file with the `--parts_files` argument.\n- Linkers described `user_parts.csv` are not considered.\n- RBS linker IDs have to be in the form `AAA-BBB` with `AAA` being the linker suffix ID.\n- Linker prefixes and suffixes coordinates on the plate have to be listed in `[biolegio|legacy]_plate.csv`.\n\n### Maximum number of CDSs per construct\n\nThe maximum number of genes in a construct limited to 3 with the default `biolegio_plate.csv` RBS library, because\nthere is only 3 different RBS suffix in the commercial BioLegio library. Anyway, if needed, this max number of genes\ncan be relaxed and increased using the `--max_gene_per_construct` parameter.\n\n## TODO\n\n- Better handle logs and add `verbose` option\n\n## References\n\n- Galaxy-SynBioCAD: https://doi.org/10.1101/2020.06.14.145730\n- DNA-Bot: https://doi.org/10.1093/synbio/ysaa010\n- BASIC assembly method: https://doi.org/10.1021/sb500356d\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsynth%2Frpbasicdesign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrsynth%2Frpbasicdesign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrsynth%2Frpbasicdesign/lists"}