# HG changeset patch # User tduigou # Date 1753263873 0 # Node ID dad2c4c3450adf6527a634548596e504e52e9abb # Parent 3daf04425ea16fe78918514271b4a50eda0693bb planemo upload for repository https://github.com/brsynth/galaxytools/tree/main/tools commit db4ac861e1d03fcdfe94321d858839124e493930-dirty diff -r 3daf04425ea1 -r dad2c4c3450a output.html --- a/output.html Thu Jun 12 09:04:14 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,291 +0,0 @@ - - - - - - - Test Results (powered by Planemo) - - - - - - - - - - -
-
-
-
- - - - - - - \ No newline at end of file diff -r 3daf04425ea1 -r dad2c4c3450a output.json --- a/output.json Thu Jun 12 09:04:14 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,627 +0,0 @@ -{ - "summary": { - "num_errors": 0, - "num_failures": 3, - "num_skips": 0, - "num_tests": 4 - }, - "tests": [ - { - "data": { - "inputs": { - "adv|execution_enable": false, - "annotation_column": "annotation", - "db_uri": "postgresql://postgres:RK17@localhost:5432/test_fragments_db", - "fragment_column": "fragment", - "genbank_files": { - "id": "d1dc40ebed860870", - "src": "hdca" - }, - "sequence_column": "sequence", - "table": "sample" - }, - "job": { - "command_line": "python '/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py' --input '/tmp/tmphs5lamwi/files/8/6/d/dataset_86d5129f-932a-4577-895e-245fe4d628fc.dat,/tmp/tmphs5lamwi/files/5/d/a/dataset_5dae2e32-d3f9-4f9b-9732-e6e2d297c2a7.dat,/tmp/tmphs5lamwi/files/0/9/a/dataset_09a835e8-673b-43e3-9bb3-f51c3a727f59.dat,/tmp/tmphs5lamwi/files/3/3/7/dataset_337d084d-9ace-4611-ac83-5ad372068c7f.dat,/tmp/tmphs5lamwi/files/6/f/2/dataset_6f2d701c-7b19-4604-a1ee-a74bd2a57870.dat' --sequence_column 'sequence' --annotation_column 'annotation' --db_uri 'postgresql://postgres:RK17__at__localhost:5432/test_fragments_db' --table 'sample' --fragment_column 'fragment' --output '/tmp/tmphs5lamwi/job_working_directory/000/6/outputs/dataset_18f1dadc-56f5-4df2-beeb-04c270bb1b29.dat' --file_name_mapping '/tmp/tmphs5lamwi/files/8/6/d/dataset_86d5129f-932a-4577-895e-245fe4d628fc.dat:p7_L7Ae-Weiss.gb,/tmp/tmphs5lamwi/files/5/d/a/dataset_5dae2e32-d3f9-4f9b-9732-e6e2d297c2a7.dat:p6_Nt-IgKLsequence.gb,/tmp/tmphs5lamwi/files/0/9/a/dataset_09a835e8-673b-43e3-9bb3-f51c3a727f59.dat:p6_Kozak-ATG.gb,/tmp/tmphs5lamwi/files/3/3/7/dataset_337d084d-9ace-4611-ac83-5ad372068c7f.dat:p4_Kt-L7Ae-Weiss.gb,/tmp/tmphs5lamwi/files/6/f/2/dataset_6f2d701c-7b19-4604-a1ee-a74bd2a57870.dat:HC_Amp_ccdB.gb' --json_conf 'None' --execution_enable 'false'", - "command_version": "", - "copied_from_job_id": null, - "create_time": "2025-06-12T08:11:40.445752", - "dependencies": [], - "exit_code": 0, - "external_id": "126337", - "galaxy_version": "24.2", - "handler": null, - "history_id": "d1dc40ebed860870", - "id": "9b05862cf50a24d4", - "inputs": { - "genbank_files1": { - "id": "d1dc40ebed860870", - "src": "hda", - "uuid": "86d5129f-932a-4577-895e-245fe4d628fc" - }, - "genbank_files2": { - "id": "8a8d0bbb0c3dafa4", - "src": "hda", - "uuid": "5dae2e32-d3f9-4f9b-9732-e6e2d297c2a7" - }, - "genbank_files3": { - "id": "bf0fa404613c4f02", - "src": "hda", - "uuid": "09a835e8-673b-43e3-9bb3-f51c3a727f59" - }, - "genbank_files4": { - "id": "f71740853e0eea8f", - "src": "hda", - "uuid": "337d084d-9ace-4611-ac83-5ad372068c7f" - }, - "genbank_files5": { - "id": "5f099fbe1e7e1218", - "src": "hda", - "uuid": "6f2d701c-7b19-4604-a1ee-a74bd2a57870" - } - }, - "job_messages": [], - "job_metrics": [], - "job_runner_name": null, - "job_stderr": "", - "job_stdout": "", - "model_class": "Job", - "output_collections": {}, - "outputs": { - "output": { - "id": "9b05862cf50a24d4", - "src": "hda", - "uuid": "18f1dadc-56f5-4df2-beeb-04c270bb1b29" - } - }, - "params": { - "__input_ext": "\"input\"", - "adv": "{\"execution_enable\": false, \"json_conf\": null}", - "annotation_column": "\"annotation\"", - "chromInfo": "\"/tmp/tmphs5lamwi/galaxy-dev/tool-data/shared/ucsc/chrom/?.len\"", - "db_uri": "\"postgresql://postgres:RK17@localhost:5432/test_fragments_db\"", - "dbkey": "\"?\"", - "fragment_column": "\"fragment\"", - "genbank_files": "{\"values\": [{\"id\": 1, \"src\": \"hdca\"}]}", - "sequence_column": "\"sequence\"", - "table": "\"sample\"" - }, - "state": "ok", - "stderr": "", - "stdout": "Execution disabled because sequence_column is set to 'false'.\n", - "tool_id": "seq_to_db", - "tool_stderr": "", - "tool_stdout": "Execution disabled because sequence_column is set to 'false'.\n", - "update_time": "2025-06-12T08:11:46.862307", - "user_email": "planemo@galaxyproject.org", - "user_id": "d1dc40ebed860870" - }, - "output_problems": [ - "Output output: different than expected\nExpected 5+-0 lines in the output found 0" - ], - "status": "failure", - "test_index": 0, - "time_seconds": 26.20578122138977, - "tool_id": "seq_to_db", - "tool_version": "0.1.0+galaxy0" - }, - "has_data": true, - "id": "seq_to_db-0" - }, - { - "data": { - "inputs": { - "adv|json_conf": { - "id": "faf36c8bb3bbf1fc", - "src": "hda" - }, - "genbank_files": { - "id": "8a8d0bbb0c3dafa4", - "src": "hdca" - } - }, - "job": { - "command_line": "python '/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py' --input '/tmp/tmphs5lamwi/files/2/b/e/dataset_2be2db07-173c-45ff-94a0-3461122df268.dat,/tmp/tmphs5lamwi/files/f/1/5/dataset_f1590ccd-1d12-4f95-98b0-fcc4b2cbc80e.dat,/tmp/tmphs5lamwi/files/8/c/2/dataset_8c22a014-8cf2-4575-ae96-c85556a689fb.dat,/tmp/tmphs5lamwi/files/7/f/b/dataset_7fb30eee-10c8-4d84-932e-28f674b1dfc4.dat,/tmp/tmphs5lamwi/files/4/f/b/dataset_4fb6ab60-c194-420f-b10f-de2aa2086638.dat' --sequence_column '' --annotation_column '' --db_uri '' --table '' --fragment_column '' --output '/tmp/tmphs5lamwi/job_working_directory/000/13/outputs/dataset_1370843e-a97d-4de9-84c1-8965359a1401.dat' --file_name_mapping '/tmp/tmphs5lamwi/files/2/b/e/dataset_2be2db07-173c-45ff-94a0-3461122df268.dat:p7_L7Ae-Weiss.gb,/tmp/tmphs5lamwi/files/f/1/5/dataset_f1590ccd-1d12-4f95-98b0-fcc4b2cbc80e.dat:p6_Nt-IgKLsequence.gb,/tmp/tmphs5lamwi/files/8/c/2/dataset_8c22a014-8cf2-4575-ae96-c85556a689fb.dat:p6_Kozak-ATG.gb,/tmp/tmphs5lamwi/files/7/f/b/dataset_7fb30eee-10c8-4d84-932e-28f674b1dfc4.dat:p4_Kt-L7Ae-Weiss.gb,/tmp/tmphs5lamwi/files/4/f/b/dataset_4fb6ab60-c194-420f-b10f-de2aa2086638.dat:HC_Amp_ccdB.gb' --json_conf '/tmp/tmphs5lamwi/files/d/0/0/dataset_d00d7320-cfff-4799-af9d-476da677e0c1.dat' --execution_enable 'true'", - "command_version": "", - "copied_from_job_id": null, - "create_time": "2025-06-12T08:12:07.955341", - "dependencies": [ - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "pandas", - "version": "2.2.3" - }, - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "sqlalchemy", - "version": "2.0.40" - }, - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "psycopg2", - "version": "2.9.9" - } - ], - "exit_code": 0, - "external_id": "126847", - "galaxy_version": "24.2", - "handler": null, - "history_id": "8a8d0bbb0c3dafa4", - "id": "e932b28e673f61fd", - "inputs": { - "adv|json_conf": { - "id": "faf36c8bb3bbf1fc", - "src": "hda", - "uuid": "d00d7320-cfff-4799-af9d-476da677e0c1" - }, - "genbank_files1": { - "id": "17b31bc27bcedfbf", - "src": "hda", - "uuid": "2be2db07-173c-45ff-94a0-3461122df268" - }, - "genbank_files2": { - "id": "5a37da6eaa46c4f4", - "src": "hda", - "uuid": "f1590ccd-1d12-4f95-98b0-fcc4b2cbc80e" - }, - "genbank_files3": { - "id": "8d24f24cec97882b", - "src": "hda", - "uuid": "8c22a014-8cf2-4575-ae96-c85556a689fb" - }, - "genbank_files4": { - "id": "07e58d3b99df4277", - "src": "hda", - "uuid": "7fb30eee-10c8-4d84-932e-28f674b1dfc4" - }, - "genbank_files5": { - "id": "80d24c12e045669e", - "src": "hda", - "uuid": "4fb6ab60-c194-420f-b10f-de2aa2086638" - } - }, - "job_messages": [], - "job_metrics": [], - "job_runner_name": null, - "job_stderr": "", - "job_stdout": "", - "model_class": "Job", - "output_collections": {}, - "outputs": { - "output": { - "id": "e932b28e673f61fd", - "src": "hda", - "uuid": "1370843e-a97d-4de9-84c1-8965359a1401" - } - }, - "params": { - "__input_ext": "\"input\"", - "adv": "{\"execution_enable\": true, \"json_conf\": {\"values\": [{\"id\": 12, \"src\": \"hda\"}]}}", - "annotation_column": null, - "chromInfo": "\"/tmp/tmphs5lamwi/galaxy-dev/tool-data/shared/ucsc/chrom/?.len\"", - "db_uri": null, - "dbkey": "\"?\"", - "fragment_column": null, - "genbank_files": "{\"values\": [{\"id\": 2, \"src\": \"hdca\"}]}", - "sequence_column": null, - "table": null - }, - "state": "ok", - "stderr": "", - "stdout": "Execution was blocked by config (execution = false)\n", - "tool_id": "seq_to_db", - "tool_stderr": "", - "tool_stdout": "Execution was blocked by config (execution = false)\n", - "update_time": "2025-06-12T08:12:14.967090", - "user_email": "planemo@galaxyproject.org", - "user_id": "d1dc40ebed860870" - }, - "output_problems": [ - "Output output: different than expected\nExpected 5+-0 lines in the output found 0" - ], - "status": "failure", - "test_index": 1, - "time_seconds": 28.067287921905518, - "tool_id": "seq_to_db", - "tool_version": "0.1.0+galaxy0" - }, - "has_data": true, - "id": "seq_to_db-1" - }, - { - "data": { - "inputs": { - "annotation_column": "annotation", - "db_uri": "postgresql://postgres:RK17@localhost:5432/test_fragments_db", - "fragment_column": "fragment", - "genbank_files": { - "id": "bf0fa404613c4f02", - "src": "hdca" - }, - "sequence_column": "sequence", - "table": "sample" - }, - "job": { - "command_line": "python '/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py' --input '/tmp/tmphs5lamwi/files/1/5/a/dataset_15a3a402-8761-43db-81ae-e4bb3f2d41d8.dat,/tmp/tmphs5lamwi/files/0/2/6/dataset_02636863-d06d-46bb-bcd3-c22b162ad92c.dat,/tmp/tmphs5lamwi/files/0/6/a/dataset_06a85205-3621-425b-8eca-56f44a3ceaed.dat,/tmp/tmphs5lamwi/files/5/7/a/dataset_57afe769-fe76-4890-9c62-c2014ecf8529.dat,/tmp/tmphs5lamwi/files/2/a/a/dataset_2aaaf350-bb2f-4390-81e3-6eeeaae0481e.dat' --sequence_column 'sequence' --annotation_column 'annotation' --db_uri 'postgresql://postgres:RK17__at__localhost:5432/test_fragments_db' --table 'sample' --fragment_column 'fragment' --output '/tmp/tmphs5lamwi/job_working_directory/000/19/outputs/dataset_168a000a-8805-4f1d-918e-4ebbd60fd654.dat' --file_name_mapping '/tmp/tmphs5lamwi/files/1/5/a/dataset_15a3a402-8761-43db-81ae-e4bb3f2d41d8.dat:p7_L7Ae-Weiss.gb,/tmp/tmphs5lamwi/files/0/2/6/dataset_02636863-d06d-46bb-bcd3-c22b162ad92c.dat:p6_Nt-IgKLsequence.gb,/tmp/tmphs5lamwi/files/0/6/a/dataset_06a85205-3621-425b-8eca-56f44a3ceaed.dat:p6_Kozak-ATG.gb,/tmp/tmphs5lamwi/files/5/7/a/dataset_57afe769-fe76-4890-9c62-c2014ecf8529.dat:p4_Kt-L7Ae-Weiss.gb,/tmp/tmphs5lamwi/files/2/a/a/dataset_2aaaf350-bb2f-4390-81e3-6eeeaae0481e.dat:HC_Amp_ccdB.gb' --json_conf 'None' --execution_enable 'true'", - "command_version": "", - "copied_from_job_id": null, - "create_time": "2025-06-12T08:12:35.708354", - "dependencies": [ - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "pandas", - "version": "2.2.3" - }, - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "sqlalchemy", - "version": "2.0.40" - }, - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "psycopg2", - "version": "2.9.9" - } - ], - "exit_code": 0, - "external_id": "127455", - "galaxy_version": "24.2", - "handler": null, - "history_id": "bf0fa404613c4f02", - "id": "48ac62a10b51b648", - "inputs": { - "genbank_files1": { - "id": "9863db5e96bd9ae2", - "src": "hda", - "uuid": "15a3a402-8761-43db-81ae-e4bb3f2d41d8" - }, - "genbank_files2": { - "id": "c55450b682f38454", - "src": "hda", - "uuid": "02636863-d06d-46bb-bcd3-c22b162ad92c" - }, - "genbank_files3": { - "id": "b2f6887fdac0a65b", - "src": "hda", - "uuid": "06a85205-3621-425b-8eca-56f44a3ceaed" - }, - "genbank_files4": { - "id": "f5829ca36951d902", - "src": "hda", - "uuid": "57afe769-fe76-4890-9c62-c2014ecf8529" - }, - "genbank_files5": { - "id": "baef710e55d31add", - "src": "hda", - "uuid": "2aaaf350-bb2f-4390-81e3-6eeeaae0481e" - } - }, - "job_messages": [], - "job_metrics": [], - "job_runner_name": null, - "job_stderr": "", - "job_stdout": "", - "model_class": "Job", - "output_collections": {}, - "outputs": { - "output": { - "id": "48ac62a10b51b648", - "src": "hda", - "uuid": "168a000a-8805-4f1d-918e-4ebbd60fd654" - } - }, - "params": { - "__input_ext": "\"input\"", - "adv": "{\"execution_enable\": true, \"json_conf\": null}", - "annotation_column": "\"annotation\"", - "chromInfo": "\"/tmp/tmphs5lamwi/galaxy-dev/tool-data/shared/ucsc/chrom/?.len\"", - "db_uri": "\"postgresql://postgres:RK17@localhost:5432/test_fragments_db\"", - "dbkey": "\"?\"", - "fragment_column": "\"fragment\"", - "genbank_files": "{\"values\": [{\"id\": 3, \"src\": \"hdca\"}]}", - "sequence_column": "\"sequence\"", - "table": "\"sample\"" - }, - "state": "ok", - "stderr": "", - "stdout": "Connected to database.\nProcessing file: dataset_15a3a402-8761-43db-81ae-e4bb3f2d41d8.dat(p7_L7Ae-Weiss)\nProcessing file: dataset_02636863-d06d-46bb-bcd3-c22b162ad92c.dat(p6_Nt-IgKLsequence)\nProcessing file: dataset_06a85205-3621-425b-8eca-56f44a3ceaed.dat(p6_Kozak-ATG)\nProcessing file: dataset_57afe769-fe76-4890-9c62-c2014ecf8529.dat(p4_Kt-L7Ae-Weiss)\nProcessing file: dataset_2aaaf350-bb2f-4390-81e3-6eeeaae0481e.dat(HC_Amp_ccdB)\nInserted 5 fragments.\nFragment names written to '/tmp/tmphs5lamwi/job_working_directory/000/19/outputs/dataset_168a000a-8805-4f1d-918e-4ebbd60fd654.dat'.\n", - "tool_id": "seq_to_db", - "tool_stderr": "", - "tool_stdout": "Connected to database.\nProcessing file: dataset_15a3a402-8761-43db-81ae-e4bb3f2d41d8.dat(p7_L7Ae-Weiss)\nProcessing file: dataset_02636863-d06d-46bb-bcd3-c22b162ad92c.dat(p6_Nt-IgKLsequence)\nProcessing file: dataset_06a85205-3621-425b-8eca-56f44a3ceaed.dat(p6_Kozak-ATG)\nProcessing file: dataset_57afe769-fe76-4890-9c62-c2014ecf8529.dat(p4_Kt-L7Ae-Weiss)\nProcessing file: dataset_2aaaf350-bb2f-4390-81e3-6eeeaae0481e.dat(HC_Amp_ccdB)\nInserted 5 fragments.\nFragment names written to '/tmp/tmphs5lamwi/job_working_directory/000/19/outputs/dataset_168a000a-8805-4f1d-918e-4ebbd60fd654.dat'.\n", - "update_time": "2025-06-12T08:12:41.972140", - "user_email": "planemo@galaxyproject.org", - "user_id": "d1dc40ebed860870" - }, - "status": "success", - "test_index": 2, - "time_seconds": 27.17548680305481, - "tool_id": "seq_to_db", - "tool_version": "0.1.0+galaxy0" - }, - "has_data": true, - "id": "seq_to_db-2" - }, - { - "data": { - "inputs": { - "adv|json_conf": { - "id": "81096e298c6cd33b", - "src": "hda" - }, - "genbank_files": { - "id": "f71740853e0eea8f", - "src": "hdca" - } - }, - "job": { - "command_line": "python '/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py' --input '/tmp/tmphs5lamwi/files/7/7/d/dataset_77d5679d-4fb4-4b27-afe7-930f4b3d6076.dat,/tmp/tmphs5lamwi/files/5/1/a/dataset_51ae04ed-e634-4f46-ae13-0ce31dbacc37.dat,/tmp/tmphs5lamwi/files/c/6/4/dataset_c64f9b84-cf82-4b1b-96cb-3f98f0fda7a9.dat,/tmp/tmphs5lamwi/files/e/f/7/dataset_ef7a853c-dc0e-47dc-bf52-6f45291358b1.dat,/tmp/tmphs5lamwi/files/1/3/a/dataset_13a4680c-d654-45d9-bdab-75dca91c36da.dat' --sequence_column '' --annotation_column '' --db_uri '' --table '' --fragment_column '' --output '/tmp/tmphs5lamwi/job_working_directory/000/26/outputs/dataset_431acc98-f2ee-4e32-876a-33ef788c7eeb.dat' --file_name_mapping '/tmp/tmphs5lamwi/files/7/7/d/dataset_77d5679d-4fb4-4b27-afe7-930f4b3d6076.dat:p7_L7Ae-Weiss.gb,/tmp/tmphs5lamwi/files/5/1/a/dataset_51ae04ed-e634-4f46-ae13-0ce31dbacc37.dat:p6_Nt-IgKLsequence.gb,/tmp/tmphs5lamwi/files/c/6/4/dataset_c64f9b84-cf82-4b1b-96cb-3f98f0fda7a9.dat:p6_Kozak-ATG.gb,/tmp/tmphs5lamwi/files/e/f/7/dataset_ef7a853c-dc0e-47dc-bf52-6f45291358b1.dat:p4_Kt-L7Ae-Weiss.gb,/tmp/tmphs5lamwi/files/1/3/a/dataset_13a4680c-d654-45d9-bdab-75dca91c36da.dat:HC_Amp_ccdB.gb' --json_conf '/tmp/tmphs5lamwi/files/1/6/8/dataset_1681d2f4-591b-48a4-a469-0b6d9d29897b.dat' --execution_enable 'true'", - "command_version": "", - "copied_from_job_id": null, - "create_time": "2025-06-12T08:13:02.907605", - "dependencies": [ - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "pandas", - "version": "2.2.3" - }, - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "sqlalchemy", - "version": "2.0.40" - }, - { - "cacheable": false, - "dependency_resolver": { - "auto_init": true, - "auto_install": true, - "can_uninstall_dependencies": true, - "ensure_channels": "conda-forge,bioconda", - "model_class": "CondaDependencyResolver", - "prefix": "/home/rkhaled/miniconda3", - "read_only": false, - "resolver_type": "conda", - "resolves_simple_dependencies": true, - "use_local": false, - "versionless": false - }, - "dependency_type": "conda", - "environment_path": "/home/rkhaled/miniconda3/envs/mulled-v1-6494927f0d17ef089d943514f10e32b6b4b401affaea78704675d8f812704966", - "exact": true, - "model_class": "MergedCondaDependency", - "name": "psycopg2", - "version": "2.9.9" - } - ], - "exit_code": 1, - "external_id": "127952", - "galaxy_version": "24.2", - "handler": null, - "history_id": "f71740853e0eea8f", - "id": "ae7479dd630bf125", - "inputs": { - "adv|json_conf": { - "id": "81096e298c6cd33b", - "src": "hda", - "uuid": "1681d2f4-591b-48a4-a469-0b6d9d29897b" - }, - "genbank_files1": { - "id": "4bb85627388cf8ba", - "src": "hda", - "uuid": "77d5679d-4fb4-4b27-afe7-930f4b3d6076" - }, - "genbank_files2": { - "id": "00078d50fa80d7bb", - "src": "hda", - "uuid": "51ae04ed-e634-4f46-ae13-0ce31dbacc37" - }, - "genbank_files3": { - "id": "221d11c5cc4eab13", - "src": "hda", - "uuid": "c64f9b84-cf82-4b1b-96cb-3f98f0fda7a9" - }, - "genbank_files4": { - "id": "bc838ca4b455c7c4", - "src": "hda", - "uuid": "ef7a853c-dc0e-47dc-bf52-6f45291358b1" - }, - "genbank_files5": { - "id": "04052285d124af02", - "src": "hda", - "uuid": "13a4680c-d654-45d9-bdab-75dca91c36da" - } - }, - "job_messages": [ - { - "code_desc": "", - "desc": "Fatal error: Exit code 1 ()", - "error_level": 3, - "exit_code": 1, - "type": "exit_code" - } - ], - "job_metrics": [], - "job_runner_name": null, - "job_stderr": "", - "job_stdout": "", - "model_class": "Job", - "output_collections": {}, - "outputs": { - "output": { - "id": "ae7479dd630bf125", - "src": "hda", - "uuid": "431acc98-f2ee-4e32-876a-33ef788c7eeb" - } - }, - "params": { - "__input_ext": "\"input\"", - "adv": "{\"execution_enable\": true, \"json_conf\": {\"values\": [{\"id\": 25, \"src\": \"hda\"}]}}", - "annotation_column": null, - "chromInfo": "\"/tmp/tmphs5lamwi/galaxy-dev/tool-data/shared/ucsc/chrom/?.len\"", - "db_uri": null, - "dbkey": "\"?\"", - "fragment_column": null, - "genbank_files": "{\"values\": [{\"id\": 4, \"src\": \"hdca\"}]}", - "sequence_column": null, - "table": null - }, - "state": "error", - "stderr": "Traceback (most recent call last):\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 273, in \n main()\n ~~~~^^\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 260, in main\n push_gb_annotations(\n ~~~~~~~~~~~~~~~~~~~^\n gb_file_list,\n ^^^^^^^^^^^^^\n ...<6 lines>...\n args.file_name_mapping\n ^^^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 148, in push_gb_annotations\n raise RuntimeError(f\"Fatal Error: Fragment '{fragment_name}' already exists in DB. Stopping the process.\")\nRuntimeError: Fatal Error: Fragment 'p7_L7Ae-Weiss' already exists in DB. Stopping the process.\n", - "stdout": "Connected to database.\nProcessing file: dataset_77d5679d-4fb4-4b27-afe7-930f4b3d6076.dat(p7_L7Ae-Weiss)\nError during GB file insertion: Fatal Error: Fragment 'p7_L7Ae-Weiss' already exists in DB. Stopping the process.\n", - "tool_id": "seq_to_db", - "tool_stderr": "Traceback (most recent call last):\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 273, in \n main()\n ~~~~^^\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 260, in main\n push_gb_annotations(\n ~~~~~~~~~~~~~~~~~~~^\n gb_file_list,\n ^^^^^^^^^^^^^\n ...<6 lines>...\n args.file_name_mapping\n ^^^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 148, in push_gb_annotations\n raise RuntimeError(f\"Fatal Error: Fragment '{fragment_name}' already exists in DB. Stopping the process.\")\nRuntimeError: Fatal Error: Fragment 'p7_L7Ae-Weiss' already exists in DB. Stopping the process.\n", - "tool_stdout": "Connected to database.\nProcessing file: dataset_77d5679d-4fb4-4b27-afe7-930f4b3d6076.dat(p7_L7Ae-Weiss)\nError during GB file insertion: Fatal Error: Fragment 'p7_L7Ae-Weiss' already exists in DB. Stopping the process.\n", - "update_time": "2025-06-12T08:13:09.078361", - "user_email": "planemo@galaxyproject.org", - "user_id": "d1dc40ebed860870" - }, - "output_problems": [ - "Job in error state.. tool_id: seq_to_db, exit_code: 1, stderr: Traceback (most recent call last):\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 273, in \n main()\n ~~~~^^\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 260, in main\n push_gb_annotations(\n ~~~~~~~~~~~~~~~~~~~^\n gb_file_list,\n ^^^^^^^^^^^^^\n ...<6 lines>...\n args.file_name_mapping\n ^^^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 148, in push_gb_annotations\n raise RuntimeError(f\"Fatal Error: Fragment '{fragment_name}' already exists in DB. Stopping the process.\")\nRuntimeError: Fatal Error: Fragment 'p7_L7Ae-Weiss' already exists in DB. Stopping the process.\n.", - "Job in error state.. tool_id: seq_to_db, exit_code: 1, stderr: Traceback (most recent call last):\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 273, in \n main()\n ~~~~^^\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 260, in main\n push_gb_annotations(\n ~~~~~~~~~~~~~~~~~~~^\n gb_file_list,\n ^^^^^^^^^^^^^\n ...<6 lines>...\n args.file_name_mapping\n ^^^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/rkhaled/galaxytools/tools/seq_to_db/save_to_db.py\", line 148, in push_gb_annotations\n raise RuntimeError(f\"Fatal Error: Fragment '{fragment_name}' already exists in DB. Stopping the process.\")\nRuntimeError: Fatal Error: Fragment 'p7_L7Ae-Weiss' already exists in DB. Stopping the process.\n." - ], - "status": "failure", - "test_index": 3, - "time_seconds": 26.706940174102783, - "tool_id": "seq_to_db", - "tool_version": "0.1.0+galaxy0" - }, - "has_data": true, - "id": "seq_to_db-3" - } - ], - "version": "0.1" -} \ No newline at end of file diff -r 3daf04425ea1 -r dad2c4c3450a save_to_db.py --- a/save_to_db.py Thu Jun 12 09:04:14 2025 +0000 +++ b/save_to_db.py Wed Jul 23 09:44:33 2025 +0000 @@ -11,17 +11,6 @@ from sqlalchemy.exc import OperationalError -def resolve_parameters(user_params: dict, json_params: dict, keys: list): - resolved = {} - for key in keys: - # Prefer user parameter if it's provided (not None or empty string) - if key in user_params and user_params[key]: - resolved[key] = user_params[key] - else: - resolved[key] = json_params.get(f"JSON_{key}") - return resolved - - def fix_db_uri(uri): """Replace __at__ with @ in the URI if needed.""" return uri.replace("__at__", "@") @@ -193,70 +182,76 @@ def main(): parser = argparse.ArgumentParser(description="Fetch annotations from PostgreSQL database and save as JSON.") parser.add_argument("--input", required=True, help="Input gb files") - parser.add_argument("--sequence_column", required=True, help="DB column contains sequence for ganbank file") - parser.add_argument("--annotation_column", required=True, help="DB column contains head for ganbank file") - parser.add_argument("--db_uri", required=True, help="Database URI connection string") - parser.add_argument("--table", required=True, help="Table name in the database") - parser.add_argument("--fragment_column", required=True, help="Fragment column name in the database") - parser.add_argument("--output", required=True, help="Text report") - parser.add_argument("--file_name_mapping", required=True, help="real fragments names") + parser.add_argument("--use_json_paramers", required=False, help="Use parameters from JSON: true/false") + parser.add_argument("--sequence_column", required=False, help="DB column contains sequence for GenBank file") + parser.add_argument("--annotation_column", required=False, help="DB column contains head for GenBank file") + parser.add_argument("--db_uri", required=False, help="Database URI connection string") + parser.add_argument("--table", required=False, help="Table name in the database") + parser.add_argument("--fragment_column", required=False, help="Fragment column name in the database") + parser.add_argument("--output", required=False, help="Text report") + parser.add_argument("--file_name_mapping", required=False, help="Real fragment names") parser.add_argument("--json_conf", required=False, help="JSON config file with DB parameters") - parser.add_argument("--execution_enable", required=True, help="enabbe or desable execution directly from the tool option") + parser.add_argument("--execution_enable", required=False, help="Enable or disable execution") + parser.add_argument("--json_generating", required=False, help="Generate JSON: true/false") + parser.add_argument("--json_output", required=False, help="Output path for generated JSON") + args = parser.parse_args() - # enabbe or desable execution based on galaxy param (execution_enable) - if args.execution_enable == 'false': - print("Execution disabled. 'Send Requenst to DB' is set to 'false'") + print("Execution disabled. 'Send Request to DB' is set to 'false'") return - # Load JSON config if provided - json_config = {} - if args.json_conf != 'None' or '': - with open(args.json_conf, "r") as f: - json_config = json.load(f) - if "execution" in json_config and json_config["execution"] == "false": - print("Execution was blocked by config (execution = false)") - return + config_params = {} + use_json = args.use_json_paramers == 'true' + generate_json = args.json_generating == 'true' - # Prefer user input; fallback to JSON_ values if not provided - user_params = { - "table": args.table, - "sequence_column": args.sequence_column, - "annotation_column": args.annotation_column, - "fragment_column": args.fragment_column, - "db_uri": args.db_uri - } + 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) + if config_params.get("execution", "") == "false": + print("Execution blocked by config (execution = false)") + return + else: + config_params = { + "table": args.table, + "sequence_column": args.sequence_column, + "annotation_column": args.annotation_column, + "fragment_column": args.fragment_column, + "db_uri": args.db_uri, + "execution": args.execution_enable + } - keys = ["table", "sequence_column", "annotation_column", "fragment_column", "db_uri"] - resolved = resolve_parameters(user_params, json_config, keys) + if generate_json: + if not args.json_output: + raise ValueError("You must provide --json_output when --json_generating is 'true'") + with open(args.json_output, "w") as f: + json.dump(config_params, f, indent=2) + print(f"JSON configuration written to: {args.json_output}") - # Unpack resolved parameters - table = resolved["table"] - sequence_column = resolved["sequence_column"] - annotation_column = resolved["annotation_column"] - fragment_column = resolved["fragment_column"] - db_uri = fix_db_uri(resolved["db_uri"]) + # Extract final resolved parameters + table = config_params["table"] + sequence_column = config_params["sequence_column"] + annotation_column = config_params["annotation_column"] + fragment_column = config_params["fragment_column"] + db_uri = fix_db_uri(config_params["db_uri"]) - # Prepare gb files gb_file_list = [f.strip() for f in args.input.split(",") if f.strip()] - # Start and wait for DB - # db_name = extract_db_name(db_uri) - # start_postgres_container(db_name) + # Connect to DB MAX_RETRIES = 3 for attempt in range(1, MAX_RETRIES + 1): try: wait_for_db(db_uri) - break # Success + break except Exception as e: if attempt == MAX_RETRIES: print(f"Attempt {attempt} failed: Could not connect to database at {db_uri}.") raise e - else: - time.sleep(2) + time.sleep(2) - # Push annotations + # Push annotations push_gb_annotations( gb_file_list, sequence_column, diff -r 3daf04425ea1 -r dad2c4c3450a seq_to_db.xml --- a/seq_to_db.xml Thu Jun 12 09:04:14 2025 +0000 +++ b/seq_to_db.xml Wed Jul 23 09:44:33 2025 +0000 @@ -1,8 +1,8 @@ Save fragment's sequence in an accessible database and import it from .gb files - 1 - 0.2.0 + 2 + 0.3.0 pandas @@ -11,37 +11,84 @@ - + - - - - - -
- - -
+ + + + + + + + + + + + + + +
+ + json_generating == True + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -51,12 +98,40 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -67,9 +142,14 @@ + + + + + - - + + @@ -79,58 +159,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -160,11 +193,11 @@ * **DB Connection URI**: URI used to connect to the database (e.g., postgresql://postgres:pass@localhost:5432/test_fragments_db). * **Send Requenst to DB**: Enable or Desable the interaction with the DB (can be usefull in workflows). * **DB config as a json file**: JSON file contains the DB configuration: - - "JSON_table": will be the key to the table name. - - "JSON_sequence_column": will be the key to the sequence column. - - "JSON_annotation_column": will be the key to the annotation column. - - "JSON_fragment_column": will be the key to the fragment column. - - "JSON_db_uri": will be the key to the URI. + - "table": will be the key to the table name. + - "sequence_column": will be the key to the sequence column. + - "annotation_column": will be the key to the annotation column. + - "fragment_column": will be the key to the fragment column. + - "db_uri": will be the key to the URI. - "execution": It is the key to execute or block the tool during a workflow ("True" or "False"). ]]> diff -r 3daf04425ea1 -r dad2c4c3450a test-data/test-JSON_arg.json --- a/test-data/test-JSON_arg.json Thu Jun 12 09:04:14 2025 +0000 +++ b/test-data/test-JSON_arg.json Wed Jul 23 09:44:33 2025 +0000 @@ -1,9 +1,8 @@ { - "JSON_table": "sample", - "JSON_sequence_column": "sequence", - "JSON_annotation_column": "annotation", - "JSON_fragment_column": "fragment", - "JSON_db_uri": "postgresql://postgres:RK17@localhost:5432/test_fragments_db", - "execution": "true" -} - \ No newline at end of file + "table": "sample", + "sequence_column": "sequence", + "annotation_column": "annotation", + "fragment_column": "fragment", + "db_uri": "postgresql://postgres:RK17@localhost:5432/test_fragments_db", + "execution": "true" +} \ No newline at end of file diff -r 3daf04425ea1 -r dad2c4c3450a test-data/test-JSON_arg_block.json --- a/test-data/test-JSON_arg_block.json Thu Jun 12 09:04:14 2025 +0000 +++ b/test-data/test-JSON_arg_block.json Wed Jul 23 09:44:33 2025 +0000 @@ -1,9 +1,9 @@ { - "JSON_table": "sample", - "JSON_sequence_column": "sequence", - "JSON_annotation_column": "annotation", - "JSON_fragment_column": "fragment", - "JSON_db_uri": "postgresql://postgres:RK17@localhost:5432/test_fragments_db", - "execution": "false" + "table": "sample", + "sequence_column": "sequence", + "annotation_column": "annotation", + "fragment_column": "fragment", + "db_uri": "postgresql://postgres:RK17@localhost:5432/test_fragments_db", + "execution": "false" } \ No newline at end of file