Hello Ross and Galaxy team,

May I suggest this small patch, that enables WebLogo to plot either Entropy 
bits (the current default) or just nucleotides probabilities ?
It uses the standard "-U" parameter of "weblogo3".


# HG changeset patch
# User A. Gordon <gor...@cshl.edu>
# Date 1309468091 14400
# Node ID 9c6e1bc31f1973b5bdb0e2f18263d5bf262a5ddf
# Parent  d761bdb87ba38f7fd1812a0dabd87c142b71b9bb
rgWebLogo3: Add "Units" parameter, support entropy or probabilities

diff -r d761bdb87ba3 -r 9c6e1bc31f19 tools/rgenetics/rgWebLogo3.py
--- a/tools/rgenetics/rgWebLogo3.py	Tue Jun 28 16:05:35 2011 -0400
+++ b/tools/rgenetics/rgWebLogo3.py	Thu Jun 30 17:08:11 2011 -0400
@@ -98,6 +98,8 @@
             self.clparams['-u'] = self.opts.upper        
         if self.opts.colours <> None:
             self.clparams['-c'] = self.opts.colours
+        if self.opts.units <> None:
+            self.clparams['-U'] = self.opts.units
         s = self.runCL()
         return check,s
@@ -106,7 +108,7 @@
     called as
 <command interpreter="python"> 
-    rgWebLogo3.py --outformat $outformat -s $size -i $input -o $output -t "$logoname" -c "$colours"
+    rgWebLogo3.py --outformat $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
@@ -122,6 +124,7 @@
     op.add_option('-c', '--colours', default=None)
     op.add_option('-l', '--lower', default=None)
     op.add_option('-u', '--upper', default=None)  
+    op.add_option('-U', '--units', default=None)  
     opts, args = op.parse_args()
     assert opts.input <> None,'weblogo3 needs a -i parameter with a fasta input file - cannot open'
     assert os.path.isfile(opts.input),'weblogo3 needs a valid fasta input file - cannot open %s' % opts.input
diff -r d761bdb87ba3 -r 9c6e1bc31f19 tools/rgenetics/rgWebLogo3.xml
--- a/tools/rgenetics/rgWebLogo3.xml	Tue Jun 28 16:05:35 2011 -0400
+++ b/tools/rgenetics/rgWebLogo3.xml	Thu Jun 30 17:08:11 2011 -0400
@@ -1,7 +1,7 @@
 <tool id="rgweblogo3" name="Sequence Logo" version="0.2">
    <description>generator for fasta (eg Clustal alignments)</description>
    <command interpreter="python"> 
-    rgWebLogo3.py -F $outformat -s $size -i $input -o $output -t "$logoname" -c "$colours"
+    rgWebLogo3.py -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
@@ -18,6 +18,10 @@
       <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">
+      <option value="bits" selected="True">Entropy (bits)</option>
+      <option value="probability">Probability</option>
+    </param>
     <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>
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:


Reply via email to