root/galaxy-central/tools/mutation/visualize.xml

リビジョン 2, 4.4 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1<tool id="mutation_visualize" name="Mutation Visualization" version="1.0.0">
2  <description></description>
3  <command interpreter="python">
4    visualize.py
5        --input-file=$input1
6        --output-file=$out_file1
7        --zoom=$zoom_value
8        --position_col=$position_col
9        --ref_col=$ref_col
10        #for $f in $sample_chooser:
11            "${f.name}"
12            ${f.a_col}
13            ${f.totals_col}
14        #end for
15  </command>
16  <inputs>
17    <param format="tabular" name="input1" type="data" label="Compare sequences in"></param>
18    <param name="position_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Position Column" help="" />
19    <param name="ref_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Reference Base Column" help="" />
20
21    <repeat name="sample_chooser" title="Sample">
22      <param name="name" type="text" label="Label" help="Optional" />
23      <param name="a_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Base A Column" help="" />
24      <param name="totals_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Totals Column" help="" />
25    </repeat>
26
27    <param name="zoom_value" type="select" label="Zoom">
28        <option value="1">1x</option>
29        <option value="2">2x</option>
30        <option value="3">3x</option>
31        <option value="4">4x</option>
32        <option value="5">5x</option>
33        <option value="6">6x</option>
34        <option value="7">7x</option>
35        <option value="8">8x</option>
36        <option value="9">9x</option>
37        <option value="10">10x</option>
38        <option value="interactive">Interactive</option>
39    </param>
40   
41  </inputs>
42  <outputs>
43    <data format="svg" name="out_file1" />
44  </outputs>
45  <tests>
46    <test>
47      <param name="input1" value="mutation_data1.txt" ftype="tabular" />
48      <param name="position_col" value="2" />
49      <param name="ref_col" value="4" />
50      <param name="zoom_value" value="interactive" />
51      <param name="name" value="s1" />
52      <param name="a_col" value="5" />
53      <param name="totals_col" value="9" />
54      <output name="output" file="mutation_data1_interactive.svg" ftype="svg" />
55    </test>
56    <test>
57      <param name="input1" value="mutation_data1.txt" ftype="tabular" />
58      <param name="position_col" value="2" />
59      <param name="ref_col" value="4" />
60      <param name="zoom_value" value="3" />
61      <param name="name" value="s1" />
62      <param name="a_col" value="5" />
63      <param name="totals_col" value="9" />
64      <output name="output" file="mutation_data1_zoom3x.svg" ftype="svg" />
65    </test>
66  </tests>
67  <help>
68**What it does**
69
70This 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.
71
72You 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.
73This tool assumes the columns specifying bases A, C, G, T are placed consecutively and in that order in an input file.
74
75Interactivity: 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.
76
77-----
78
79**General Example**
80
81Given the input file::
82 
83  chrM    72      73      G   26394   4       49  0   26447   26398   1   23389   3       45  0   23437   23392   1
84  chrM    149     150     T   11      50422   2   96  50531   50435   1   4       45417   1   65  45487   45422   1
85 
86To visualize the two samples in the input file, the following parameters are selected before running the tool::
87 
88  Position column:        2
89  Reference Base column:  4
90  Sample 1 Label:         gm blood
91  Sample 1 Base A column: 5
92  Sample 1 Totals column: 9
93  Sample 2 Label:         gm cheek
94  Sample 2 Base A column: 12
95  Sample 2 Totals column: 16
96
97Visualization output:
98
99.. image:: ../static/images/mutation_visualization_example.png
100   :width: 150
101   
102Here the left-most column represents the position and the background color is the reference base color. Each column on its right describe each sample.
103In the output above, the blue bar is the longest, which means that base A is maximum in position 72 for both the samples. 
104
105  </help>
106</tool>
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。