Mercurial > repos > xuebing > sharplabtool
view tools/mutation/visualize.xml @ 2:c2a356708570
Uploaded
author | xuebing |
---|---|
date | Fri, 09 Mar 2012 19:45:42 -0500 |
parents | 9071e359b9a3 |
children |
line wrap: on
line source
<tool id="mutation_visualize" name="Mutation Visualization" version="1.0.0"> <description></description> <command interpreter="python"> visualize.py --input-file=$input1 --output-file=$out_file1 --zoom=$zoom_value --position_col=$position_col --ref_col=$ref_col #for $f in $sample_chooser: "${f.name}" ${f.a_col} ${f.totals_col} #end for </command> <inputs> <param format="tabular" name="input1" type="data" label="Compare sequences in"></param> <param name="position_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Position Column" help="" /> <param name="ref_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Reference Base Column" help="" /> <repeat name="sample_chooser" title="Sample"> <param name="name" type="text" label="Label" help="Optional" /> <param name="a_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Base A Column" help="" /> <param name="totals_col" type="data_column" data_ref="input1" multiple="false" numerical="false" label="Coverage Column" help="" /> </repeat> <param name="zoom_value" type="select" label="Zoom"> <option value="interactive">Interactive</option> <option value="1">1x</option> <option value="2">2x</option> <option value="3">3x</option> <option value="4">4x</option> <option value="5">5x</option> <option value="6">6x</option> <option value="7">7x</option> <option value="8">8x</option> <option value="9">9x</option> <option value="10">10x</option> </param> </inputs> <outputs> <data format="svg" name="out_file1" /> </outputs> <tests> <test> <param name="input1" value="mutation_data1.txt" ftype="tabular" /> <param name="position_col" value="2" /> <param name="ref_col" value="4" /> <param name="zoom_value" value="interactive" /> <param name="name" value="s1" /> <param name="a_col" value="5" /> <param name="totals_col" value="9" /> <output name="output" file="mutation_data1_interactive.svg" ftype="svg" /> </test> <test> <param name="input1" value="mutation_data1.txt" ftype="tabular" /> <param name="position_col" value="2" /> <param name="ref_col" value="4" /> <param name="zoom_value" value="3" /> <param name="name" value="s1" /> <param name="a_col" value="5" /> <param name="totals_col" value="9" /> <output name="output" file="mutation_data1_zoom3x.svg" ftype="svg" /> </test> </tests> <help> **What it does** 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. 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. This tool assumes the columns specifying bases A, C, G, T are placed consecutively and in that order in an input file. 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. ----- **General Example** Given the input file:: chrM 72 73 G 26394 4 49 0 26447 26398 1 23389 3 45 0 23437 23392 1 chrM 149 150 T 11 50422 2 96 50531 50435 1 4 45417 1 65 45487 45422 1 To visualize the two samples in the input file, the following parameters are selected before running the tool:: Position column: 2 Reference Base column: 4 Sample 1 Label: gm blood Sample 1 Base A column: 5 Sample 1 Totals column: 9 Sample 2 Label: gm cheek Sample 2 Base A column: 12 Sample 2 Totals column: 16 Visualization output: .. image:: ./static/images/mutation_visualization_example.png :width: 150 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. In the output above, the blue bar is the longest, which means that base A is maximum in position 72 for both the samples. </help> </tool>