bar_chart plotting tool
Hello, It looks like the bar_chart tool is broken (you've removed it from "main", and it doesn't work on "test"). If I may suggest a fix: Running "bar_chart" on "test" and on my local galaxy, gives a 'cheeta' error: ====================== ... ... File "/galaxy/home/g2test/galaxy_test/eggs/py2.5-solaris-2.10-i86pc-ucs2/Cheetah-2.2.2-py2.5-solaris-2.10-i86pc.egg/Cheetah/Parser.py", line 2645, in popFromOpenDirectivesStack raise ParseError(self, msg="#end found, but nothing to end") ParseError: #end found, but nothing to end Line 4, column 1 Line|Cheetah Code ----|------------------------------------------------------------- 2 | #else: #bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" 3 | #end if 4 | ^ ====================== The reason for this is that something changed in recent 'cheetas' modules (happened to me with other tools, too), and now "#ifs" statements must start at the beginning of the line (no white space is allowed). The current "bar_chart.xml" looks like this: ================ <command interpreter="python"> #if $xtic.userSpecified == "Yes": #bar_chart.py $input $xtic.xticColumn $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #else: #bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #end if </command> ================ Removing white space and putting the actual command on a separate line *almost* works: ================ <command interpreter="python"> #if $xtic.userSpecified == "Yes": bar_chart.py $input $xtic.xticColumn $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #else: bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #end if </command> ================ The reason it *almost* works is because of the "interpreter" tag, Galaxy prefixes the command ("bar_chart.py") with the tool's directory name, but the cheeta code causes an extra white space. The executed command looks like this (Note the single space between the directory name and the 'bar_chart.py'): ================== galaxy.jobs.runners.local DEBUG 2010-02-03 10:11:26,936 executing: python /home/gordon/projects/galaxy_devel/tools/plotting/ bar_chart.py /home/gordon/projects/galaxy_devel/database/files/000/dataset_5.dat 1 2 "Bar Chart" "V1" 0 0 /home/gordon/projects/galaxy_devel/database/files/000/dataset_9.dat "800,600" ===================== This of course fails with the error: ===================== python: '/home/gordon/projects/galaxy_devel/tools/plotting/' is a directory, cannot continue ===================== My solution is to move the cheeta code after the 'bar_chart.py', so there will be no extra white space. The following XML code fixes the problem: ===================== <command interpreter="python">bar_chart.py $input #if $xtic.userSpecified == "Yes": $colList #else: 0 #end if $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" </command> ===================== and the bar-chart tool works again (assuming you've installed "numpy" and "gnuplot" python modules). Thanks to John for finding this bug. -gordon
Sorry, I had a mistake in my suggested fix. It should read: ==== <command interpreter="python">bar_chart.py $input #if $xtic.userSpecified == "Yes": $xtic.xticColumn #else: 0 #end if $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" </command> ==== And not as shown in the message below ($xtic.xticcolumn instead of $colList inside the "if"). -gordon Assaf Gordon wrote, On 02/03/2010 10:33 AM:
Hello,
It looks like the bar_chart tool is broken (you've removed it from "main", and it doesn't work on "test").
If I may suggest a fix:
Running "bar_chart" on "test" and on my local galaxy, gives a 'cheeta' error: ====================== ... ... File "/galaxy/home/g2test/galaxy_test/eggs/py2.5-solaris-2.10-i86pc-ucs2/Cheetah-2.2.2-py2.5-solaris-2.10-i86pc.egg/Cheetah/Parser.py", line 2645, in popFromOpenDirectivesStack raise ParseError(self, msg="#end found, but nothing to end") ParseError:
#end found, but nothing to end Line 4, column 1
Line|Cheetah Code ----|------------------------------------------------------------- 2 | #else: #bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" 3 | #end if 4 | ^ ======================
The reason for this is that something changed in recent 'cheetas' modules (happened to me with other tools, too), and now "#ifs" statements must start at the beginning of the line (no white space is allowed).
The current "bar_chart.xml" looks like this: ================ <command interpreter="python"> #if $xtic.userSpecified == "Yes": #bar_chart.py $input $xtic.xticColumn $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #else: #bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #end if </command> ================
Removing white space and putting the actual command on a separate line *almost* works: ================ <command interpreter="python"> #if $xtic.userSpecified == "Yes": bar_chart.py $input $xtic.xticColumn $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #else: bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #end if </command> ================
The reason it *almost* works is because of the "interpreter" tag, Galaxy prefixes the command ("bar_chart.py") with the tool's directory name, but the cheeta code causes an extra white space. The executed command looks like this (Note the single space between the directory name and the 'bar_chart.py'): ================== galaxy.jobs.runners.local DEBUG 2010-02-03 10:11:26,936 executing: python /home/gordon/projects/galaxy_devel/tools/plotting/ bar_chart.py /home/gordon/projects/galaxy_devel/database/files/000/dataset_5.dat 1 2 "Bar Chart" "V1" 0 0 /home/gordon/projects/galaxy_devel/database/files/000/dataset_9.dat "800,600" =====================
This of course fails with the error: ===================== python: '/home/gordon/projects/galaxy_devel/tools/plotting/' is a directory, cannot continue =====================
My solution is to move the cheeta code after the 'bar_chart.py', so there will be no extra white space. The following XML code fixes the problem: ===================== <command interpreter="python">bar_chart.py $input #if $xtic.userSpecified == "Yes": $colList #else: 0 #end if $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" </command> =====================
and the bar-chart tool works again (assuming you've installed "numpy" and "gnuplot" python modules).
Thanks to John for finding this bug. -gordon _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
Hi Assaf, I've updated the tool, although using a slightly different format to match our Cheetah formatting in other templates. The fix is in changeset 3354:4e8785b6815c. Thanks! --nate Assaf Gordon wrote:
Sorry, I had a mistake in my suggested fix.
It should read: ==== <command interpreter="python">bar_chart.py $input #if $xtic.userSpecified == "Yes": $xtic.xticColumn #else: 0 #end if $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" </command> ====
And not as shown in the message below ($xtic.xticcolumn instead of $colList inside the "if").
-gordon
Assaf Gordon wrote, On 02/03/2010 10:33 AM:
Hello,
It looks like the bar_chart tool is broken (you've removed it from "main", and it doesn't work on "test").
If I may suggest a fix:
Running "bar_chart" on "test" and on my local galaxy, gives a 'cheeta' error: ====================== ... ... File "/galaxy/home/g2test/galaxy_test/eggs/py2.5-solaris-2.10-i86pc-ucs2/Cheetah-2.2.2-py2.5-solaris-2.10-i86pc.egg/Cheetah/Parser.py", line 2645, in popFromOpenDirectivesStack raise ParseError(self, msg="#end found, but nothing to end") ParseError:
#end found, but nothing to end Line 4, column 1
Line|Cheetah Code ----|------------------------------------------------------------- 2 | #else: #bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" 3 | #end if 4 | ^ ======================
The reason for this is that something changed in recent 'cheetas' modules (happened to me with other tools, too), and now "#ifs" statements must start at the beginning of the line (no white space is allowed).
The current "bar_chart.xml" looks like this: ================ <command interpreter="python"> #if $xtic.userSpecified == "Yes": #bar_chart.py $input $xtic.xticColumn $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #else: #bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #end if </command> ================
Removing white space and putting the actual command on a separate line *almost* works: ================ <command interpreter="python"> #if $xtic.userSpecified == "Yes": bar_chart.py $input $xtic.xticColumn $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #else: bar_chart.py $input 0 $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" #end if </command> ================
The reason it *almost* works is because of the "interpreter" tag, Galaxy prefixes the command ("bar_chart.py") with the tool's directory name, but the cheeta code causes an extra white space. The executed command looks like this (Note the single space between the directory name and the 'bar_chart.py'): ================== galaxy.jobs.runners.local DEBUG 2010-02-03 10:11:26,936 executing: python /home/gordon/projects/galaxy_devel/tools/plotting/ bar_chart.py /home/gordon/projects/galaxy_devel/database/files/000/dataset_5.dat 1 2 "Bar Chart" "V1" 0 0 /home/gordon/projects/galaxy_devel/database/files/000/dataset_9.dat "800,600" =====================
This of course fails with the error: ===================== python: '/home/gordon/projects/galaxy_devel/tools/plotting/' is a directory, cannot continue =====================
My solution is to move the cheeta code after the 'bar_chart.py', so there will be no extra white space. The following XML code fixes the problem: ===================== <command interpreter="python">bar_chart.py $input #if $xtic.userSpecified == "Yes": $colList #else: 0 #end if $colList "$title" "$ylabel" $ymin $ymax $out_file1 "$pdf_size" </command> =====================
and the bar-chart tool works again (assuming you've installed "numpy" and "gnuplot" python modules).
Thanks to John for finding this bug. -gordon _______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev
participants (2)
-
Assaf Gordon
-
Nate Coraor