comparison cooc_pubmut.xml @ 1:f193fef5b19d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cojac commit 5b54fc7af13196445abda407054e01dd3e5603c6
author iuc
date Mon, 31 Jul 2023 15:23:17 +0000
parents d04ea6b052c5
children ce8b15a55bbe
comparison
equal deleted inserted replaced
0:d04ea6b052c5 1:f193fef5b19d
1 <tool id="cooc_pubmut" name="Cojac: pubmut" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" 1 <tool id="cooc_pubmut" name="Cojac: pubmut" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"
2 profile="@PROFILE@"> 2 profile="@PROFILE@">
3 <description> 3 <description>
4 render a JSON or YAML file to a pretty table 4 pretty-prints cojac mutbamscan co-occurrence results
5 </description> 5 </description>
6 <macros> 6 <macros>
7 <import>macros.xml</import> 7 <import>macros.xml</import>
8 </macros> 8 </macros>
9 <expand macro="biotools"/> 9 <expand macro="biotools"/>
10 <expand macro="requirements"> 10 <expand macro="requirements">
11 <requirement type="package" version="2.12">pandoc</requirement> 11 <requirement type="package" version="3.1.3">pandoc</requirement>
12 <requirement type="package" version="6.2.1">gmp</requirement>
12 </expand> 13 </expand>
13 <expand macro="version"/> 14 <expand macro="version"/>
14 <command detect_errors="exit_code"><![CDATA[ 15 <command detect_errors="exit_code"><![CDATA[
15 @VOCDIR_COMMAND@ 16 #if $annotations.availability == 'full':
16 #for $input_file in $cooc_file 17 #set $voc_config = $annotations.voc_source
17 #set $cooc_ext = $input_file.ext 18 @VOCDIR_COMMAND@
18 #end for 19 #end if
19 cooc-pubmut 20 cojac cooc-pubmut
20 -m '$vocdir' 21 #if $annotations.availability == 'full':
21 -a '$amplicons' 22 -m voc/
22 #if $cooc_ext == 'json'
23 -j '$cooc_file'
24 #else if $cooc_ext == 'yaml'
25 -y '$cooc_file'
26 #end if 23 #end if
27 -o cooc-table.csv 24 #if $annotations.availability != 'none':
25 -a '$annotations.in_amp'
26 #end if
27 #if $cooc_data.ext == 'json':
28 -j '$cooc_data'
29 #else
30 -y '$cooc_data'
31 #end if
28 -q 32 -q
29 $escape 33 #if $out_opts.format == 'tsv':
30 #if $add_html 34 -o cooc-table.tsv
35 #else:
36 -o cooc-table.csv
37 #if $out_opts.format == 'html':
31 && pandoc cooc-table.csv -o cooc-table.html 38 && pandoc cooc-table.csv -o cooc-table.html
32 && mkdir -p '$html.files_path' 39 #end if
33 && cp cooc-table.html '$html.files_path'
34 #end if 40 #end if
35 ]]></command> 41 ]]></command>
36 <inputs> 42 <inputs>
37 <expand macro="vocdir_input"/> 43 <param name="cooc_data" type="data" format="json,yaml" label="Co-occurrence results generated by mutbamscan"
38 <param name="amplicons" type="data" format="yaml" label="List of query amplicons" 44 help="The tool can work with json- or yaml-formatted output of cojac mutbamscan."/>
39 help="File generated by the Cojac mutbamscan tool"/> 45 <conditional name="annotations">
40 <param name="cooc_file" type="data" format="json,yaml" multiple="true" 46 <param name="availability" type="select" label="Available amplicon and lineage annotations"
41 label="Results generated by mutbamscan"/> 47 help="For best readability of its report the tool requires a per-lineage amplicon info dataset (in yaml format) produced by the mutbamscan tool and the original lineage definitions. If all you have is the per-lineage amplicon info, you can use it to obtain a nearly identical report, but cojac-internal lineage identifiers won't be translated into standard lineage names. With no available annotations a limited report can still be generated, but this is not recommended.">
42 <param argument="--escape" type="boolean" truevalue="--escape" falsevalue="" 48 <option value="full">per-lineage amplicon info and original lineage definitions</option>
43 checked="false" label="Use escape characters for newlines"/> 49 <option value="amplicon">per-lineage amplicon info only</option>
44 <param name="add_html" type="boolean" checked="false" 50 <option value="none">no annotations</option>
45 label="Convert CSV output table to HTML format"/> 51 </param>
52 <when value="full">
53 <param name="in_amp" type="data" format="yaml" label="Combined cojac per-amplicon lineage definitions"/>
54 <expand macro="vocdir_input"/>
55 </when>
56 <when value="amplicon">
57 <param name="in_amp" type="data" format="yaml" label="Combined per-amplicon lineage definitions"/>
58 </when>
59 <when value="none" />
60 </conditional>
61 <section name="out_opts" title="Output formatting" expanded="true">
62 <param name="format" type="select" label="Type of output to produce">
63 <option value="tsv">Tab-separated (TSV)</option>
64 <option value="csv">Comma-separated (CSV)</option>
65 <option value="html">HTML (for display in browsers)</option>
66 </param>
67 </section>
46 </inputs> 68 </inputs>
47 <outputs> 69 <outputs>
48 <data name="table" format="csv" 70 <data name="table_tsv" format="tsv" label="${tool.name} on ${on_string}: Mutation co-occurrence (TSV table)" from_work_dir="cooc-table.tsv">
49 label="${tool.name} on ${on_string}: Mutation cooccurrence (CSV table)" 71 <filter>out_opts['format'] == 'tsv'</filter>
50 from_work_dir="cooc-table.csv">
51 </data> 72 </data>
52 <data name="html" format="html" 73 <data name="table_csv" format="csv" label="${tool.name} on ${on_string}: Mutation co-occurrence (CSV table)" from_work_dir="cooc-table.csv">
53 label="${tool.name} on ${on_string}: Mutation cooccurrence (HTML)" 74 <filter>out_opts['format'] == 'csv'</filter>
54 from_work_dir="cooc-table.html"> 75 </data>
55 <filter>add_html</filter> 76 <data name="table_html" format="html" label="${tool.name} on ${on_string}: Mutation co-occurrence (HTML)" from_work_dir="cooc-table.html">
77 <filter>out_opts['format'] == 'html'</filter>
56 </data> 78 </data>
57 </outputs> 79 </outputs>
58 <tests> 80 <tests>
59 <test expect_num_outputs="1"> 81 <test expect_num_outputs="1">
60 <conditional name="vocdir_option"> 82 <param name="cooc_data" value="cooc-test111.json"/>
61 <param name="choice" value="custom"/> 83 <conditional name="annotations">
62 <param name="voc_file" value="omicron_ba1_mutations.yaml"/> 84 <conditional name="vocdir_option">
85 <param name="choice" value="custom"/>
86 <param name="voc_file" value="omicron_ba1_mutations.yaml"/>
87 </conditional>
88 <param name="in_amp" value="amplicons111.yaml"/>
63 </conditional> 89 </conditional>
64 <param name="amplicons" value="amplicons111.yaml"/> 90 <output name="table_tsv" ftype="tsv">
65 <param name="cooc_file" value="cooc-test111.json"/> 91 <assert_contents>
66 <output name="table" ftype="csv"> 92 <has_text text="Amplicon 76"/>
93 <has_text text="Amplicon 81"/>
94 </assert_contents>
95 </output>
96 </test>
97 <test expect_num_outputs="1">
98 <param name="cooc_data" value="cooc-test111.json"/>
99 <conditional name="annotations">
100 <conditional name="vocdir_option">
101 <param name="choice" value="custom"/>
102 <param name="voc_file" value="omicron_ba1_mutations.yaml"/>
103 </conditional>
104 <param name="in_amp" value="amplicons111.yaml"/>
105 </conditional>
106 <section name="out_opts">
107 <param name="format" value="csv"/>
108 </section>
109 <output name="table_csv" ftype="csv">
110 <assert_contents>
111 <has_text text="Amplicon 76"/>
112 <has_text text="Amplicon 81"/>
113 </assert_contents>
114 </output>
115 </test>
116 <test expect_num_outputs="1">
117 <param name="cooc_data" value="cooc-test111.json"/>
118 <conditional name="annotations">
119 <conditional name="vocdir_option">
120 <param name="choice" value="custom"/>
121 <param name="voc_file" value="omicron_ba1_mutations.yaml"/>
122 </conditional>
123 <param name="in_amp" value="amplicons111.yaml"/>
124 </conditional>
125 <section name="out_opts">
126 <param name="format" value="html"/>
127 </section>
128 <output name="table_html" ftype="html">
67 <assert_contents> 129 <assert_contents>
68 <has_text text="Amplicon 76"/> 130 <has_text text="Amplicon 76"/>
69 <has_text text="Amplicon 81"/> 131 <has_text text="Amplicon 81"/>
70 </assert_contents> 132 </assert_contents>
71 </output> 133 </output>
72 </test> 134 </test>
73 </tests> 135 </tests>
74 <help><![CDATA[ 136 <help><![CDATA[
75 @HELP_HEADER@ 137 @HELP_HEADER@
76 138
77 Information about **cooc-pubmut** method 139 Information about **cojac cooc-pubmut**
78 ======================================== 140 =======================================
79 141
80 The method renders a JSON or YAML file to a table as in the publication. 142 The tool pretty-prints json or yaml output of cojac cooc-mutbamscan.
81 You need to open the output CSV in a spreadsheet that understands linebreaks.
82 143
144 Hint: The output (unless you select html format) is best viewed in spreadsheet software that understands linebreaks.
83 ]]></help> 145 ]]></help>
84 <expand macro="citations"/> 146 <expand macro="citations"/>
85 </tool> 147 </tool>