Previous changeset 4:5f5a358b281f (2015-08-05) Next changeset 6:d9f3d4779507 (2017-05-10) |
Commit message:
v0.0.6 Fixed input parameter help text |
modified:
tools/mummer/README.rst tools/mummer/mummer.py tools/mummer/mummer.xml tools/mummer/tool_dependencies.xml |
b |
diff -r 5f5a358b281f -r 683ea5ab0008 tools/mummer/README.rst --- a/tools/mummer/README.rst Wed Aug 05 11:34:31 2015 -0400 +++ b/tools/mummer/README.rst Wed Feb 01 06:58:01 2017 -0500 |
b |
@@ -1,7 +1,7 @@ Galaxy wrapper for drawing dotplots using MUMmer 3 ================================================== -This wrapper is copyright 2014-2015 by Peter Cock, The James Hutton Institute +This wrapper is copyright 2014-2016 by Peter Cock, The James Hutton Institute (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved. See the licence text below. @@ -65,6 +65,8 @@ - Test case added. v0.0.5 - Reorder XML elements (internal change only). - Planemo for Tool Shed upload (``.shed.yml``, internal change only). +v0.0.6 - PEP8 style changes to Python script (internal change only). + - Fixed display of input parameter help text. ======= ====================================================================== @@ -79,12 +81,12 @@ 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):: - $ planemo shed_update --shed_target testtoolshed --check_diff ~/repositories/pico_galaxy/tools/mummer/ + $ planemo shed_update -t testtoolshed --check_diff ~/repositories/pico_galaxy/tools/mummer/ ... or:: - $ planemo shed_update --shed_target toolshed --check_diff ~/repositories/pico_galaxy/tools/mummer/ + $ planemo shed_update -t toolshed --check_diff ~/repositories/pico_galaxy/tools/mummer/ ... To just build and check the tar ball, use:: |
b |
diff -r 5f5a358b281f -r 683ea5ab0008 tools/mummer/mummer.py --- a/tools/mummer/mummer.py Wed Aug 05 11:34:31 2015 -0400 +++ b/tools/mummer/mummer.py Wed Feb 01 06:58:01 2017 -0500 |
[ |
@@ -14,17 +14,14 @@ import tempfile import shutil -def sys_exit( msg ): - sys.stderr.write("%s\n" % msg) - sys.exit(1) def run(cmd): print(cmd) return_code = os.system(cmd) if return_code: - sys_exit("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:]: +if "-v" in sys.argv[1:]or "--version" in sys.argv[1:]: print("MUMmer wrapper v0.0.3\n") # TODO - How to get a version string from the mummer binary? os.system("nucmer --version") @@ -32,29 +29,29 @@ os.system("mummerplot --version") sys.exit(0) -#Parse Command Line -#TODO - optparse +# Parse Command Line +# TODO - optparse try: fasta_a, fasta_b, algorithm, png_out, pdf_out = sys.argv[1:] -except: - sys_exit("Expect 5 arguments, got %i" % (len(sys.argv) - 1)) +except ValueError: + sys.exit("Expect 5 arguments, got %i" % (len(sys.argv) - 1)) valid_algo = ["mummer", "nucmer", "promer"] if algorithm not in valid_algo: - sys_exit("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") coords = prefix + ".mums" -#gnuplot = prefix + ".gp" +# gnuplot = prefix + ".gp" ps_image = prefix + ".ps" png_image = prefix + ".png" if algorithm == "mummer": - #Add -mum as per example to find maximal unique matches between ref and query. - #Add the -b -c options to search both strands and report relative to forward strand - #which then matches the default dual-strand approach in nucmer and promer + # Add -mum as per example to find maximal unique matches between ref and query. + # Add the -b -c options to search both strands and report relative to forward strand + # which then matches the default dual-strand approach in nucmer and promer cmd = '%s -mum -b -c "%s" "%s" > %s' % (algorithm, fasta_a, fasta_b, coords) else: coords = "out.delta" @@ -80,6 +77,6 @@ cmd = 'ps2pdf -dEPSCrop "%s" "%s"' % (ps_image, pdf_out) run(cmd) -#Remove temp files... -os.remove(coords) # Might not be under the temp directory... +# Remove temp files... +os.remove(coords) # Might not be under the temp directory... shutil.rmtree(base_path) |
b |
diff -r 5f5a358b281f -r 683ea5ab0008 tools/mummer/mummer.xml --- a/tools/mummer/mummer.xml Wed Aug 05 11:34:31 2015 -0400 +++ b/tools/mummer/mummer.xml Wed Feb 01 06:58:01 2017 -0500 |
b |
@@ -1,4 +1,4 @@ -<tool id="mummerplot_wrapper" name="MUMmer dotplot" version="0.0.5"> +<tool id="mummerplot_wrapper" name="MUMmer dotplot" version="0.0.6"> <description>Combine mummer/nucmer/promer with mummerplot</description> <requirements> <!-- Needs ps2pdf from ghostscript --> @@ -29,10 +29,10 @@ <!-- Galaxy does not have sub-types for protein vs nucletide FASTA --> <param name="fasta_a" type="data" format="fasta" label="Species A" - description="Nucleotide FASTA file, e.g. contigs from genome assembly." /> + help="Nucleotide FASTA file, e.g. contigs from genome assembly." /> <param name="fasta_b" type="data" format="fasta" label="Species B" - description="Nucleotide FASTA file, e.g. contigs from genome assembly." /> + help="Nucleotide FASTA file, e.g. contigs from genome assembly." /> <param name="algorithm" type="select" label="MUMmer search algorithm"> <option value="mummer">mummer, efficiently locates maximal unique matches between two sequences</option> <option value="nucmer">NUCmer (NUCleotide MUMmer), for closely related sequences</option> |
b |
diff -r 5f5a358b281f -r 683ea5ab0008 tools/mummer/tool_dependencies.xml --- a/tools/mummer/tool_dependencies.xml Wed Aug 05 11:34:31 2015 -0400 +++ b/tools/mummer/tool_dependencies.xml Wed Feb 01 06:58:01 2017 -0500 |
b |
@@ -7,6 +7,6 @@ <repository changeset_revision="a285e78179bd" name="package_ghostscript_9_10" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" /> </package> <package name="gnuplot" version="4.6"> - <repository changeset_revision="1b3a60daf8fb" name="package_gnuplot_4_6" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> + <repository changeset_revision="2d356c5a1354" name="package_gnuplot_4_6" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> </package> </tool_dependency> |