Question: How to insert > symbol in value
0
gravatar for 18Kbeyond
14 months ago by
18Kbeyond • 20
New York
18Kbeyond • 20 wrote:

Hi. Can someone help with this:

I am writing this option line highlighted with ** below. I have tried these 3 ways but none of them work as the command line in galaxy will display awk '{if($9==" __gt__ ") instead of > , which is what I want.

1) >

2) \ > (no space)

3) & g t ; (no space)

xml:


<command>

        awk '{if(\$9=="$mutationType") {print \$0}}' $input | cut -f 1-6 &gt; $output

  </command>

  <inputs>

        <param name="mutationType" type="select" label="Select a specific type of mutations ">

                <option value="-">deletion</option>

                **<option value=" > ">substitution</option>**

                <option value="+">insertion</option>

        </param>
ADD COMMENT • link • modified 14 months ago by danielsauceda • 60 • written 14 months ago by 18Kbeyond • 20
2
gravatar for Bjoern Gruening
14 months ago by
Bjoern Gruening ♦ 5.1k
Germany
Bjoern Gruening ♦ 5.1k wrote:

Hi,

please have a look at "sanatizers" https://docs.galaxyproject.org/en/latest/dev/schema.html#tool-inputs-param-sanitizer. These will make sure a user can not pass arbitrary characters into your program.

For an example please see here: https://github.com/bgruening/galaxytools/blob/master/tools/text_processing/text_processing/awk.xml

Ciao,

Bjoern

ADD COMMENT • link written 14 months ago by Bjoern Gruening ♦ 5.1k

Thank you ! I see in the example you give that it uses & a p o s ; (no space) to write apostrophe in option value section. What shall I use to write > then, as & g t ; (no space) doesn't work for me. Though it works in the command section (after I click on execute, I see in view details page that the command line shows > for the one in command section)

ADD REPLY • link modified 14 months ago • written 14 months ago by 18Kbeyond • 20
0
gravatar for danielsauceda
14 months ago by
Texas A&M
danielsauceda • 60 wrote:

So ya I've written a tool that passes comparators before. my solution looks like this

<param name="comparator" type="select" label="method of comparison (i.e signal less-than &lt; cut-off value">
  <option value="&lt;">Less than: &lt; </option>
  <option value="&lt;=">Less than equal to: &lt;= </option>
  <option value="&gt;">Greater than: &gt;</option>
  <option value="&gt;=">Greater than equal to: &gt;= </option>
  <option value="==">Equal to: == </option>
</param>
ADD COMMENT • link written 14 months ago by danielsauceda • 60

Thank you very much for helping. However, I don't think & g t ; (no space) works. After I click on execute, the output is empty and in view details page, I see the command line shows __gt__ instead of >

& g t ; (no space) works in the <command> section though. As I wrote in my script above. In view details page, I see the command line shows >

ADD REPLY • link modified 14 months ago • written 14 months ago by 18Kbeyond • 20

works on my tools. put my command tools uses python not bash.

ADD REPLY • link written 14 months ago by danielsauceda • 60
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 174 users visited in the last hour