Mercurial > repos > nick > dna_visualizer
diff literal.xml @ 5:58160195728e
Change color setting UI, allow background color setting, limit image size.
author | Nick Stoler <nstoler@psu.edu> |
---|---|
date | Sun, 02 Mar 2014 22:01:44 -0500 |
parents | 16772d7246e0 |
children | 0c552e103c93 |
line wrap: on
line diff
--- a/literal.xml Sun Mar 02 15:02:00 2014 -0500 +++ b/literal.xml Sun Mar 02 22:01:44 2014 -0500 @@ -2,13 +2,13 @@ <description>Visualize DNA with colored pixels.</description> <command interpreter="python">literal.py $input -o $output -c -s ${width}x${height} #if $colors.custom: - -A $colors.AR,$colors.AG,$colors.AB -T $colors.TR,$colors.TG,$colors.TB -G $colors.GR,$colors.GG,$colors.GB -C $colors.CR,$colors.CG,$colors.CB + -b $colors.background -G $colors.G -C $colors.C -A $colors.A -T $colors.T #end if </command> <inputs> <param name="input" type="data" format="fasta,text" label="Input sequence" /> - <param name="width" type="integer" value="512" label="Output image width" help="in pixels" /> - <param name="height" type="integer" value="512" label="Output image height" help="in pixels" /> + <param name="width" type="integer" value="512" min="0" max="16384" label="Output image width" help="in pixels (max 16384)" /> + <param name="height" type="integer" value="512" min="0" max="16384" label="Output image height" help="in pixels (max 16384)" /> <conditional name="colors"> <param name="custom" type="select" label="Base colors"> <option value="" selected="True">Use default colors</option> @@ -18,29 +18,28 @@ <!-- do nothing --> </when> <when value="true"> - <!-- 'A':'0,255,0', 'T':'255,0,0', 'G':'255,255,255', 'C':'0,0,255' --> - <param name="AR" type="integer" value="0" label="A red value" /> - <param name="AG" type="integer" value="255" label="A green value" /> - <param name="AB" type="integer" value="0" label="A blue value" /> - <param name="TR" type="integer" value="255" label="T red value" /> - <param name="TG" type="integer" value="0" label="T green value" /> - <param name="TB" type="integer" value="0" label="T blue value" /> - <param name="GR" type="integer" value="255" label="G red value" /> - <param name="GG" type="integer" value="255" label="G green value" /> - <param name="GB" type="integer" value="255" label="G blue value" /> - <param name="CR" type="integer" value="0" label="C red value" /> - <param name="CG" type="integer" value="0" label="C green value" /> - <param name="CB" type="integer" value="255" label="C blue value" /> + <!-- 'G':'255,255,255', 'C':'0,0,255', 'A':'0,255,0', 'T':'255,0,0' --> + <param name="G" type="text" value="255,255,255" label="G RGB value" help="Three numbers 0 through 255, separated by commas (no spaces)"> + <validator type="regex" message='Color must be in the form of "R,G,B"'>^[0-9]+,[0-9]+,[0-9]+$</validator> + </param> + <param name="C" type="text" value="0,0,255" label="C RGB value" help="Three numbers 0 through 255, separated by commas (no spaces)"> + <validator type="regex" message='Color must be in the form of "R,G,B"'>^[0-9]+,[0-9]+,[0-9]+$</validator> + </param> + <param name="A" type="text" value="0,255,0" label="A RGB value" help="Three numbers 0 through 255, separated by commas (no spaces)"> + <validator type="regex" message='Color must be in the form of "R,G,B"'>^[0-9]+,[0-9]+,[0-9]+$</validator> + </param> + <param name="T" type="text" value="255,0,0" label="T RGB value" help="Three numbers 0 through 255, separated by commas (no spaces)"> + <validator type="regex" message='Color must be in the form of "R,G,B"'>^[0-9]+,[0-9]+,[0-9]+$</validator> + </param> + <param name="background" type="text" value="255,255,255" label="background RGB value" help="Three numbers 0 through 255, separated by commas (no spaces)"> + <validator type="regex" message='Color must be in the form of "R,G,B"'>^[0-9]+,[0-9]+,[0-9]+$</validator> + </param> </when> </conditional> </inputs> <outputs> <data name="output" format="png"/> </outputs> - <stdio> - <exit_code range="1:" err_level="fatal"/> - <exit_code range=":-1" err_level="fatal"/> - </stdio> <help>