phac-nml / irida-wf-ga2xml

Create an IRIDA workflow from a Galaxy workflow file
Apache License 2.0
1 stars 3 forks source link

does not accept galaxy 18 ga file. #4

Closed happykhan closed 3 years ago

happykhan commented 5 years ago

I created a ga file in galaxy and then ran:

java -jar irida-wf-ga2xml-1.0.0-SNAPSHOT-standalone.jar -i pp.ga.txt

Getting an exception:

Exception in thread "main" java.lang.NullPointerException
    at java.io.StringReader.<init>(StringReader.java:50)
    at clojure.data.json$read_str.invokeStatic(json.clj:278)
    at clojure.data.json$read_str.doInvoke(json.clj:274)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at irida_wf_ga2xml.util$paired_QMARK_.invokeStatic(util.clj:166)
    at irida_wf_ga2xml.util$paired_QMARK_.invoke(util.clj:163)
    at irida_wf_ga2xml.core$to_wf_vec.invokeStatic(core.clj:139)
    at irida_wf_ga2xml.core$to_wf_vec.doInvoke(core.clj:92)
    at clojure.lang.RestFn.invoke(RestFn.java:1305)
    at irida_wf_ga2xml.main$_main.invokeStatic(main.clj:103)
    at irida_wf_ga2xml.main$_main.doInvoke(main.clj:85)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at irida_wf_ga2xml.main.main(Unknown Source)

ga file below. pp.ga.txt

{
    "a_galaxy_workflow": "true",
    "annotation": "Default assembly pipeline",
    "format-version": "0.1",
    "name": "AssemblyAnnotation",
    "steps": {
        "0": {
            "annotation": "",
            "content_id": null,
            "errors": null,
            "id": 0,
            "input_connections": {},
            "inputs": [
                {
                    "description": "",
                    "name": "sequence_reads_paired"
                }
            ],
            "label": "sequence_reads_paired",
            "name": "Input dataset collection",
            "outputs": [],
            "position": {
                "left": 340,
                "top": 241
            },
            "tool_id": null,
            "tool_state": "{\"collection_type\": \"list:paired\", \"name\": \"sequence_reads_paired\"}",
            "tool_version": null,
            "type": "data_collection_input",
            "uuid": "fea5daef-3cd9-447d-897f-adb65613f24a",
            "workflow_outputs": [
                {
                    "label": null,
                    "output_name": "output",
                    "uuid": "11fb9630-6bc6-4fc2-bdbb-8efefb48c63d"
                }
            ]
        },
        "1": {
            "annotation": "",
            "content_id": null,
            "errors": null,
            "id": 1,
            "input_connections": {},
            "inputs": [],
            "label": "reference",
            "name": "Input dataset",
            "outputs": [],
            "position": {
                "left": 340,
                "top": 328
            },
            "tool_id": null,
            "tool_state": "{}",
            "tool_version": null,
            "type": "data_input",
            "uuid": "8303030c-b9ad-45ea-bc3a-5e06929e2ab2",
            "workflow_outputs": [
                {
                    "label": null,
                    "output_name": "output",
                    "uuid": "55e6cd03-cfbb-4e67-8108-75d34a0ce6d2"
                }
            ]
        },
        "2": {
            "annotation": "",
            "content_id": "toolshed.g2.bx.psu.edu/repos/iuc/shovill/shovill/1.0.4",
            "errors": null,
            "id": 2,
            "input_connections": {
                "library|input1": {
                    "id": 0,
                    "output_name": "output"
                }
            },
            "inputs": [
                {
                    "description": "runtime parameter for tool Shovill",
                    "name": "library"
                }
            ],
            "label": null,
            "name": "Shovill",
            "outputs": [
                {
                    "name": "shovill_std_log",
                    "type": "txt"
                },
                {
                    "name": "contigs",
                    "type": "fasta"
                },
                {
                    "name": "contigs_graph",
                    "type": "txt"
                }
            ],
            "position": {
                "left": 633,
                "top": 240
            },
            "post_job_actions": {
                "HideDatasetActioncontigs_graph": {
                    "action_arguments": {},
                    "action_type": "HideDatasetAction",
                    "output_name": "contigs_graph"
                },
                "RenameDatasetActioncontigs": {
                    "action_arguments": {
                        "newname": "library.fasta"
                    },
                    "action_type": "RenameDatasetAction",
                    "output_name": "contigs"
                },
                "RenameDatasetActionshovill_std_log": {
                    "action_arguments": {
                        "newname": "library.shov.log"
                    },
                    "action_type": "RenameDatasetAction",
                    "output_name": "shovill_std_log"
                }
            },
            "tool_id": "toolshed.g2.bx.psu.edu/repos/iuc/shovill/shovill/1.0.4",
            "tool_shed_repository": {
                "changeset_revision": "865119fcb694",
                "name": "shovill",
                "owner": "iuc",
                "tool_shed": "toolshed.g2.bx.psu.edu"
            },
            "tool_state": "{\"adv\": \"{\\\"gsize\\\": \\\"\\\", \\\"kmers\\\": \\\"\\\", \\\"minlen\\\": \\\"0\\\", \\\"nocorr\\\": \\\"true\\\", \\\"depth\\\": \\\"100\\\", \\\"namefmt\\\": \\\"contig%05d\\\", \\\"mincov\\\": \\\"2\\\", \\\"opts\\\": \\\"\\\"}\", \"trim\": \"\\\"false\\\"\", \"log\": \"\\\"true\\\"\", \"__page__\": null, \"__rerun_remap_job_id__\": null, \"assembler\": \"\\\"spades\\\"\", \"library\": \"{\\\"lib_type\\\": \\\"collection\\\", \\\"input1\\\": {\\\"__class__\\\": \\\"RuntimeValue\\\"}, \\\"__current_case__\\\": 1}\"}",
            "tool_version": "1.0.4",
            "type": "tool",
            "uuid": "eee70eae-b4cd-4892-a40d-13fa0606edb8",
            "workflow_outputs": [
                {
                    "label": "contigs_out",
                    "output_name": "contigs",
                    "uuid": "46b05597-a809-4789-b453-f40fbb315ea5"
                },
                {
                    "label": "log_shovill",
                    "output_name": "shovill_std_log",
                    "uuid": "4b746fe1-9cea-4add-b6b8-d62c7180f448"
                }
            ]
        }
    },
    "tags": [],
    "uuid": "ef41d323-6f1d-47d5-b4f2-1ca8283a817c"
}
happykhan commented 5 years ago

Seems to be unhappy with the 'reference' input

apetkau commented 5 years ago

Thanks for reporting the issue @happykhan. It looks like you're right, the program is unhappy with the 'reference' input since it's disconnected from the rest of the workflow.

workflow-ref

Could you try deleting the 'reference' input if it's not needed and re-saving the workflow?

happykhan commented 5 years ago

Hi.

Yes that works without reference.

Will try a workflow with reference to confirm

On Tue, 15 Jan 2019, 19:35 Aaron Petkau <notifications@github.com wrote:

Thanks for reporting the issue @happykhan https://github.com/happykhan. It looks like you're right, the program is unhappy with the 'reference' input since it's disconnected from the rest of the workflow.

[image: workflow-ref] https://user-images.githubusercontent.com/200517/51204876-41541280-18ca-11e9-8f93-c51b7c2b1a04.png

Could you try deleting the 'reference' input if it's not needed and re-saving the workflow?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/phac-nml/irida-wf-ga2xml/issues/4#issuecomment-454521976, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYqmPwFEky8NsY0xNzpr73DyihJtMCAks5vDi12gaJpZM4aA-J7 .

happykhan commented 5 years ago

Repeated: with tweak to add link for reference:

screenshot from 2019-01-16 11-29-13

and the resulting ga file: Galaxy-Workflow-AssemblyAnnotation.ga.txt

tool_state for reference object doesn't seem to be filled in with "tool_state": "{\"name\": \"reference\"}", bug in galaxy? With this added in, it seems to run. Then falls over when parsing quast module with :

19-01-16 11:22:36 n114308 ERROR [irida-wf-ga2xml.messages:174] - Could not get tool parameter attribute info for {:name "quast", :owner "iuc", :url "https://toolshed.g2.bx.psu.edu", :revision "81df4950d65b", :-comment "WARNING: Latest revision fetched from https://toolshed.g2.bx.psu.edu/repos/iuc/quast"} ; Encountered error: java.lang.IllegalArgumentException: Arg 'kw' is not a Clojure Keyword! class=
apetkau commented 5 years ago

Thanks for pointing this out. Yeah, maybe something related to particular versions of Galaxy not setting the tool_state. I'll try to see what's going on.

For the second failure, I'll look at that too. It's trying to get the particular version of quast to fill into the IRIDA XML file. If it can't figure things out (like in this case) it defaults to the latest version of quast in Galaxy, which is the same one you're using so this still works right now.

thobalose commented 5 years ago

Hi Guys,

I seem to be facing the same Exception with https://github.com/COMBAT-TB/combat-tb-gx-pipelines/blob/master/varscan/Galaxy-Workflow-VarScan_-_Variant_Calling.ga on Galaxy v19.01

$ java -jar irida-wf-ga2xml-1.0.0-SNAPSHOT-standalone.jar \
> -i Galaxy-Workflow-VarScan_-_Variant_Calling.ga \
> -n VarScanVariantCalling \
> -t VariantCalling \
> -W 0.1.0 \
> -o output 
Exception in thread "main" java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:50)
        at clojure.data.json$read_str.invokeStatic(json.clj:278)
        at clojure.data.json$read_str.doInvoke(json.clj:274)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at irida_wf_ga2xml.util$paired_QMARK_.invokeStatic(util.clj:166)
        at irida_wf_ga2xml.util$paired_QMARK_.invoke(util.clj:163)
        at irida_wf_ga2xml.core$to_wf_vec.invokeStatic(core.clj:139)
        at irida_wf_ga2xml.core$to_wf_vec.doInvoke(core.clj:92)
        at clojure.lang.RestFn.invoke(RestFn.java:1305)
        at irida_wf_ga2xml.main$_main.invokeStatic(main.clj:103)
        at irida_wf_ga2xml.main$_main.doInvoke(main.clj:85)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at irida_wf_ga2xml.main.main(Unknown Source)
apetkau commented 5 years ago

Thanks for reporting @thobalose

zipho commented 4 years ago

@apetkau, I seem to have come across the same issue above as @thobalose

and this error is thrown also for the third input specifcation of the ga file.

java -jar irida-wf-ga2xml-1.0.0-SNAPSHOT-standalone.jar -i irida-pipeline-plugins/tb-sample-report-pipeline-plugin/gx_variant_analysis_workflow.ga -n TBSampleReport -t VARIANT_CALLING -W '0.2.1' -o output

Exception in thread "main" java.lang.IllegalArgumentException: No value supplied for key: {"workflow_outputs" [{"label" nil, "output_name" "output", "uuid" "843a2af3-e513-49a7-ab4d-f28c8d4b608e"}], "input_connections" {}, "label" "Read 2", "id" 2, "tool_state" "{\"optional\": false}", "errors" nil, "position" {"left" 200, "top" 398}, "name" "Input dataset", "uuid" "c09e4c17-71f7-4150-831b-f30ca16b8fd0", "outputs" [], "type" "data_input", "tool_version" nil, "annotation" "", "inputs" [{"description" "", "name" "Read 2"}], "content_id" nil, "tool_id" nil}
        at clojure.lang.PersistentHashMap.create(PersistentHashMap.java:77)
        at irida_wf_ga2xml.util$paired_QMARK_.invokeStatic(util.clj:163)
        at irida_wf_ga2xml.util$paired_QMARK_.invoke(util.clj:163)
        at irida_wf_ga2xml.core$to_wf_vec.invokeStatic(core.clj:139)
        at irida_wf_ga2xml.core$to_wf_vec.doInvoke(core.clj:92)
        at clojure.lang.RestFn.invoke(RestFn.java:1305)
        at irida_wf_ga2xml.main$_main.invokeStatic(main.clj:103)
        at irida_wf_ga2xml.main$_main.doInvoke(main.clj:85)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at irida_wf_ga2xml.main.main(Unknown Source)
JeffreyThiessen commented 3 years ago

Fixed via #19