0
|
1 <tool id="draw_amr_matrix" name="PIMA: draw AMR matrix" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
|
|
2 <description>of genes and drugs</description>
|
|
3 <macros>
|
|
4 <import>macros.xml</import>
|
|
5 </macros>
|
|
6 <expand macro="requirements"/>
|
|
7 <command detect_errors="exit_code"><![CDATA[
|
|
8 #import re
|
|
9
|
|
10 mkdir feature_hits_dir &&
|
|
11 mkdir output_dir &&
|
|
12
|
|
13 #for $i in $feature_hits:
|
|
14 #set file_name = $i.file_name
|
|
15 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
|
|
16 ln -s '$file_name' 'feature_hits_dir/$identifier' &&
|
|
17 #end for
|
|
18
|
|
19 python '$__tool_directory__/draw_amr_matrix.py'
|
|
20 --amr_gene_drug '$amr_gene_drug'
|
|
21 --feature_hits_dir 'feature_hits_dir'
|
|
22 --output_dir 'output_dir'
|
|
23 #if str($output_process_log) == 'yes':
|
|
24 && mv 'process_log' '$process_log'
|
|
25 #end if
|
|
26 ]]></command>
|
|
27 <inputs>
|
|
28 <param argument="--amr_gene_drug" type="data" format="tabular,tsv" label="Tabular AMR gene drugs file"/>
|
|
29 <param argument="--feature_hits" format="bed" type="data_collection" collection_type="list" label="Collection of feature hits BED files"/>
|
|
30 <param name="output_process_log" type="select" display="radio" label="Output process log file?">
|
|
31 <option value="no" selected="true">No</option>
|
|
32 <option value="yes">Yes</option>
|
|
33 </param>
|
|
34 </inputs>
|
|
35 <outputs>
|
|
36 <data name="process_log" format="txt" label="${tool.name} on ${on_string} (Process log)">
|
|
37 <filter>output_process_log == 'yes'</filter>
|
|
38 </data>
|
|
39 <collection name="amr_matrix_png" type="list" format="png">
|
|
40 <discover_datasets pattern="(?P<designation>.+)\.(?P<ext>png)" directory="output_dir"/>
|
|
41 </collection>
|
|
42 </outputs>
|
|
43 <tests>
|
|
44 <test>
|
|
45 <param name="amr_gene_drug" value="amr_gene_drug.tsv" ftype="tsv"/>
|
|
46 <param name="feature_hits">
|
|
47 <collection type="list">
|
|
48 <element name="amr_pima_md" value="amr_pima_md.bed"/>
|
|
49 </collection>
|
|
50 </param>
|
|
51 <output_collection name="amr_matrix_png" type="list" count="1">
|
|
52 <element name="amr_matrix" ftype="png">
|
|
53 <assert_contents>
|
|
54 <has_size value="38309" delta="500"/>
|
|
55 </assert_contents>
|
|
56 </element>
|
|
57 </output_collection>
|
|
58 </test>
|
|
59 </tests>
|
|
60 <help>
|
|
61 **What it does**
|
|
62
|
|
63 Accepts a tabular AMR gene drugs file and a collection of best feature hits and draws an AMR matrix.
|
|
64 </help>
|
|
65 <expand macro="citations"/>
|
|
66 </tool>
|
|
67
|