changeset 5:3e857aa9e4e5 draft

planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/samtools_depad commit 4bd49529e9ca2096cd875e98daf7190d13fa8d0b-dirty
author peterjc
date Wed, 01 Feb 2017 13:15:06 -0500
parents 5a54e8d6200d
children 29b3958fbf2d
files tools/samtools_depad/README.rst tools/samtools_depad/samtools_depad.py tools/samtools_depad/tool_dependencies.xml
diffstat 3 files changed, 10 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/tools/samtools_depad/README.rst	Thu May 21 10:53:31 2015 -0400
+++ b/tools/samtools_depad/README.rst	Wed Feb 01 13:15:06 2017 -0500
@@ -67,12 +67,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/samtools_depad/
+    $ planemo shed_update -t testtoolshed --check_diff ~/repositories/pico_galaxy/tools/samtools_depad/
     ...
 
 or::
 
-    $ planemo shed_update --shed_target toolshed --check_diff ~/repositories/pico_galaxy/tools/samtools_depad/
+    $ planemo shed_update -t toolshed --check_diff ~/repositories/pico_galaxy/tools/samtools_depad/
     ...
 
 To just build and check the tar ball, use::
--- a/tools/samtools_depad/samtools_depad.py	Thu May 21 10:53:31 2015 -0400
+++ b/tools/samtools_depad/samtools_depad.py	Wed Feb 01 13:15:06 2017 -0500
@@ -13,29 +13,24 @@
 import os
 
 if "-v" in sys.argv or "--version" in sys.argv:
-    #Galaxy seems to invert the order of the two lines
+    # Galaxy seems to invert the order of the two lines
     print "(Galaxy wrapper v0.0.2)"
     cmd = "samtools 2>&1 | grep -i ^Version"
     sys.exit(os.system(cmd))
 
-def sys_exit(msg, error_level=1):
-    """Print error message to stdout and quit with given error level."""
-    sys.stderr.write("%s\n" % msg)
-    sys.exit(error_level)
-
 if len(sys.argv) != 5:
-    sys_exit("Require four arguments: padded FASTA, SAM/BAM file, format (SAM or BAM), output BAM filenames")
+    sys.exit("Require four arguments: padded FASTA, SAM/BAM file, format (SAM or BAM), output BAM filenames")
 
 padded_ref, bam_filename, input_format, output_filename = sys.argv[1:]
 
 if not os.path.isfile(padded_ref):
-    sys_exit("Input padded reference FASTA file not found: %s" % padded_ref)
+    sys.exit("Input padded reference FASTA file not found: %s" % padded_ref)
 if not os.path.isfile(bam_filename):
-    sys_exit("Input BAM file not found: %s" % bam_filename)
+    sys.exit("Input BAM file not found: %s" % bam_filename)
 if input_format.lower() not in ["sam", "bam"]:
-    sys_exit("Input format should be SAM or BAM, not %r" % input_format)
+    sys.exit("Input format should be SAM or BAM, not %r" % input_format)
 
-#Run samtools depad:
+# Run samtools depad:
 if input_format.lower() == "sam":
     cmd = "samtools depad -S -T %s %s > %s" % (padded_ref, bam_filename, output_filename)
 else:
@@ -43,4 +38,4 @@
 return_code = os.system(cmd)
 
 if return_code:
-    sys_exit("Return code %i from command:\n%s" % (return_code, cmd))
+    sys.exit("Return code %i from command:\n%s" % (return_code, cmd))
--- a/tools/samtools_depad/tool_dependencies.xml	Thu May 21 10:53:31 2015 -0400
+++ b/tools/samtools_depad/tool_dependencies.xml	Wed Feb 01 13:15:06 2017 -0500
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
     <package name="samtools" version="0.1.19">
-        <repository changeset_revision="0e56e4dac6e7" name="package_samtools_0_1_19" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="a0ab0fae27e5" name="package_samtools_0_1_19" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>