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
|
2
|
10 mkdir amr_feature_hits_dir &&
|
0
|
11 mkdir output_dir &&
|
|
12
|
2
|
13 #for $i in $amr_feature_hits:
|
0
|
14 #set file_name = $i.file_name
|
|
15 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
|
2
|
16 ln -s '$file_name' 'amr_feature_hits_dir/$identifier' &&
|
0
|
17 #end for
|
|
18
|
|
19 python '$__tool_directory__/draw_amr_matrix.py'
|
2
|
20 --amr_gene_drug_file '$amr_gene_drug_file'
|
|
21 --amr_deletions_file '$amr_deletions_file'
|
|
22 --amr_feature_hits_dir 'amr_feature_hits_dir'
|
0
|
23 --output_dir 'output_dir'
|
|
24 #if str($output_process_log) == 'yes':
|
|
25 && mv 'process_log' '$process_log'
|
|
26 #end if
|
|
27 ]]></command>
|
|
28 <inputs>
|
2
|
29 <param argument="--amr_feature_hits" format="bed" type="data_collection" collection_type="list" label="Collection of feature hits BED files"/>
|
|
30 <param argument="--amr_deletions_file" type="data" format="bed" optional="true" label="AMR deletions file" help="Optional, leave blank to ignore"/>
|
|
31 <param argument="--amr_mutations_file" type="data" format="tabular,tsv" optional="true" label="AMR mutations file" help="Optional, leave blank to ignore"/>
|
|
32 <param argument="--amr_gene_drug_file" type="data" format="tabular,tsv" label="AMR gene drugs file"/>
|
0
|
33 <param name="output_process_log" type="select" display="radio" label="Output process log file?">
|
|
34 <option value="no" selected="true">No</option>
|
|
35 <option value="yes">Yes</option>
|
|
36 </param>
|
|
37 </inputs>
|
|
38 <outputs>
|
|
39 <data name="process_log" format="txt" label="${tool.name} on ${on_string} (Process log)">
|
|
40 <filter>output_process_log == 'yes'</filter>
|
|
41 </data>
|
|
42 <collection name="amr_matrix_png" type="list" format="png">
|
|
43 <discover_datasets pattern="(?P<designation>.+)\.(?P<ext>png)" directory="output_dir"/>
|
|
44 </collection>
|
|
45 </outputs>
|
|
46 <tests>
|
|
47 <test>
|
2
|
48 <param name="amr_feature_hits">
|
0
|
49 <collection type="list">
|
2
|
50 <element name="amr_cds.bed" value="amr_cds.bed"/>
|
0
|
51 </collection>
|
|
52 </param>
|
2
|
53 <param name="amr_gene_drug_file" value="amr_gene_drug.tsv" ftype="tsv"/>
|
0
|
54 <output_collection name="amr_matrix_png" type="list" count="1">
|
2
|
55 <element name="contig_1" ftype="png">
|
0
|
56 <assert_contents>
|
2
|
57 <has_size value="25383" delta="100"/>
|
0
|
58 </assert_contents>
|
|
59 </element>
|
|
60 </output_collection>
|
|
61 </test>
|
|
62 </tests>
|
|
63 <help>
|
|
64 **What it does**
|
|
65
|
2
|
66 Accepts a collection of best AMR feature hits, an optional AMR deletions BED file, an optional AMR mutations TSV file and a AMR gene
|
|
67 drug mappings file and draws an AMR matrix.
|
0
|
68 </help>
|
|
69 <expand macro="citations"/>
|
|
70 </tool>
|
|
71
|