view tools/rgenetics/rgWebLogo3.xml @ 1:cdcb0ce84a1b

author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
line wrap: on
line source

<tool id="rgweblogo3" name="Sequence Logo" version="0.4">
   <description>generator for fasta (eg Clustal alignments)</description>
   <command interpreter="python"> -F $outformat -s $size -i $input -o $output -t "$logoname" -c "$colours" -U "$units"
#if $range.mode == 'part'
-l "$range.seqstart" -u "$range.seqend"
#end if
    <param format="fasta" name="input" type="data" label="Fasta File" />
    <param name="logoname" label="Title for output Sequence Logo" type="text" size="50" value="Galaxy-Rgenetics Sequence Logo" />
    <param name="outformat" type="select" label="Output format for image (or text report)" >
      <option value="png">PNG screen quality</option>
      <option value="png_print">High quality printable PNG</option>
      <option value="pdf" selected="True">PDF</option>
      <option value="jpeg">JPG</option>
      <option value="eps">EPS</option>
      <option value="txt">Text (shows the detailed calculations for each position - no image)</option>
    <param name="units" type="select" label="Display Units"
      help="What the height of each logo element depicts - eg bits of entropy (default)">
      <option value="bits" selected="True">Entropy (bits)</option>
      <option value="probability">Probability</option>
      <option value="nats">Nats</option>
      <option value="kT">kT</option>
      <option value="kJ/mol">kJ/mol</option>
      <option value="kcal/mol">kcal/mol</option>
    <param name="colours" type="select" label="Colour scheme for output Sequence Logo" 
      help="Note that some of these only make sense for protein sequences!">
      <option value="auto" selected="True">Default automatic colour selection</option>
      <option value="base pairing">Base pairing</option>
      <option value="charge">Charge colours</option>
      <option value="chemistry">Chemistry colours</option>
      <option value="classic">Classical colours</option>
      <option value="hydrophobicity">Hydrophobicity</option>
      <option value="monochrome">monochrome</option>

    <conditional name="range">
        <param name="mode" type="select" label="Include entire sequence (default) or specify a subsequence range to use">
          <option value="complete" selected="true">complete sequence</option>
          <option value="part">Only use a part of the sequence</option>
        <when value="complete">
        <when value="part">    
           <param name="seqstart" size="5" type="integer" value="1" help="WARNING: Specifying indexes outside the sequence lengths will cause unpredictable but bad consequences!" 
             label="Index (eg 1=first letter) of the start of the sequence range to include in the logo">
           <param name="seqend" size="5" type="integer" value="99999" label="Index (eg 75=75th letter) of the end of the sequence range to include in the logo" >
    <param name="size" type="select" label="Output weblogo size" >
      <option value="large" selected="True">Large</option>
      <option value="medium">Medium</option>
      <option value="small">Small</option>
    <data format="pdf" name="output"  label="${logoname}_output.${outformat}">
           <when input="outformat" value="png_print" format="png" />
           <when input="outformat" value="png" format="png" />
           <when input="outformat" value="jpeg" format="jpg" />
           <when input="outformat" value="eps" format="eps" />
           <when input="outformat" value="txt" format="txt" />
      <param name="input" value="rgClustal_testout.fasta" />
      <param name = "logoname" value="Galaxy/Rgenetics weblogo" />
      <param name = "outformat" value="jpeg" />
      <param name = "mode" value="complete" />
      <param name = "size" value="medium" />      
      <param name = "colours" value="auto" />
      <param name = "units" value="bits" /> 
      <output name="output" file="rgWebLogo3_test.jpg" ftype="jpg" compare="sim_size" delta="10000" />
      <param name="input" value="rgClustal_testout.fasta" />
      <param name = "logoname" value="Galaxy/Rgenetics weblogo" />
      <param name = "outformat" value="png" />
      <param name = "mode" value="complete" />
      <param name = "size" value="medium" />      
      <param name = "colours" value="auto" />
      <param name = "units" value="probability" /> 
      <output name="output" file="rgWebLogo3_test2.png" ftype="png" compare="sim_size" delta="10000" />


This tool uses Weblogo3_ in Galaxy to generate a sequence logo. The input file must be a fasta file in your current history.

It is recommended for (eg) viewing multiple sequence alignments output from the clustalw tool - set the output to fasta and feed
it in to this tool.

A typical output looks like this

.. image:: ./static/images/rgWebLogo3_test.jpg


**Warning about input Fasta format files**

The Weblogo3 program used by this tool will fail if your fasta sequences are not all EXACTLY the same length. The tool will provide a warning
and refuse to call the weblogo3 executable if irregular length sequences are detected.

Fasta alignments from the companion ClustalW Galaxy tool will work but many other fasta files may cause this tool to fail - please do not file 
a Galaxy bug report - this is a feature of the tool and a problem with your source data - not a tool error - please make certain all your fasta 
sequences are the same length!



Weblogo attribution and associated documentation are available at Weblogo3_

This Galaxy wrapper was written by Ross Lazarus for the rgenetics project and the source code is licensed under the LGPL_ like other rgenetics artefacts

.. _Weblogo3:

.. _LGPL: