comparison draw_amr_matrix.xml @ 2:9fcc1ffd7526 draft

Uploaded
author greg
date Fri, 10 Feb 2023 17:27:33 +0000
parents 6044ca44e9f6
children 33a0ea992043
comparison
equal deleted inserted replaced
1:5c923c77cf5f 2:9fcc1ffd7526
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
7 <command detect_errors="exit_code"><![CDATA[ 7 <command detect_errors="exit_code"><![CDATA[
8 #import re 8 #import re
9 9
10 mkdir feature_hits_dir && 10 mkdir amr_feature_hits_dir &&
11 mkdir output_dir && 11 mkdir output_dir &&
12 12
13 #for $i in $feature_hits: 13 #for $i in $amr_feature_hits:
14 #set file_name = $i.file_name 14 #set file_name = $i.file_name
15 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier)) 15 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
16 ln -s '$file_name' 'feature_hits_dir/$identifier' && 16 ln -s '$file_name' 'amr_feature_hits_dir/$identifier' &&
17 #end for 17 #end for
18 18
19 python '$__tool_directory__/draw_amr_matrix.py' 19 python '$__tool_directory__/draw_amr_matrix.py'
20 --amr_gene_drug '$amr_gene_drug' 20 --amr_gene_drug_file '$amr_gene_drug_file'
21 --feature_hits_dir 'feature_hits_dir' 21 --amr_deletions_file '$amr_deletions_file'
22 --amr_feature_hits_dir 'amr_feature_hits_dir'
22 --output_dir 'output_dir' 23 --output_dir 'output_dir'
23 #if str($output_process_log) == 'yes': 24 #if str($output_process_log) == 'yes':
24 && mv 'process_log' '$process_log' 25 && mv 'process_log' '$process_log'
25 #end if 26 #end if
26 ]]></command> 27 ]]></command>
27 <inputs> 28 <inputs>
28 <param argument="--amr_gene_drug" type="data" format="tabular,tsv" label="Tabular AMR gene drugs file"/> 29 <param argument="--amr_feature_hits" format="bed" type="data_collection" collection_type="list" label="Collection of feature hits BED files"/>
29 <param argument="--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"/>
30 <param name="output_process_log" type="select" display="radio" label="Output process log file?"> 33 <param name="output_process_log" type="select" display="radio" label="Output process log file?">
31 <option value="no" selected="true">No</option> 34 <option value="no" selected="true">No</option>
32 <option value="yes">Yes</option> 35 <option value="yes">Yes</option>
33 </param> 36 </param>
34 </inputs> 37 </inputs>
40 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.(?P&lt;ext&gt;png)" directory="output_dir"/> 43 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.(?P&lt;ext&gt;png)" directory="output_dir"/>
41 </collection> 44 </collection>
42 </outputs> 45 </outputs>
43 <tests> 46 <tests>
44 <test> 47 <test>
45 <param name="amr_gene_drug" value="amr_gene_drug.tsv" ftype="tsv"/> 48 <param name="amr_feature_hits">
46 <param name="feature_hits">
47 <collection type="list"> 49 <collection type="list">
48 <element name="amr_pima_md" value="amr_pima_md.bed"/> 50 <element name="amr_cds.bed" value="amr_cds.bed"/>
49 </collection> 51 </collection>
50 </param> 52 </param>
53 <param name="amr_gene_drug_file" value="amr_gene_drug.tsv" ftype="tsv"/>
51 <output_collection name="amr_matrix_png" type="list" count="1"> 54 <output_collection name="amr_matrix_png" type="list" count="1">
52 <element name="amr_matrix" ftype="png"> 55 <element name="contig_1" ftype="png">
53 <assert_contents> 56 <assert_contents>
54 <has_size value="38309" delta="500"/> 57 <has_size value="25383" delta="100"/>
55 </assert_contents> 58 </assert_contents>
56 </element> 59 </element>
57 </output_collection> 60 </output_collection>
58 </test> 61 </test>
59 </tests> 62 </tests>
60 <help> 63 <help>
61 **What it does** 64 **What it does**
62 65
63 Accepts a tabular AMR gene drugs file and a collection of best feature hits and draws an AMR matrix. 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.
64 </help> 68 </help>
65 <expand macro="citations"/> 69 <expand macro="citations"/>
66 </tool> 70 </tool>
67 71