Question: Syntax Error User-Provided Input
0
gravatar for danielfortin86
3.9 years ago by
United States
danielfortin86110 wrote:

I'm trying to modify a tool so that a user can type in data and pipe it from stdin (e.g. <echo "ACGTATGATGT") instead of providing it to galaxy as a fasta file. The command is included below. When I try to execute this command in galaxy I get a syntax error. However, when I view the "job command-line" and execute that outside of galaxy it functions correctly. Can anyone tell me what the problem is?

<command>

blastn
-query &lt;(echo -e "$input_seq.query2")

</command>

 

Fatal error: Exit code 2 ()
/nfs/seqdata/galaxy-data/job_working_directory/000/118/galaxy_118.sh: line 17: syntax error near unexpected token `('
/nfs/seqdata/galaxy-data/job_working_directory/000/118/galaxy_118.sh: line 17: `PACKAGE_BASE=/opt/shed_tools/blast+/2.2.29/devteam/ncbi_blast_plus/623f727cdff1; export PACKAGE_BASE; . /opt/shed_tools/blast+/2.2.29/devteam/ncbi_blast_plus/623f727cdff1/env.sh; blastn -version > /nfs/seqdata/galaxy-data/tmp/GALAXY_VERSION_STRING_118 2>&1; bash /opt/shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus/623f727cdff1/ncbi_blast_plus/tools/ncbi_blast_plus/blastn -query <(echo -e "CTTCGAACCTCTGCCATCAGGACAGCCCCCAATCCCTATTATTGCCAGGTGGGGCTTGGCCCGGCCCAGTCCTGGCCTCTGCCACCAGGTGTCACCGAGGTTTCCCCAGCCAATGTTACTCTGCTCAGAG")     -db "/nfs/seqdata/blastdb/nt_nr"      -task blastn -evalue 0.001 -out "/nfs/seqdata/galaxy-data/files/000/dataset_350.dat"     -outfmt "6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles"      -num_threads "${GALAXY_SLOTS:-8}"'

galaxy • 1.1k views
ADD COMMENTlink modified 3.9 years ago by Daniel Blankenberg ♦♦ 1.7k • written 3.9 years ago by danielfortin86110
1
gravatar for Daniel Blankenberg
3.9 years ago by
Daniel Blankenberg ♦♦ 1.7k
United States
Daniel Blankenberg ♦♦ 1.7k wrote:

It looks like you just need to turn a Galaxy parameter into a file for command-line usage. I would suggest using configfiles for this: https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax#A.3Cconfigfiles.3E_tag_set

 

<configfiles>
    <configfile name="fasta_file">${input_seq.query2}</configfile>
<configfiles>

Then reference the filename as ${fasta_file}

ADD COMMENTlink written 3.9 years ago by Daniel Blankenberg ♦♦ 1.7k

That worked perfectly, thank you!

ADD REPLYlink written 3.9 years ago by danielfortin86110
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: 167 users visited in the last hour