annotate draw_amr_matrix.xml @ 2:9fcc1ffd7526 draft

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