annotate tools/mutation/visualize.xml @ 2:c2a356708570

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:42 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="mutation_visualize" name="Mutation Visualization" version="1.0.0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description></description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 visualize.py
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 --input-file=$input1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 --output-file=$out_file1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 --zoom=$zoom_value
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 --position_col=$position_col
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 --ref_col=$ref_col
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 #for $f in $sample_chooser:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 "${f.name}"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 ${f.a_col}
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 ${f.totals_col}
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 #end for
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <param format="tabular" name="input1" type="data" label="Compare sequences in"></param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <param name="position_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Position Column" help="" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <param name="ref_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Reference Base Column" help="" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <repeat name="sample_chooser" title="Sample">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <param name="name" type="text" label="Label" help="Optional" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <param name="a_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Base A Column" help="" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <param name="totals_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Coverage Column" help="" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 </repeat>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <param name="zoom_value" type="select" label="Zoom">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <option value="interactive">Interactive</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <option value="1">1x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <option value="2">2x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <option value="3">3x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <option value="4">4x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <option value="5">5x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <option value="6">6x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <option value="7">7x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <option value="8">8x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <option value="9">9x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <option value="10">10x</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <data format="svg" name="out_file1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <param name="input1" value="mutation_data1.txt" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="position_col" value="2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <param name="ref_col" value="4" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <param name="zoom_value" value="interactive" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <param name="name" value="s1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <param name="a_col" value="5" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 <param name="totals_col" value="9" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <output name="output" file="mutation_data1_interactive.svg" ftype="svg" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <param name="input1" value="mutation_data1.txt" ftype="tabular" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <param name="position_col" value="2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <param name="ref_col" value="4" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 <param name="zoom_value" value="3" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 <param name="name" value="s1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <param name="a_col" value="5" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <param name="totals_col" value="9" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <output name="output" file="mutation_data1_zoom3x.svg" ftype="svg" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 This tool allows you to visualize mutations described in a tabular input file. It generates an SVG image which can be viewed in any web browser.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 You will need to specify the position and reference columns in the input file. Then click on the 'Add new Sample' to add samples in the input file that you would like to visualize. For each sample you select, specify the column for base 'A', the totals column and enter a name.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 This tool assumes the columns specifying bases A, C, G, T are placed consecutively and in that order in an input file.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 Interactivity: If interactive zoom option is selected, then the resultant image can be zoomed in or out using the scroll mouse wheel and can be panned by dragging the image using left mouse button.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 **General Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 Given the input file::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 chrM 72 73 G 26394 4 49 0 26447 26398 1 23389 3 45 0 23437 23392 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 chrM 149 150 T 11 50422 2 96 50531 50435 1 4 45417 1 65 45487 45422 1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 To visualize the two samples in the input file, the following parameters are selected before running the tool::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 Position column: 2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 Reference Base column: 4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 Sample 1 Label: gm blood
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 Sample 1 Base A column: 5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 Sample 1 Totals column: 9
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 Sample 2 Label: gm cheek
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 Sample 2 Base A column: 12
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 Sample 2 Totals column: 16
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 Visualization output:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 .. image:: ./static/images/mutation_visualization_example.png
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 :width: 150
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 Here the left-most column represents the position and the background color is the reference base color. Each column on its right describe each sample.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 In the output above, the blue bar is the longest, which means that base A is maximum in position 72 for both the samples.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 </tool>