0
|
1 <tool id="draw_features" name="PIMA: draw features" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
|
|
2 <description>of annotated assemblies</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 #if $contigs.is_of_type('fasta.gz'):
|
|
11 gunzip -c '$contigs' > 'contigs.fasta' &&
|
|
12 #else:
|
|
13 ln -s '$contigs' 'contigs.fasta' &&
|
|
14 #end if
|
|
15
|
|
16 mkdir feature_hits_dir &&
|
|
17 mkdir output_dir &&
|
|
18
|
|
19 #for $i in $feature_hits:
|
|
20 #set identifier = re.sub('[^\s\w\-\\.]', '_', str($i.element_identifier))
|
6
|
21 ln -s $i 'feature_hits_dir/$identifier' &&
|
0
|
22 #end for
|
|
23
|
|
24 python '$__tool_directory__/draw_features.py'
|
|
25 --contigs 'contigs.fasta'
|
|
26 --feature_hits_dir 'feature_hits_dir'
|
|
27 --output_dir 'output_dir'
|
|
28 #if str($output_process_log) == 'yes':
|
|
29 && mv 'process_log' '$process_log'
|
|
30 #end if
|
|
31 ]]></command>
|
|
32 <inputs>
|
|
33 <param name="contigs" type="data" format="fasta,fasta.gz" label="Fasta file of assembled contigs"/>
|
|
34 <param name="feature_hits" format="bed" type="data_collection" collection_type="list" label="Collection of feature hits BED files"/>
|
|
35 <param name="output_process_log" type="select" display="radio" label="Output process log file?">
|
|
36 <option value="no" selected="true">No</option>
|
|
37 <option value="yes">Yes</option>
|
|
38 </param>
|
|
39 </inputs>
|
|
40 <outputs>
|
4
|
41 <data name="process_log" format="txt" label="${tool.name} on ${on_string} (process log)">
|
0
|
42 <filter>output_process_log == 'yes'</filter>
|
|
43 </data>
|
4
|
44 <collection name="features_bed" type="list" format="bed" label="${tool.name} on ${on_string} (best bed)">
|
5
|
45 <discover_datasets pattern="__name__" directory="feature_hits_dir" format="bed"/>
|
4
|
46 </collection>
|
|
47 <collection name="features_png" type="list" format="png" label="${tool.name} on ${on_string} (png)">
|
0
|
48 <discover_datasets pattern="(?P<designation>.+)\.(?P<ext>png)" directory="output_dir"/>
|
|
49 </collection>
|
|
50 </outputs>
|
|
51 <tests>
|
|
52 <test>
|
|
53 <param name="contigs" value="PS01519_contigs.fasta.gz" ftype="fasta.gz"/>
|
|
54 <param name="feature_hits">
|
|
55 <collection type="list">
|
|
56 <element name="amr_cds.bed" value="amr_cds.bed"/>
|
|
57 </collection>
|
|
58 </param>
|
4
|
59 <output_collection name="features_bed" type="list" count="1">
|
5
|
60 <element name="amr_cds.bed" ftype="bed">
|
4
|
61 <assert_contents>
|
6
|
62 <has_size value="610" delta="10"/>
|
4
|
63 </assert_contents>
|
|
64 </element>
|
|
65 </output_collection>
|
0
|
66 <output_collection name="features_png" type="list" count="1">
|
|
67 <element name="contig_1" ftype="png">
|
|
68 <assert_contents>
|
|
69 <has_size value="25383" delta="100"/>
|
|
70 </assert_contents>
|
|
71 </element>
|
|
72 </output_collection>
|
|
73 </test>
|
|
74 </tests>
|
|
75 <help>
|
|
76 **What it does**
|
|
77
|
|
78 Accepts a FASTA file of assembled contigs and a collection of 2 BED files containing the feature hits and plots
|
|
79 the features.
|
|
80 </help>
|
|
81 <expand macro="citations"/>
|
|
82 </tool>
|
|
83
|