Variables always match the empty string?
I have a script that allows arbitrary filtering on a resource within a more complicated step. in the command section, I have: #if $filter_fxn1 != "" --filter_fxn1="$filter_fxn1" #end if and <param name='filter_fxn1' type='text' label='Filter expression for resource1' /> in the inputs section. The trouble is that when there is no text in the input text box, I'm still getting --filter_fxn1="" in my parameter string. galaxy.jobs.runners.local DEBUG 2010-08-02 16:06:33,027 execution finished: python /home/wbiesing/galaxy_dist/tools/chipSeq/python/enrichment_pairwise.py --quiet --filter_fxn1="" PS-- for simple questions like this on developing tools, should I be deferring to the galaxy-users list? Thanks! -- Jake Biesinger Graduate Student Xie Lab, UC Irvine (949) 231-7587
Maybe try just "#if $filter_fxn1:" You seem to be missing a colon after the "if", regardless On Mon, Aug 2, 2010 at 7:19 PM, Jacob Biesinger <jake.biesinger@uci.edu> wrote:
I have a script that allows arbitrary filtering on a resource within a more complicated step. in the command section, I have: #if $filter_fxn1 != "" --filter_fxn1="$filter_fxn1" #end if and <param name='filter_fxn1' type='text' label='Filter expression for resource1' /> in the inputs section. The trouble is that when there is no text in the input text box, I'm still getting --filter_fxn1="" in my parameter string. galaxy.jobs.runners.local DEBUG 2010-08-02 16:06:33,027 execution finished: python /home/wbiesing/galaxy_dist/tools/chipSeq/python/enrichment_pairwise.py --quiet --filter_fxn1="" PS-- for simple questions like this on developing tools, should I be deferring to the galaxy-users list? Thanks! -- Jake Biesinger Graduate Student Xie Lab, UC Irvine (949) 231-7587
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Hi Jake, What is happening here is that in the command line substitution, the $filter_fxn variable is actually a wrapper object and not strictly a string. If you want to compare $filter_fxn1 to a string, you can try something like #if str( $filter_fxn1 ) != "": or #if $filter_fxn1.value != "": Thanks for using Galaxy, Dan On Aug 2, 2010, at 7:19 PM, Jacob Biesinger wrote:
I have a script that allows arbitrary filtering on a resource within a more complicated step. in the command section, I have: #if $filter_fxn1 != "" --filter_fxn1="$filter_fxn1" #end if
and
<param name='filter_fxn1' type='text' label='Filter expression for resource1' /> in the inputs section. The trouble is that when there is no text in the input text box, I'm still getting --filter_fxn1="" in my parameter string.
galaxy.jobs.runners.local DEBUG 2010-08-02 16:06:33,027 execution finished: python /home/wbiesing/galaxy_dist/tools/chipSeq/python/enrichment_pairwise.py --quiet --filter_fxn1=""
PS-- for simple questions like this on developing tools, should I be deferring to the galaxy-users list?
Thanks! -- Jake Biesinger Graduate Student Xie Lab, UC Irvine (949) 231-7587 _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
participants (3)
-
Daniel Blankenberg
-
Jacob Biesinger
-
Kanwei Li