annotate draw_amr_matrix.xml @ 0:6044ca44e9f6 draft

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