# HG changeset patch # User tduigou # Date 1753264019 0 # Node ID 2655e08cd61af7d43400b4a8588b1e357d3cc1ac # Parent 3a3b0f7cb5c2d3368800a5d7840979769b084e6f planemo upload for repository https://github.com/Edinburgh-Genome-Foundry/DnaCauldron/tree/master commit db4ac861e1d03fcdfe94321d858839124e493930-dirty diff -r 3a3b0f7cb5c2 -r 2655e08cd61a cloning_similation.xml --- a/cloning_similation.xml Wed Jun 11 09:32:59 2025 +0000 +++ b/cloning_similation.xml Wed Jul 23 09:46:59 2025 +0000 @@ -1,8 +1,8 @@ A cloning simulator for synthetic biology - 0 - 0.1.0 + 1 + 0.2.0 flametree @@ -31,36 +31,47 @@ --parts_files '$genbank_file_paths' --domesticated_seq '$domesticated_input_paths' --assembly_csv 'assembly_csv.csv' - --assembly_plan_name '$assembly_plan_name' --file_name_mapping '$file_name_mapping' --file_name_mapping_dom '$file_name_mapping_dom' - --use_file_names_as_id '$adv.use_file_names_as_ids' + --use_json_paramers '$json_use.use_json_paramers' + #if not $json_use.use_json_paramers: + --enzyme '$json_use.enzyme' + --topology '$json_use.topology' + --assembly_plan_name '$json_use.assembly_plan_name' + #else: + --json_conf '$json_use.json_conf' + #end if + --use_file_names_as_id '$use_file_names_as_ids' --outdir_simulation 'outdir_zip' --outdir_gb 'outdir_gb' - --output_simulation 'output_zip.zip' - --enzyme '$adv.enzyme' - --topology '$topology' && + --output_simulation 'output_zip.zip' && cp 'output_zip.zip' '$output_zip' ]]> - - - - - - - - - - - -
- - -
+ + + + + + + + + + + + + + + + + + + + +
@@ -88,9 +99,12 @@ - - - + + + + + + @@ -130,9 +144,12 @@ - - - + + + + + + @@ -168,9 +185,12 @@ - - - + + + + + + @@ -194,9 +214,12 @@ - - - + + + + + + @@ -220,9 +243,12 @@ - - - + + + + + + @@ -263,7 +289,12 @@ - + + + + + + @@ -273,8 +304,6 @@ - - @@ -325,9 +354,67 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -369,6 +456,7 @@ **Parameters**: --------------- +* **Use parameters from JSON**: Yes/No parameter to ask user if he wants to set parameters manually or using JSON file. * **Assemby csv**: csv file containes the construct names with their parts. (Without Header) * **GenBank files**: Upload all the parts sequences for your assembli(es). Don't forget the receptor vector(s). * **Domesticated GenBank**: Dimesticated GenBank list (Optional) diff -r 3a3b0f7cb5c2 -r 2655e08cd61a cloning_simulation.py --- a/cloning_simulation.py Wed Jun 11 09:32:59 2025 +0000 +++ b/cloning_simulation.py Wed Jul 23 09:46:59 2025 +0000 @@ -1,5 +1,6 @@ import argparse import os +import json import zipfile import pandas import dnacauldron @@ -143,9 +144,9 @@ help="output of domestication (ganbank list)") parser.add_argument("--assembly_csv", required=True, help="csv assembly") - parser.add_argument('--assembly_plan_name', type=str, + parser.add_argument('--assembly_plan_name', type=str, required=False, help='type of assembly') - parser.add_argument('--topology', type=str, + parser.add_argument('--topology', type=str, required=False, help='"circular" or "linear"') parser.add_argument('--file_name_mapping', type=str, help='Mapping of Galaxy filenames to original filenames') @@ -157,10 +158,14 @@ help="dir output for cloning simulation results") parser.add_argument("--output_simulation", required=True, help="zip output for cloning simulation results") - parser.add_argument('--enzyme', type=str, + parser.add_argument('--enzyme', type=str,required=False, help='enzyme to use') parser.add_argument("--outdir_gb", required=True, help="dir output constructs gb files") + parser.add_argument("--use_json_paramers", required=True, + help="Use parameters from JSON: true/false") + parser.add_argument("--json_conf", required=False, + help="JSON config file with DB parameters") return parser.parse_args() @@ -168,10 +173,28 @@ if __name__ == "__main__": args = parse_command_line_args() + #json param checking + config_params = {} + use_json = args.use_json_paramers == 'true' + if use_json: + if not args.json_conf: + raise ValueError("You must provide --json_conf when --use_json_paramers is 'true'") + with open(args.json_conf, "r") as f: + config_params = json.load(f) + else: + config_params = { + "assembly_plan_name": args.assembly_plan_name, + "topology": args.topology, + "enzyme": args.enzyme + } + assembly_plan_name = config_params["assembly_plan_name"] + topology = config_params["topology"] + enzyme = config_params["enzyme"] + cloning_simulation( args.parts_files, args.domesticated_seq, - args.assembly_csv, args.assembly_plan_name, args.topology, + args.assembly_csv, assembly_plan_name, topology, args.file_name_mapping, args.file_name_mapping_dom, args.use_file_names_as_id, args.outdir_simulation, - args.output_simulation, args.enzyme, args.outdir_gb + args.output_simulation, enzyme, args.outdir_gb ) diff -r 3a3b0f7cb5c2 -r 2655e08cd61a output.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/output.html Wed Jul 23 09:46:59 2025 +0000 @@ -0,0 +1,291 @@ + + + + + + + Test Results (powered by Planemo) + + + + + + + + + + +
+
+
+
+ + + + + + + \ No newline at end of file diff -r 3a3b0f7cb5c2 -r 2655e08cd61a output.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/output.json Wed Jul 23 09:46:59 2025 +0000 @@ -0,0 +1,1986 @@ +{ + "summary": { + "num_errors": 0, + "num_failures": 0, + "num_skips": 0, + "num_tests": 7 + }, + "tests": [ + { + "data": { + "inputs": { + "adv|use_file_names_as_ids": true, + "assembly_csv": { + "id": "5251f3a41a1cbe5c", + "src": "hda" + }, + "assembly_plan_name": "Type2sRestrictionAssembly", + "genbank_files": { + "id": "b685bcc6830b171b", + "src": "hdca" + }, + "topology": "circular" + }, + "job": { + "command_line": "mkdir 'outdir_zip' && mkdir 'outdir_gb' && cp '/tmp/tmp2jitj5ti/files/c/2/9/dataset_c29f7add-5948-4171-8ac2-f87d5bf0f6f6.dat' 'assembly_csv.csv' && python '/home/rkhaled/galaxytools/tools/cloning_simulation/cloning_simulation.py' --parts_files '/tmp/tmp2jitj5ti/files/e/6/3/dataset_e63928a2-379c-45c8-8839-98a0df69a5cb.dat,/tmp/tmp2jitj5ti/files/4/4/7/dataset_44790451-2c88-485c-b4d5-d0f4bf78a093.dat,/tmp/tmp2jitj5ti/files/7/3/5/dataset_7354b218-2236-4b40-bdcb-3a46917a6e0f.dat,/tmp/tmp2jitj5ti/files/a/8/e/dataset_a8e12f0e-8a7c-48dd-a8ef-6988c90a7e58.dat,/tmp/tmp2jitj5ti/files/a/2/9/dataset_a298e5dd-536e-4652-8690-5132027c738c.dat,/tmp/tmp2jitj5ti/files/d/c/d/dataset_dcd006e1-e03f-42ed-b029-00134dd29dd1.dat,/tmp/tmp2jitj5ti/files/2/a/f/dataset_2aff75ea-f829-4836-a3dc-7cb018e02383.dat,/tmp/tmp2jitj5ti/files/a/1/8/dataset_a180d7ab-0c41-48d4-8941-3d8d251808a6.dat,/tmp/tmp2jitj5ti/files/6/9/2/dataset_692e75b8-b311-48e4-9b81-92c7addf1f79.dat,/tmp/tmp2jitj5ti/files/9/b/3/dataset_9b37829a-f97b-4f67-8243-bf2bd14ae4b6.dat,/tmp/tmp2jitj5ti/files/c/1/2/dataset_c12c0090-a770-4e92-9398-1a66760dc274.dat,/tmp/tmp2jitj5ti/files/5/2/1/dataset_521c5340-7b41-4b46-aa04-9be9ab5e99fd.dat' --domesticated_seq '' --assembly_csv 'assembly_csv.csv' --assembly_plan_name 'Type2sRestrictionAssembly' --file_name_mapping '/tmp/tmp2jitj5ti/files/e/6/3/dataset_e63928a2-379c-45c8-8839-98a0df69a5cb.dat:part_A.gb,/tmp/tmp2jitj5ti/files/4/4/7/dataset_44790451-2c88-485c-b4d5-d0f4bf78a093.dat:part_B.gb,/tmp/tmp2jitj5ti/files/7/3/5/dataset_7354b218-2236-4b40-bdcb-3a46917a6e0f.dat:part_C.gb,/tmp/tmp2jitj5ti/files/a/8/e/dataset_a8e12f0e-8a7c-48dd-a8ef-6988c90a7e58.dat:part_D.gb,/tmp/tmp2jitj5ti/files/a/2/9/dataset_a298e5dd-536e-4652-8690-5132027c738c.dat:part_E.gb,/tmp/tmp2jitj5ti/files/d/c/d/dataset_dcd006e1-e03f-42ed-b029-00134dd29dd1.dat:part_F.gb,/tmp/tmp2jitj5ti/files/2/a/f/dataset_2aff75ea-f829-4836-a3dc-7cb018e02383.dat:part_G.gb,/tmp/tmp2jitj5ti/files/a/1/8/dataset_a180d7ab-0c41-48d4-8941-3d8d251808a6.dat:part_H.gb,/tmp/tmp2jitj5ti/files/6/9/2/dataset_692e75b8-b311-48e4-9b81-92c7addf1f79.dat:part_I.gb,/tmp/tmp2jitj5ti/files/9/b/3/dataset_9b37829a-f97b-4f67-8243-bf2bd14ae4b6.dat:part_J.gb,/tmp/tmp2jitj5ti/files/c/1/2/dataset_c12c0090-a770-4e92-9398-1a66760dc274.dat:part_K.gb,/tmp/tmp2jitj5ti/files/5/2/1/dataset_521c5340-7b41-4b46-aa04-9be9ab5e99fd.dat:part_L.gb' --file_name_mapping_dom '' --use_file_names_as_id 'true' --outdir_simulation 'outdir_zip' --outdir_gb 'outdir_gb' --output_simulation 'output_zip.zip' --enzyme 'auto' --topology 'circular' && cp 'output_zip.zip' '/tmp/tmp2jitj5ti/job_working_directory/000/14/outputs/dataset_d929e00d-64fe-466c-820f-898fef1ddd39.dat'", + "command_version": "", + "copied_from_job_id": null, + "create_time": "2025-06-06T10:05:03.918951", + "dependencies": [], + "exit_code": 0, + "external_id": "384868", + "galaxy_version": "24.2", + "handler": null, + "history_id": "b685bcc6830b171b", + "id": "382e0b9a3dd586fb", + "inputs": { + "assembly_csv": { + "id": "5251f3a41a1cbe5c", + "src": "hda", + "uuid": "c29f7add-5948-4171-8ac2-f87d5bf0f6f6" + }, + "genbank_files1": { + "id": "b685bcc6830b171b", + "src": "hda", + "uuid": "e63928a2-379c-45c8-8839-98a0df69a5cb" + }, + "genbank_files10": { + "id": "07723b52981231a1", + "src": "hda", + "uuid": "9b37829a-f97b-4f67-8243-bf2bd14ae4b6" + }, + "genbank_files11": { + "id": "830f955cbdf9a561", + "src": "hda", + "uuid": "c12c0090-a770-4e92-9398-1a66760dc274" + }, + "genbank_files12": { + "id": "71dab170b139725e", + "src": "hda", + "uuid": "521c5340-7b41-4b46-aa04-9be9ab5e99fd" + }, + "genbank_files2": { + "id": "48e269c64ce4fce2", + "src": "hda", + "uuid": "44790451-2c88-485c-b4d5-d0f4bf78a093" + }, + "genbank_files3": { + "id": "abbe1d9cd04428c7", + "src": "hda", + "uuid": "7354b218-2236-4b40-bdcb-3a46917a6e0f" + }, + "genbank_files4": { + "id": "b93fb7c1f8bf7b46", + "src": "hda", + "uuid": "a8e12f0e-8a7c-48dd-a8ef-6988c90a7e58" + }, + "genbank_files5": { + "id": "45bf0c3ad4473005", + "src": "hda", + "uuid": "a298e5dd-536e-4652-8690-5132027c738c" + }, + "genbank_files6": { + "id": "4efa4181abcbfe3f", + "src": "hda", + "uuid": "dcd006e1-e03f-42ed-b029-00134dd29dd1" + }, + "genbank_files7": { + "id": "beb5db8871971f36", + "src": "hda", + "uuid": "2aff75ea-f829-4836-a3dc-7cb018e02383" + }, + "genbank_files8": { + "id": "bc095eef87c18a70", + "src": "hda", + "uuid": "a180d7ab-0c41-48d4-8941-3d8d251808a6" + }, + "genbank_files9": { + "id": "9f6ba43f26fd6d3f", + "src": "hda", + "uuid": "692e75b8-b311-48e4-9b81-92c7addf1f79" + } + }, + "job_messages": [], + "job_metrics": [], + "job_runner_name": null, + "job_stderr": "", + "job_stdout": "", + "model_class": "Job", + "output_collections": { + "construct_gb": { + "id": "48e269c64ce4fce2", + "src": "hdca" + } + }, + "outputs": { + "__new_primary_file_construct_gb|construct_1__": { + "id": "56254918ce4e0956", + "src": "hda", + "uuid": "41a51dd8-721c-4361-8c96-d4e737f41eec" + }, + "__new_primary_file_construct_gb|construct_2__": { + "id": "aad815be3bbd2bd5", + "src": "hda", + "uuid": "956b70c1-92eb-422d-ab4f-808a8b962d1f" + }, + "__new_primary_file_construct_gb|construct_3__": { + "id": "720f24a804e8d612", + "src": "hda", + "uuid": "998417d6-f292-4477-a81c-962b56e7a0e0" + }, + "__new_primary_file_construct_gb|construct_4__": { + "id": "d6de5bc932d51475", + "src": "hda", + "uuid": "e7c25803-f52c-4a42-8dc6-c9191701d749" + }, + "output_zip": { + "id": "382e0b9a3dd586fb", + "src": "hda", + "uuid": "d929e00d-64fe-466c-820f-898fef1ddd39" + } + }, + "params": { + "__input_ext": "\"input\"", + "adv": "{\"enzyme\": \"auto\", \"use_file_names_as_ids\": true}", + "assembly_plan_name": "\"Type2sRestrictionAssembly\"", + "chromInfo": "\"/tmp/tmp2jitj5ti/galaxy-dev/tool-data/shared/ucsc/chrom/?.len\"", + "dbkey": "\"?\"", + "domesticated_input": null, + "genbank_files": "{\"values\": [{\"id\": 1, \"src\": \"hdca\"}]}", + "topology": "\"circular\"" + }, + "state": "ok", + "stderr": "\rassembly: 0%| | 0/4 [00:00