Mercurial > repos > iuc > hamronize_summarize
comparison hamronize_summarize.xml @ 5:88045b4d5597 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hamronization commit b49fc153425676a82e77dec090676403112bcbe6
author | iuc |
---|---|
date | Tue, 05 Mar 2024 19:47:21 +0000 |
parents | f8bcc852f6b3 |
children |
comparison
equal
deleted
inserted
replaced
4:f8bcc852f6b3 | 5:88045b4d5597 |
---|---|
1 <tool id="hamronize_summarize" name="hamronize: summarize" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@"> | 1 <tool id="hamronize_summarize" name="hamronize summarize:" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@"> |
2 <description> harmorization reports</description> | 2 <description>Concatenate and summarize AMR detection reports</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="bio_tools"/> | 6 <expand macro="bio_tools"/> |
7 <expand macro="requirements" /> | 7 <expand macro="requirements" /> |
8 <expand macro="version_command" /> | 8 <expand macro="version_command" /> |
9 <command detect_errors="exit_code"><![CDATA[ | 9 <command detect_errors="exit_code"><![CDATA[ |
10 #for $counter, $report in enumerate($reports): | 10 #for $counter, $report in enumerate($reports): |
11 #if $report.is_of_type('tsv', 'tabular'): | 11 #if $report.is_of_type('tsv', 'tabular'): |
12 #set $ext = 'tsv' | 12 #set $ext = 'tsv' |
13 #elif $report.is_of_type('json'): | 13 #elif $report.is_of_type('json'): |
14 #set $ext = 'json' | 14 #set $ext = 'json' |
15 #end if | 15 #end if |
16 ln -s '$report' ./report_${counter}.${ext} && | 16 ln -s '$report' 'report_${counter}.${ext}' && |
17 #end for | 17 #end for |
18 | 18 |
19 hamronize summarize | 19 hamronize |
20 --summary_type $summary_type | 20 summarize |
21 #if $summary_type == "tsv" | 21 --summary_type '$summary_type' |
22 --output output.tsv | 22 --output '$output' |
23 #elif $summary_type == "json" | 23 report_* |
24 --output output.json | 24 ]]></command> |
25 #else | |
26 --output output.html | |
27 #end if | |
28 ./report_* | |
29 ]]> </command> | |
30 | |
31 <inputs> | 25 <inputs> |
32 <param name="reports" type="data" multiple="true" format="tabular,json" label="Report files"/> | 26 <param name="reports" type="data" multiple="true" format="tabular,json" label="Report files"/> |
33 <param name="summary_type" type="select" label="Output format" multiple="false"> | 27 <param argument="--summary_type" type="select" label="Output format" multiple="false"> |
34 <option value="tsv">tsv</option> | 28 <option value="tsv">Tabular</option> |
35 <option value="json">json</option> | 29 <option value="json">JSON</option> |
36 <option value="interactive">interactive</option> | 30 <option value="interactive">Interactive HTML</option> |
37 </param> | 31 </param> |
38 </inputs> | 32 </inputs> |
39 | |
40 <outputs> | 33 <outputs> |
41 <data format="tabular" name="output_tsv" label="${tool.name} on ${on_string}: Table" from_work_dir="output.tsv"> | 34 <data name="output" format="tabular" label="${tool.name} on ${on_string}: Concatenated and summarized reports" from_work_dir="output.tsv"> |
42 <filter>summary_type == "tsv"</filter> | 35 <change_format> |
43 </data> | 36 <when input="summary_type" value="json" format="json"/> |
44 <data format="json" name="output_json" label="${tool.name} on ${on_string}: JSON" from_work_dir="output.json"> | 37 <when input="summary_type" value="interactive" format="html"/> |
45 <filter>summary_type == "json"</filter> | 38 </change_format> |
46 </data> | |
47 <data format="html" name="output_html" label="${tool.name} on ${on_string}: Interactive" from_work_dir="output.html"> | |
48 <filter>summary_type == "interactive"</filter> | |
49 </data> | 39 </data> |
50 </outputs> | 40 </outputs> |
51 <tests> | 41 <tests> |
52 <!-- tsv output --> | 42 <!-- tsv output --> |
53 <test expect_num_outputs="1"> | 43 <test expect_num_outputs="1"> |
54 <param name="reports" value="hamronized_abricate.tsv,hamronized_abricate.json,hamronized_ariba.tsv,hamronized_ariba.json,hamronized_rgi.tsv,hamronized_rgi.json" /> | 44 <param name="reports" value="hamronized_abricate.tsv,hamronized_abricate.json,hamronized_ariba.tsv,hamronized_ariba.json,hamronized_rgi.tsv,hamronized_rgi.json" /> |
55 <param name="summary_type" value="tsv" /> | 45 <param name="summary_type" value="tsv" /> |
56 <output name="output_tsv" ftype="tabular" file="summary.tsv" /> | 46 <output name="output" ftype="tabular"> |
47 <assert_contents> | |
48 <has_n_lines n="155"/> | |
49 <has_n_columns n="37"/> | |
50 <has_text text="GCF_010120755.1_ASM1012075v1_genomic" /> | |
51 <has_text text="ariba_report" /> | |
52 <has_text text="rgi_report" /> | |
53 </assert_contents> | |
54 </output> | |
57 </test> | 55 </test> |
58 <!-- json output --> | 56 <!-- json output --> |
59 <test expect_num_outputs="1"> | 57 <test expect_num_outputs="1"> |
60 <param name="reports" value="hamronized_abricate.tsv,hamronized_abricate.json,hamronized_ariba.tsv,hamronized_ariba.json,hamronized_rgi.tsv,hamronized_rgi.json" /> | 58 <param name="reports" value="hamronized_abricate.tsv,hamronized_abricate.json,hamronized_ariba.tsv,hamronized_ariba.json,hamronized_rgi.tsv,hamronized_rgi.json" /> |
61 <param name="summary_type" value="json" /> | 59 <param name="summary_type" value="json" /> |
62 <output name="output_json" ftype="json"> | 60 <output name="output" ftype="json"> |
63 <assert_contents> | 61 <assert_contents> |
64 <has_text text="GCF_010120755.1_ASM1012075v1_genomic" /> | 62 <has_text text="GCF_010120755.1_ASM1012075v1_genomic" /> |
65 <has_text text="H_NS.3000676.BA000007.3.1737690_1738104.5476" /> | 63 <has_text text="ariba_report" /> |
66 <has_text text="NODE_9_length_203843_cov_42.4911_20" /> | 64 <has_text text="rgi_report" /> |
65 </assert_contents> | |
66 </output> | |
67 </test> | |
68 <!-- html output --> | |
69 <test expect_num_outputs="1"> | |
70 <param name="reports" value="hamronized_abricate.tsv,hamronized_abricate.json,hamronized_ariba.tsv,hamronized_ariba.json,hamronized_rgi.tsv,hamronized_rgi.json" /> | |
71 <param name="summary_type" value="interactive" /> | |
72 <output name="output" ftype="html"> | |
73 <assert_contents> | |
74 <has_text text="GCF_010120755.1_ASM1012075v1_genomic" /> | |
75 <has_text text="ariba_report" /> | |
76 <has_text text="rgi_report" /> | |
67 </assert_contents> | 77 </assert_contents> |
68 </output> | 78 </output> |
69 </test> | 79 </test> |
70 </tests> | 80 </tests> |
71 <help> | 81 <help><![CDATA[ |
72 <![CDATA[ | 82 **What it does** |
73 **What it does** | 83 |
74 This tool will take a list of report and create single sorted report in the specified format | 84 This tool will take a list of report and create single sorted report in the specified format |
75 just containing the unique entries across input reports. It can handle mixed json and tsv hamronized report formats | 85 just containing the unique entries across input reports. It can handle mixed json and tsv hamronized report formats |
76 **Inputs** | 86 |
77 A list of hamronize reports | 87 **Inputs** |
78 | 88 A list of hamronize reports |
79 ]]> | 89 ]]></help> |
80 </help> | |
81 <expand macro="citations"/> | 90 <expand macro="citations"/> |
82 </tool> | 91 </tool> |