changeset 4:5f5a358b281f draft

v0.0.5 internal changes
author peterjc
date Wed, 05 Aug 2015 11:34:31 -0400
parents 154c000d3fef
children 683ea5ab0008
files tools/mummer/README.rst tools/mummer/mummer.py tools/mummer/mummer.xml tools/mummer/tool_dependencies.xml
diffstat 4 files changed, 39 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/tools/mummer/README.rst	Thu Nov 06 11:50:19 2014 -0500
+++ b/tools/mummer/README.rst	Wed Aug 05 11:34:31 2015 -0400
@@ -1,7 +1,7 @@
 Galaxy wrapper for drawing dotplots using MUMmer 3
 ==================================================
 
-This wrapper is copyright 2014 by Peter Cock, The James Hutton Institute
+This wrapper is copyright 2014-2015 by Peter Cock, The James Hutton Institute
 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved.
 See the licence text below.
 
@@ -43,8 +43,8 @@
 
   <tool file="mummer/mummer.xml" />
 
-If you wish to run the unit tests, also add this to ``tools_conf.xml.sample``
-and move/copy the ``test-data`` files under Galaxy's ``test-data`` folder. Then::
+If you wish to run the unit tests, also move/copy the ``test-data/`` files
+under Galaxy's ``test-data/`` folder. Then::
 
     $ ./run_tests.sh -id mummerplot_wrapper
 
@@ -63,6 +63,8 @@
 v0.0.3  - Install ``ps2pdf`` using Tool Shed's GhostScript package.
 v0.0.4  - Install ``gnuplot`` using Tool Shed's gnuplot package.
         - Test case added.
+v0.0.5  - Reorder XML elements (internal change only).
+        - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
 ======= ======================================================================
 
 
@@ -72,22 +74,32 @@
 Development is on GitHub at:
 https://github.com/peterjc/pico_galaxy/tree/master/tools/mummer
 
-For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball use
-the following command from the Galaxy root folder::
+
+For pushing a release to the test or main "Galaxy Tool Shed", use the following
+Planemo commands (which requires you have set your Tool Shed access details in
+``~/.planemo.yml`` and that you have access rights on the Tool Shed)::
 
-    $ tar -czf mummer.tar.gz tools/mummer/README.rst tools/mummer/mummer.xml tools/mummer/mummer.py tools/mummer/tool_dependencies.xml test-data/magic.png test-data/magic.pdf test-data/rhodopsin_nucs.fasta test-data/three_human_mRNA.fasta
+    $ planemo shed_update --shed_target testtoolshed --check_diff ~/repositories/pico_galaxy/tools/mummer/
+    ...
 
-Check this worked::
+or::
 
-    $ tar -tzf mummer.tar.gz
-    tools/mummer/README.rst
-    tools/mummer/mummer.xml
-    tools/mummer/mummer.py
-    tools/mummer/tool_dependencies.xml
+    $ planemo shed_update --shed_target toolshed --check_diff ~/repositories/pico_galaxy/tools/mummer/
+    ...
+
+To just build and check the tar ball, use::
+
+    $ planemo shed_upload --tar_only  ~/repositories/pico_galaxy/tools/mummer/
+    ...
+    $ tar -tzf shed_upload.tar.gz 
+    test-data/magic.pdf
     test-data/magic.png
-    test-data/magic.pdf
     test-data/rhodopsin_nucs.fasta
     test-data/three_human_mRNA.fasta
+    tools/mummer/README.rst
+    tools/mummer/mummer.py
+    tools/mummer/mummer.xml
+    tools/mummer/tool_dependencies.xml
 
 
 Licence (MIT)
--- a/tools/mummer/mummer.py	Thu Nov 06 11:50:19 2014 -0500
+++ b/tools/mummer/mummer.py	Wed Aug 05 11:34:31 2015 -0400
@@ -14,7 +14,7 @@
 import tempfile
 import shutil
 
-def stop_err( msg ):
+def sys_exit( msg ):
     sys.stderr.write("%s\n" % msg)
     sys.exit(1)
 
@@ -22,7 +22,7 @@
     print(cmd)
     return_code = os.system(cmd)
     if return_code:
-        stop_err("Error %i from: %s" % (return_code, cmd))
+        sys_exit("Error %i from: %s" % (return_code, cmd))
 
 if "-v" in sys.argv [1:]or "--version" in sys.argv[1:]:
     print("MUMmer wrapper v0.0.3\n")
@@ -37,12 +37,12 @@
 try:
     fasta_a, fasta_b, algorithm, png_out, pdf_out = sys.argv[1:]
 except:
-    stop_err("Expect 5 arguments, got %i" % (len(sys.argv) - 1))
+    sys_exit("Expect 5 arguments, got %i" % (len(sys.argv) - 1))
 
 
 valid_algo = ["mummer", "nucmer", "promer"]
 if algorithm not in valid_algo:
-    stop_err("Invalid algorithm argument %r, should be: %s" % (algorithm, ", ".join(valid_algo)))
+    sys_exit("Invalid algorithm argument %r, should be: %s" % (algorithm, ", ".join(valid_algo)))
 
 base_path = tempfile.mkdtemp()
 prefix = os.path.join(base_path, "ref_qry")
--- a/tools/mummer/mummer.xml	Thu Nov 06 11:50:19 2014 -0500
+++ b/tools/mummer/mummer.xml	Wed Aug 05 11:34:31 2015 -0400
@@ -1,4 +1,4 @@
-<tool id="mummerplot_wrapper" name="MUMmer dotplot" version="0.0.4">
+<tool id="mummerplot_wrapper" name="MUMmer dotplot" version="0.0.5">
     <description>Combine mummer/nucmer/promer with mummerplot</description>
     <requirements>
             <!-- Needs ps2pdf from ghostscript -->      
@@ -14,17 +14,17 @@
             <requirement type="binary">gnuplot</requirement>
             <requirement type="package" version="4.6">gnuplot</requirement>
     </requirements>
+    <stdio>
+        <!-- Anything other than zero is an error -->
+        <exit_code range="1:" />
+        <exit_code range=":-1" />
+    </stdio>
     <version_command interpreter="python">
 mummer.py --version
     </version_command>
     <command interpreter="python">
 mummer.py "$fasta_a" "$fasta_b" $algorithm "$png_output" "$pdf_output"
     </command>
-    <stdio>
-        <!-- Anything other than zero is an error -->
-        <exit_code range="1:" />
-        <exit_code range=":-1" />
-    </stdio>
     <inputs>
         <!-- Galaxy does not have sub-types for protein vs nucletide FASTA -->
         <param name="fasta_a" type="data" format="fasta"
@@ -44,8 +44,6 @@
         <data name="pdf_output" format="pdf" label="$algorithm.value PDF: $fasta_a.name vs $fasta_b.name" />
         <data name="png_output" format="png" label="$algorithm.value PNG: $fasta_a.name vs $fasta_b.name" />
     </outputs>
-    <requirements>
-    </requirements>
     <tests>
         <!-- Because exact graphical output is fragile w.r.t. dependency versions,
              all I am trying to verify is a valid PNG and PDF are produced.
@@ -64,6 +62,8 @@
             <output name="pdf_output" file="magic.pdf" ftype="pdf" compare="contains" />
             <output name="png_output" file="magic.png" ftype="png" compare="contains" />
         </test>
+        <!-- Commenting out as this triggers some unexplained failure on TravisCI
+             See http://lists.bx.psu.edu/pipermail/galaxy-dev/2014-October/020764.html
         <test>
             <param name="fasta_a" value="three_human_mRNA.fasta" ftype="fasta" />
             <param name="fasta_b" value="rhodopsin_nucs.fasta" ftype="fasta" />
@@ -71,6 +71,7 @@
             <output name="pdf_output" file="magic.pdf" ftype="pdf" compare="contains" />
             <output name="png_output" file="magic.png" ftype="png" compare="contains" />
         </test>
+        -->
     </tests>
     <help>
 **What it does**
--- a/tools/mummer/tool_dependencies.xml	Thu Nov 06 11:50:19 2014 -0500
+++ b/tools/mummer/tool_dependencies.xml	Wed Aug 05 11:34:31 2015 -0400
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <tool_dependency>
     <package name="mummer" version="3.23">
-        <repository changeset_revision="cc6c4d6ebceb" name="package_mummer_3_23" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="9ddc606546c3" name="package_mummer_3_23" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
     <package name="ghostscript" version="9.10">
         <repository changeset_revision="a285e78179bd" name="package_ghostscript_9_10" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />