galaxyproject / bioblend

A Python library for interacting with the Galaxy API
https://bioblend.readthedocs.io/
MIT License
85 stars 113 forks source link

Optional files causing problems invoking workflows (galaxy v20.01) #327

Open Tomnl opened 4 years ago

Tomnl commented 4 years ago

I am getting problems when invoking workflows where optional input file parameters (i.e. the XML tool includes optional="true") are left blank in the workflow.

The workflows will either not run at all or stop at the point reaching the tool with the empty optional input file parameter.

Any ideas?

Using Galaxy v20.01 and bioblend git commit f989789d6e381ae83322877aeb128d974fb8951c

Bioblend running as wc.invoke_workflow(workflow_id, inputs=workflow_inputs_d, history_id=id, inputs_by='name')

I have provided an example small workflow with the tool xcms_merge where the problem occurs. However, I seem to get the problem with any tool with optional fileinputs.

{
    "a_galaxy_workflow": "true", 
    "annotation": "", 
    "format-version": "0.1", 
    "name": "C1_LC-MSMS_DIMS_DIMSn_FRAC_DMA", 
    "steps": {
        "0": {
            "annotation": "", 
            "content_id": null, 
            "errors": null, 
            "id": 0, 
            "input_connections": {}, 
            "inputs": [
                {
                    "description": "", 
                    "name": "LC-MS and LC-MS/MS data files (.mzML)"
                }
            ], 
            "label": "LC-MS and LC-MS/MS data files (.mzML)", 
            "name": "Input dataset collection", 
            "outputs": [], 
            "position": {
                "left": 480.83331298828125, 
                "top": 979.36669921875
            }, 
            "tool_id": null, 
            "tool_state": "{\"collection_type\": \"list\", \"optional\": false}", 
            "tool_version": null, 
            "type": "data_collection_input", 
            "uuid": "1b156e71-fc0a-4e2e-9380-a84e8236471f", 
            "workflow_outputs": [
                {
                    "label": null, 
                    "output_name": "output", 
                    "uuid": "9626c24e-dfdc-4f62-a4b0-2f63f9afedb8"
                }
            ]
        }, 
        "1": {
            "annotation": "", 
            "content_id": "toolshed.g2.bx.psu.edu/repos/lecorguille/msnbase_readmsdata/msnbase_readmsdata/2.8.2.2", 
            "errors": null, 
            "id": 1, 
            "input_connections": {
                "input": {
                    "id": 0, 
                    "output_name": "output"
                }
            }, 
            "inputs": [
                {
                    "description": "runtime parameter for tool MSnbase readMSData", 
                    "name": "input"
                }
            ], 
            "label": null, 
            "name": "MSnbase readMSData", 
            "outputs": [
                {
                    "name": "xsetRData", 
                    "type": "rdata.msnbase.raw"
                }, 
                {
                    "name": "sampleMetadata", 
                    "type": "tabular"
                }
            ], 
            "position": {
                "left": 800.3333740234375, 
                "top": 287.36669921875
            }, 
            "post_job_actions": {}, 
            "tool_id": "toolshed.g2.bx.psu.edu/repos/lecorguille/msnbase_readmsdata/msnbase_readmsdata/2.8.2.2", 
            "tool_shed_repository": {
                "changeset_revision": "226fb89cacc4", 
                "name": "msnbase_readmsdata", 
                "owner": "lecorguille", 
                "tool_shed": "toolshed.g2.bx.psu.edu"
            }, 
            "tool_state": "{\"input\": {\"__class__\": \"RuntimeValue\"}, \"__rerun_remap_job_id__\": null, \"__page__\": null}", 
            "tool_version": "2.8.2.2", 
            "type": "tool", 
            "uuid": "849e9778-1f43-4c1e-be02-4b25f653ca9e", 
            "workflow_outputs": [
                {
                    "label": null, 
                    "output_name": "xsetRData", 
                    "uuid": "8308a1f3-a126-4a45-bfc3-ca8ec7b60f20"
                }, 
                {
                    "label": null, 
                    "output_name": "sampleMetadata", 
                    "uuid": "fdecefbd-65d1-4efd-a61c-c3e4d8cbda89"
                }
            ]
        }, 
        "2": {
            "annotation": "", 
            "content_id": "toolshed.g2.bx.psu.edu/repos/lecorguille/xcms_xcmsset/abims_xcms_xcmsSet/3.6.1+galaxy0", 
            "errors": null, 
            "id": 2, 
            "input_connections": {
                "image": {
                    "id": 1, 
                    "output_name": "xsetRData"
                }
            }, 
            "inputs": [], 
            "label": null, 
            "name": "xcms findChromPeaks (xcmsSet)", 
            "outputs": [
                {
                    "name": "xsetRData", 
                    "type": "rdata.xcms.findchrompeaks"
                }, 
                {
                    "name": "log", 
                    "type": "txt"
                }
            ], 
            "position": {
                "left": 1077.8333740234375, 
                "top": 279.36669921875
            }, 
            "post_job_actions": {}, 
            "tool_id": "toolshed.g2.bx.psu.edu/repos/lecorguille/xcms_xcmsset/abims_xcms_xcmsSet/3.6.1+galaxy0", 
            "tool_shed_repository": {
                "changeset_revision": "14b1c52fae62", 
                "name": "xcms_xcmsset", 
                "owner": "lecorguille", 
                "tool_shed": "toolshed.g2.bx.psu.edu"
            }, 
            "tool_state": "{\"__page__\": null, \"filterSection\": {\"filterRt\": \"\", \"filterAcquisitionNum\": \"\", \"filterMz\": \"\"}, \"methods\": {\"MatchedFilterAdv\": {\"mzdiff\": \"0.6\", \"snthresh\": \"10\", \"max\": \"5\", \"steps\": \"2\", \"sigma\": \"\", \"impute_cond\": {\"impute\": \"none\", \"__current_case__\": 0}}, \"fwhm\": \"30\", \"method\": \"MatchedFilter\", \"__current_case__\": 1, \"binSize\": \"0.1\"}, \"file_load_section\": {\"file_load_conditional\": {\"file_load_select\": \"no\", \"__current_case__\": 0}}, \"__rerun_remap_job_id__\": null, \"image\": {\"__class__\": \"ConnectedValue\"}}", 
            "tool_version": "3.6.1+galaxy0", 
            "type": "tool", 
            "uuid": "a12b901d-e48c-4a85-b8ea-cf913923b8e5", 
            "workflow_outputs": [
                {
                    "label": null, 
                    "output_name": "xsetRData", 
                    "uuid": "d089c75d-9954-47b8-b0fe-b9eaff3b79ba"
                }, 
                {
                    "label": null, 
                    "output_name": "log", 
                    "uuid": "66d5649a-9fea-4491-be7b-0f7736150de1"
                }
            ]
        }, 
        "3": {
            "annotation": "", 
            "content_id": "toolshed.g2.bx.psu.edu/repos/lecorguille/xcms_merge/xcms_merge/3.6.1+galaxy0", 
            "errors": null, 
            "id": 3, 
            "input_connections": {
                "images": {
                    "id": 2, 
                    "output_name": "xsetRData"
                }
            }, 
            "inputs": [
                {
                    "description": "runtime parameter for tool xcms findChromPeaks Merger", 
                    "name": "sampleMetadata"
                }
            ], 
            "label": null, 
            "name": "xcms findChromPeaks Merger", 
            "outputs": [
                {
                    "name": "xsetRData", 
                    "type": "rdata.xcms.findchrompeaks"
                }
            ], 
            "position": {
                "left": 1430.8333740234375, 
                "top": 232.36669921875
            }, 
            "post_job_actions": {}, 
            "tool_id": "toolshed.g2.bx.psu.edu/repos/lecorguille/xcms_merge/xcms_merge/3.6.1+galaxy0", 
            "tool_shed_repository": {
                "changeset_revision": "39797c768bba", 
                "name": "xcms_merge", 
                "owner": "lecorguille", 
                "tool_shed": "toolshed.g2.bx.psu.edu"
            }, 
            "tool_state": "{\"file_load_section\": {\"file_load_conditional\": {\"file_load_select\": \"no\", \"__current_case__\": 0}}, \"images\": {\"__class__\": \"ConnectedValue\"}, \"__rerun_remap_job_id__\": null, \"sampleMetadata\": {\"__class__\": \"RuntimeValue\"}, \"__page__\": null}", 
            "tool_version": "3.6.1+galaxy0", 
            "type": "tool", 
            "uuid": "faa87da4-2fcb-4fb7-a0f6-7d040e3f55ff", 
            "workflow_outputs": [
                {
                    "label": null, 
                    "output_name": "xsetRData", 
                    "uuid": "b7901ecb-062c-460a-bdbd-f3ffde472d47"
                }
            ]
        }
    }, 
    "tags": [], 
    "uuid": "c30a7f91-1d0b-4bac-aefc-294d795b67eb", 
    "version": 32
}

@RJMW

Tomnl commented 4 years ago

Just checking if any clarification is needed for this issue.

Or if anybody else has anybody else has found the same bug?

nsoranzo commented 4 years ago

@Tomnl What do you have in your workflow_inputs_d ?

Tomnl commented 4 years ago

Hi @nsoranzo,

Sorry I should have included some example files.

Any mzML files should do but these below can be used:

https://github.com/computational-metabolomics/mspurity-galaxy/blob/master/tools/msPurity/test-data/LCMS_1.mzML https://github.com/computational-metabolomics/mspurity-galaxy/blob/master/tools/msPurity/test-data/LCMS_2.mzML