changeset 9:d0d604b9ab9a draft

planemo upload for repository https://github.com/peterjc/pico_galaxy/tools/seq_primer_clip commit d9d02b01e942b3a7a3a13a85579ab16c17e9c459
author peterjc
date Wed, 13 May 2015 06:57:46 -0400
parents e12fd6f5992c
children 1ea4bc07d303
files test-data/MID4_GLZRM4E04_rnd30.fasta test-data/MID4_GLZRM4E04_rnd30.sff test-data/MID4_GLZRM4E04_rnd30_fclip.pair_sample_N5.sff test-data/MID4_GLZRM4E04_rnd30_frclip.pair_sample_N5.sff test-data/MID4_GLZRM4E04_rnd30_frclip.sample_N5.sff test-data/MID4_GLZRM4E04_rnd30_frclip.seq_composition.tabular tools/seq_primer_clip/README.rst tools/seq_primer_clip/seq_primer_clip.py tools/seq_primer_clip/seq_primer_clip.xml
diffstat 9 files changed, 50 insertions(+), 105 deletions(-) [+]
line wrap: on
line diff
--- a/test-data/MID4_GLZRM4E04_rnd30.fasta	Fri Nov 28 11:49:37 2014 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
->GLZRM4E04IPVGX
-CCGACTCGAGGGTGGGTTCAGGAGGTGATCACCGGCGTTCGTGCCGCCGGTTTTAATGGCGAGGGAGACTAGGGCGGCGTTAGGGTTTGGGTTCGGT
->GLZRM4E04I9EJK
-CCGACTCGAGTTTTTTAAATGCTTGATTTGGGCCGGAAAACTGATCTAGGGGGGTTTCGGTAGACTCGTGGGGGTAGATAGGCATTTTGTGGAGCTGGGTACTGGGAGAGTGATGTACGACTTTGGGGGTTCTGTGGAGAGAAGTGGCATTTGGAGAACTCGAGTCGG
->GLZRM4E04JHW0A
-TCGACTCGAGCCCCTCAAGTCCAATCCCCAAAAAATTCCGTATGCCCGAAATTCCCAAATATAATGGTACGACCGATCCTAACGAACACGTCACCTCCCACACATGTGCCATCAAAGGCAACGATTTGGAGGATGATGAGATCGAATCCGTGTTGTTGAAAAAGTTCGGAGAGACCCTCGCAAAGGGAGCAATGATCTGGTATCACAACTTACCACCAAATTCCGTTGATTCTTTCGCCATGTTAGCAGATTCGTTCATAAAAGCACATGCTGGTGCCATAAAGGTTGCAACAAGGAAATCGGACCTCTTCAAAGTAAACAAAGGGGTAACGAAATACTGAGGGAATTCGTATCCCGATTTTAAATGGAGCGTATGGACTTCCCCC
->GLZRM4E04IBNFY
-CCGACTCGAGAGGAAGATGTGGGCTATGTGTGGTTGTGGTATTGGGATTGTTGTTTAGGGAATGTTGTGGTATATGGGAACATGTGGTGCGAGTTGTTATATTGCGTTGTTATGTTTTTTGGCACATGTGGGATTGTTTAGAGGAATTGTCATGGTGTTTGCATGGTGTTCGCTATGACTTTGATTTATGAGATGATAATATTATTGTTGTGCACTTGTGAGATTTATGCACTGATCATGTTATTAGCGAGTATCGTTAATAATTATTGTCTCTATTACCTCACGAGGTAATAGAG
->GLZRM4E04IKCQP
-CCGACTCGGAGTCTTTTTTCAGGTATTGACACTAACAGAATAGGGAGTCTCGACCAGCGAGCTTCTCCCCGGAGGTAAGAAAAGAAGGGTTTCGGCACAGTTTATATACAGTTAAGATAATATCAAAAGCGGAAAAAGACAACATTTAGCACTTTTATGCAAAACATGTAATAAAGATCAGATAGTAAAGCCAAATATAACAATTATTCTAAGCTCGAATTCTTGGACCCTGAACCAGTGGTTCCGGGTCACACTTCCCCAGCAGAGTCGCCAGAGCTGTCACACCTCCTTTTTGCGCGCCCACCCCGAAGGGTTAAATGCGCGGGTGGAGTTTTTCCAATTTAAGTGACAATATTCGAAAATGGGATTATTTATTTAATTCAGAGTCGCCACTTGGGAAAGGTTTGGCTTTTGGTGTCCCAAGTCACCGGTTTATCCTGAACCCCA
->GLZRM4E04ITXFU
-CCGACTCGAGAGAAAATTCAGGCAACTAGTGCCTCAACCAAGTTTAGATAGAACACTTACCTCAAACAAGCCAAAACAAAATACCGAGAAAGCCAAACGACACTCTAGAAGTGCCATCCTACGCGTAACAACCTCTGAACGGCTCGAAACTAGCTAAAAGCAACCCAAATACATCAAATAATGCCTAAGGGAAACAACCCCAAATGATAAAGGTCGAATCTTTAATCAAAAACTCAAAGTCAACCAAAAAGTCAAACCTGAACCCCACCTCGAGT
->GLZRM4E04JAY4Z
-CCGACTCGAGGTTTGGTCTGGTATGAAGCTGGGGTTGTTTGGTGTAGATCGAGTTTTGACTCGAATCTTCAAATGAAGATTCGAGGACCTGGGGGTGGATTCGAAGTGTGTGGTTGGTAGATTTAGGTTCAGGTGGCATGGGGTTC
->GLZRM4E04H9M21
-CCGACTCGAGGAAGGGAAGTCCCTAACTTGATTGGACATGTTTTGTCGAAAGCTAGTAACTTGAAGGTATTAATATTTCTTAGGTTTGACCGTAGGTTGACGTTATAGCTACCGGGCGATTTTAGTTTCGGGACTTTGGAGGCTCGAGTCGG
->GLZRM4E04IQDP5
-CCGACTCGAGGGGAAGTTTACGTTTTTCCAGCGAGCTGGTGAGATCGGGTGAAAGGGAAAGGTTGTTGCTGCTGTTGAGTGCTATCGTGAGGAGGAAGACGGGTGGAGGTTGTTTTTGTTGGTGAAGGTTTAGGGTCTCTGGTTATTGTGTCCTACGTGAGGGGTGGTCGTTTTCCGACGATGGTGAGCTGAAGGGTGGTCGTCGATGGAGCTCGTGGATGTTGGTCCGGCATGCATGGGTCGTGTATGGCTGCTCAGGGTGTAGGCTGGCGTTTGGACAGCACAGCATCGCCGGCAGCGTAGGGTCGTTTGGACAGGAACAACGATGCGTAAAGGCAGTCTCGAGTCGG
->GLZRM4E04I0CYE
-TTCAGGAGGTGATCACCGGCGTTCGTGCCGCCGGCTTTAATGGCGAGGGAGACTAGGGAAGCGTTAGGGTTTGGGTTCGGT
->GLZRM4E04I2NA7
-CCGACTCGAGTTAAAACGCTTACGTATCTAGTCGGTAACCTGCATTAACCGGTAGTATCAATTTGGGAACATCGACTAAGTTTGCGATCTTCGAATA
->GLZRM4E04I5BWJ
-CCGACTCGAGTGTGGGAAATGCTTGCGAAACTGGAGGCATTGATTGGGGATGTTCCTGAAGGTGAGGAATTTTAGACTCTTGTGACAAGGCTTGCCTACCTTGAGGTAGAATTGGCAAGGTTAAGTCAAGAGAATGCATATCTGAACAGCGAGATAGTGGTGCTGCGATGTGCTGTGGGCGAGGATGCTCCTCAACGTGGTGCTGATCGTCTCAAGGTAAAATTCCTGAACCTAAGGCATTTGGGGGC
->GLZRM4E04IK8WX
-GCGCAAGCTTCGCGCCCAGGGTAGAATCCATAGCTGGTACACTCCGCGCGGGATCCGCG
->GLZRM4E04I22QH
-CCGACTCGAGCCCTTCTCTGGTTTTTCTCATCTCACCTTGGCAGTAATTTTTTTGAGAATGGTAACATTATATAAATATAAAACAGCGACAAAGTTTGTGCTGCTAAAAGTGATCCTTGTAAGTTTTTGTAGTGGCGGGATTCTTTTCTTTTTGGGGATGTATTCTATGATATCAAGTATGGAGTTACTATCATTTACAGGGCATTCTTTACACCAAAAAAGAAAAAGCAACTAAACAGTTCATTTTGATTTTCTGAATGGAGTTGCTAAACATCCTCAAAAACATCTAGAGTTCCTCTCGTTCCAGACTGACCACCAAATGCAGGCTGGGATCTTCTGCCGCCATTTCTTCTGTCTGACTCCACCTGTCACACCAGACCCCC
->GLZRM4E04IVVFA
-GGATGGGGTAATATGAAGGGTCGAGATCTTTATGCTGACGGGGAACGGTGTCGTTTCAACCTGAAAAGAGGCTCGAGTCGG
->GLZRM4E04ILU3V
-CCGACTCGAGCTTCCAAGTCCAAAGATGGAGAAATGAATCAAGCCCTCG
->GLZRM4E04IDVJT
-CCGACTCGAGGTGTGGTCTGGGGCGGTAGTTATTCTGCGGGGGTCGTGGGTTATAGTGGTTGCGGTAAGGAGGCTGATTTCTGGGAGGTTGAGCTGGGCCTCGGTTGGCTTGTTGTGGTGGATGGTTATAAGGTTGGGCATTCATGACCATATAAGGTTGATGAGCATATGCCAAATTTGAGTGGGGGTAGTAGTGTTGTGGGGCTCTTTTCGGAAAATGGGGCCTGGGATGACGATACTCCCTTGCTTCAGAGGCTGCCATAGCCGTTTCTTCCTTCTTCTTTCCCCTTGTCGTTCCTCCAGACCCCACCTCGAGTCGG
->GLZRM4E04I3ZJ6
-CCGACTCGAGGGGAGTAAATGCATTAAGCAGCATGACAACCCGTGTTATCAAAGGCGATAAGCGCAAAAAACTCTAAGGTCTGTTGAGGCTTTAAGCGCAAAACGCAAATAAAGCGTGGGCTTTAATGAAGAAAGGCGCAAATGCAGAAAAACAATCAAGGATTCGAGGTATTGGGCATTTGATGGGCTCGAGTCGG
->GLZRM4E04I3UBT
-CCGACTCGAGAAAACCTTTACGAATCCCTAACTCTTATCCCTCGAATCCCAGCCGTGTGCTTCAAATCTTAGATCGAAAATCAGGTCGGAACCTTATCTCGTCCAATAGCCTCCAATTTCACACCACAGCTTCCCCAAGACTTCCCCGCTCCAGTCCCACGCTCAGTTTCCTTCGAATCACCCCCGAGCTCCTCAAATCTTAGGTCAAAAGAATCGACCCAAACCCTAATCCATTCATATACCACTAAACTCACACCCTGCCACCCCCGACTCTCCCTCGTTCGTAAA
->GLZRM4E04H59S1
-CCGACTCGAGGGAAGGTTTACGTAGTAGACAAAACTAAACATACAAACTAGGAAACATAATAAATCAAACACAAGTAAGGAAAGAGGAGCATGTAGAACCGACTAAGAACCAAATTAGGAGAAAAATCAGGCAAACCCTAATTTTGCCTGGAATCACAAATTGGCCGAAGAATCTTGGTGAATTTGAACCTCATAGCCTTGCTATGAACGTATAACGATGAAATATCGTCCAAATCTTGGAGATTAAAGCCGATCTCCTTTGATTCAAAGATTGATATTTGCCAAAAGTGAGACAAACACTAAGTAACACCACAATCTTGTAATTAGCAATGAGATAACCCCGTAAAGGGGGCTCGAGTCGG
->GLZRM4E04JFA38
-CCGACTCGACGCCTCTCAAGTCCAAAAATGAAGGAAAGTGGAATCAAACCCACGATTTGGCTCATTTTCTGCCAGTTAAACCGCACCTACGGTCCATTAACCGCTTCTGCGGCTAAAGCTCCGCACCTTCACACTTATATCCGCATCTGCGGATGCGCTTTTGCGCTCAATCGTCCGCTTCTGCAGAACCTTGGGTCCTTCTCATCTCCGTATCTGCGACTGCCCTTCCACAGAAGCGGCTCCACTCCTGCGGCTCACTCGTCGCATCTGCGACCACTGACTCCCCGGTCTAAAGGCGCACCTGCGATCCCAGCCTCGCTTCTGCGGAGCCGCACCTGCGGACTT
->GLZRM4E04J4EK3
-CCGACTCGAGGTGGGGTCTGGTGCTACCTTTGATGAGGTTGTCGACATTGCTCGACAGATTGAGATGGTTCGTGGTCAGGAAAGGGTTGAGAGGGAGGCCAAGAGGCCTCGTGGTCAGGGTGGATTTAGCAGTGCTCATTTTGGGGGTCAGTTTCAGCACGGTAGAGGTCGTCATTTCAGACAGGCTCAGACAGCTTGGCCATTTCACCGTGGTGCATCATCTGGCCATGGTTCTCATAGTCATCAACATGGTCAGTCATCATTTAGTGCACTACCAGCGCAGAGTTCTCATCATGTCCCACCACTCAGGTATCCTTGGGTAGTTCTTTGGGCATCAGGAGCACTAATTTCGCCAGAGGGGGCTCGAGTCGG
->GLZRM4E04IK96G
-CCGACTCGAGCCACTCTTCAGGTCCAAACGCCATTAACAAACAGCTCGTCACACTCATACACACATGCACCAACACACCCAGCTGCGTCTTCATCGAGTTTCATCGAGTCTTCATCTTCTTCGTCGAAGGCAACACCTCACCACCCTCGAACCCGA
->GLZRM4E04JVL8Q
-CCGACCGAGGGATGGGTTTACGGTAGTTTAATAGCTCCCATAGGGTTGATTTTGGTTTTTAAAGAGCGTATCCCGGACGTTGATTTTGGAGGTCTGTAGGTCAGTTTCGATGTATTTTGGCGAAAGTTAGAAATTGGTGGAATTTTGAAAAATTTGACCGGGAGTGGACTTTTTGATGTCGGGGCCGGATCCCGATTTTGAAAGTTGAAATATGTCCATAATGTCAATTATGATTTGTGTGCAAAGTTTGGTATCAATCGGAGTTGTTTTGGTTTGAATCGGCGTCGGTTTCAGAATTTGAAAGTTCATAAGTTCATTAGGCATGAATTGGGGTGCGATTCGTATTTTTGATGTTGTTTGATGCGATTTATGGCCTCGAGTCACTCCGTTAGGTGTTTTGAAACTTTTTGGTATATTCGGAAGGGGTCCCGAGTGTGATTCGGATCGATAACAGAACAAAATTT
->GLZRM4E04IOQ36
-CCGACTCGAGTTTTTAAATGCATAATAATACAAATTTGTTGCTTAATAGTATTAGAGAGAGGCATAAAATGATGTTCCCTGTATATGAGTTGATTTACGCAAATGTCCCTCTTTTAGGCTATTATTCAAATTTTGTTAATATTTTTAAAAAAATTATTTAGTCCTAAAGAAATTACCCCTTCAGGGTAACGTTAGACCTTTTGTTCATATAGTTTTCAGTTTGCTCAATCGTACATATAAAATATTAGAATGTGATCTAACGTTATAATAAAGTATCAAATTTAAACCATACTCTATTTTCACGTAAGATTTTCAGTTTGCTCAAGAGTGGAAGAGAAAATAAAAGGGTACATTTACTAAGCAGCTATGCCAAACTGGGAAAAATTTCT
->GLZRM4E04JBJJ1
-CCGACTCGAGGGGTAGAAATGCAAAGGAGGTAAGGGACATAAGGGTGCCTATAGGTTGAGAATTGGGTCATGGAACATAGTTACATTGATGGGTAAGTCTATAGAGCTGGCGAAGATCCTACAAAAGAGGAAAGTCAATATAATGTATGTCCAAGAGACTCGGTGGATAGGGTCGAGGGCGAAGAATACAGACGAGTATAAGCTATGGTACTTTGGAGTCCTGAAGGGTAAGAATGGTGTAGGCATTTAGTCGACTCGAGTCGG
->GLZRM4E04IEFNO
-CCGACTCGAGAGGAGATTCAGGGACAAAGAAGAGGAGCTCGAGGTGAGCAGTGGGGTCGAGGCACAATGTGCCAACCCAAGCCCAAGTGGTTTCATTGTGTGCCGAGCTCGGGGAGTGTCAACCCAAAATGGTCGCTCTGAGTGGCGAGGTCACTGAGAAGGCAGTGGGTTTAGAGAAGGCAGAGTTGGCCCAGCTATCAACTGCAAGGAGAACATGGGCTTTAGAGATCATGATCCGCGTTCTCAGTTCTGAGTGGGAGGGTGATTTGGACACGGCCAAGCTCAGAGAAGAGCAGCTTGATGAGCGGATAGGGGAGCTGGAAAAAGAGACTTTGGGCCTTAGTGATCGAGTTGCTGCTCTCGAGGCCGAAAAGGCACAGTTATTGGCTCAACCGTCCTCCTCCCGCGCTTCTGCTTTCCTGATGTTGCACGATATTGTATGAGGAATGGATTCACGCTGAAGCTCAGCTAGA
->GLZRM4E04JOT5I
-CCGACTCGAGGGGAGTTTACGGGAGTACTTCTCATGAGGTATTGTGTATAAGTGATATATTAGTCATTTGAGGGGGAGAGTTTGAGATCAGATAAGAGATTCCTGTATTATTGAGGTTTAGAGACTGGATGTTCTCAAAGGCAAACTATTCCTTGGTTGCGGATCGTAAAGGGAGGCTCGAGTCGG
->GLZRM4E04J4HNG
-CCGACTCGAGCCGCCCACTGTGGTAGTCAAACAATCGCGAAT
->GLZRM4E04JC544
-CCGACTCGAGTTTTTTAAATGCATATTCGGGGTACAACCAAATTAAAATGGACCCCAGTGACGAAGAAAAACTTACTTTCATCACAGACAGGGGGACGTTACAGTTATAAAGTAATGCCCTTTGGTTCTCAAAAATAGCTGGAGCAACCTATCAAAGGTTGGTCACCAAAATATTCCAAGAATATTTAGAAAAATACATAGAGGTATATATAGACGATATGCTCGTCAAAACCAAACATTCTCATGATCATATTTCTCATTTATCTGTTACATTTGAAATTTTACGAAATTTAATATGAAACTCAATCCAGAAAATGTGCATTTAGGGGGC
Binary file test-data/MID4_GLZRM4E04_rnd30.sff has changed
Binary file test-data/MID4_GLZRM4E04_rnd30_fclip.pair_sample_N5.sff has changed
Binary file test-data/MID4_GLZRM4E04_rnd30_frclip.pair_sample_N5.sff has changed
Binary file test-data/MID4_GLZRM4E04_rnd30_frclip.sample_N5.sff has changed
--- a/test-data/MID4_GLZRM4E04_rnd30_frclip.seq_composition.tabular	Fri Nov 28 11:49:37 2014 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-Letter	Count	Percentage
-A	1733	27.68
-C	1267	20.24
-G	1551	24.78
-T	1709	27.30
--- a/tools/seq_primer_clip/README.rst	Fri Nov 28 11:49:37 2014 -0500
+++ b/tools/seq_primer_clip/README.rst	Wed May 13 06:57:46 2015 -0400
@@ -1,7 +1,7 @@
 Galaxy tool to primer clip (trim) FASTA, FASTQ or SFF reads
 ===========================================================
 
-This tool is copyright 2011-2014 by Peter Cock, The James Hutton Institute
+This tool is copyright 2011-2015 by Peter Cock, The James Hutton Institute
 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved.
 See the licence text below (MIT licence).
 
@@ -65,6 +65,9 @@
 v0.0.11 - Correct automated dependency definition.
 v0.0.12 - Simplified XML to apply input format to output data.
         - Tool definition now embeds citation information.
+v0.0.13 - Use ``format_source=...`` tag.
+        - Reorder XML elements (internal change only).
+        - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
 ======= ======================================================================
 
 
@@ -78,19 +81,24 @@
 Development has now moved to a dedicated GitHub repository:
 https://github.com/peterjc/pico_galaxy
 
-For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball use
-the following command from the Galaxy root folder::
 
-    $ tar -czf seq_primer_clip.tar.gz tools/seq_primer_clip/README.rst tools/seq_primer_clip/seq_primer_clip.* tools/seq_primer_clip/tool_dependencies.xml test-data/dop_primers.fasta test-data/MID4_GLZRM4E04_rnd30*
+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)::
 
-Check this worked::
+    $ planemo shed_upload --shed_target testtoolshed --check_diff ~/repositories/pico_galaxy/tools/seq_primer_clip/
+    ...
 
-    $ tar -tzf seq_primer_clip.tar.gz
-    tools/seq_primer_clip/README.rst
-    tools/seq_primer_clip/seq_primer_clip.xml
-    tools/seq_primer_clip/seq_primer_clip.py
-    tools/seq_primer_clip/tool_dependencies.xml
-    test-data/dop_primers.fasta
+or::
+
+    $ planemo shed_upload --shed_target toolshed --check_diff ~/repositories/pico_galaxy/tools/seq_primer_clip/
+    ...
+
+To just build and check the tar ball, use::
+
+    $ planemo shed_upload --tar_only  ~/repositories/pico_galaxy/tools/seq_primer_clip/
+    ...
+    $ tar -tzf shed_upload.tar.gz 
     test-data/MID4_GLZRM4E04_rnd30.fasta
     test-data/MID4_GLZRM4E04_rnd30.fastqsanger
     test-data/MID4_GLZRM4E04_rnd30_fclip.fasta
@@ -100,6 +108,11 @@
     test-data/MID4_GLZRM4E04_rnd30_frclip.fastqsanger
     test-data/MID4_GLZRM4E04_rnd30_frclip.sff
     test-data/MID4_GLZRM4E04_rnd30.sff
+    test-data/dop_primers.fasta
+    tools/seq_primer_clip/README.rst
+    tools/seq_primer_clip/seq_primer_clip.py
+    tools/seq_primer_clip/seq_primer_clip.xml
+    tools/seq_primer_clip/tool_dependencies.xml
 
 
 Licence (MIT)
--- a/tools/seq_primer_clip/seq_primer_clip.py	Fri Nov 28 11:49:37 2014 -0500
+++ b/tools/seq_primer_clip/seq_primer_clip.py	Wed May 13 06:57:46 2015 -0400
@@ -26,8 +26,8 @@
 (formerly the Scottish Crop Research Institute, SCRI), UK. All rights reserved.
 See accompanying text file for licence details (MIT/BSD style).
 
-This is version 0.0.8 of the script. Currently it uses Python's regular
-expression engine for finding the primers, which for my needs is fast enough.
+NOTE: Currently it uses Python's regular expression engine for finding the
+primers, which for my needs is fast enough.
 """
 import sys
 import re
@@ -35,10 +35,10 @@
 from galaxy_utils.sequence.fastq import fastqReader, fastqWriter
 
 if "-v" in sys.argv or "--version" in sys.argv:
-    print "v0.0.5"
+    print "v0.0.12"
     sys.exit(0)
 
-def stop_err(msg, err=1):
+def sys_exit(msg, err=1):
     sys.stderr.write(msg)
     sys.exit(err)
 
@@ -46,7 +46,7 @@
     from Bio.Seq import reverse_complement
     from Bio.SeqIO.SffIO import SffIterator, SffWriter
 except ImportError:
-    stop_err("Requires Biopython 1.54 or later")
+    sys_exit("Requires Biopython 1.54 or later")
 try:
     from Bio.SeqIO.SffIO import ReadRocheXmlManifest
 except ImportError:
@@ -57,30 +57,30 @@
 try:
     in_file, seq_format, primer_fasta, primer_type, mm, min_len, keep_negatives, out_file = sys.argv[1:]
 except ValueError:
-    stop_err("Expected 8 arguments, got %i:\n%s" % (len(sys.argv)-1, " ".join(sys.argv)))
+    sys_exit("Expected 8 arguments, got %i:\n%s" % (len(sys.argv)-1, " ".join(sys.argv)))
 
 if in_file == primer_fasta:
-    stop_err("Same file given as both primer sequences and sequences to clip!")
+    sys_exit("Same file given as both primer sequences and sequences to clip!")
 if in_file == out_file:
-    stop_err("Same file given as both sequences to clip and output!")
+    sys_exit("Same file given as both sequences to clip and output!")
 if primer_fasta == out_file:
-    stop_err("Same file given as both primer sequences and output!")
+    sys_exit("Same file given as both primer sequences and output!")
 
 try:
     mm = int(mm)
 except ValueError:
-    stop_err("Expected non-negative integer number of mismatches (e.g. 0 or 1), not %r" % mm)
+    sys_exit("Expected non-negative integer number of mismatches (e.g. 0 or 1), not %r" % mm)
 if mm < 0:
-    stop_err("Expected non-negtive integer number of mismatches (e.g. 0 or 1), not %r" % mm)
+    sys_exit("Expected non-negtive integer number of mismatches (e.g. 0 or 1), not %r" % mm)
 if mm not in [0,1,2]:
     raise NotImplementedError
 
 try:
     min_len = int(min_len)
 except ValueError:
-    stop_err("Expected non-negative integer min_len (e.g. 0 or 1), not %r" % min_len)
+    sys_exit("Expected non-negative integer min_len (e.g. 0 or 1), not %r" % min_len)
 if min_len < 0:
-    stop_err("Expected non-negtive integer min_len (e.g. 0 or 1), not %r" % min_len)
+    sys_exit("Expected non-negtive integer min_len (e.g. 0 or 1), not %r" % min_len)
 
 
 if keep_negatives.lower() in ["true", "yes", "on"]:
@@ -88,7 +88,7 @@
 elif keep_negatives.lower() in ["false", "no", "off"]:
     keep_negatives = False
 else:
-    stop_err("Expected boolean for keep_negatives (e.g. true or false), not %r" % keep_negatives)
+    sys_exit("Expected boolean for keep_negatives (e.g. true or false), not %r" % keep_negatives)
 
 
 if primer_type.lower() == "forward":
@@ -101,7 +101,7 @@
     forward = False
     rc = True
 else:
-    stop_err("Expected foward, reverse or reverse-complement not %r" % primer_type)
+    sys_exit("Expected foward, reverse or reverse-complement not %r" % primer_type)
 
 
 ambiguous_dna_values = {
@@ -281,7 +281,7 @@
                     negs += 1
                     writer.write(record)
                 else:
-                    short_negs += 1
+                    short_neg += 1
     else:
         for record in reader:
             seq = record.sequence.upper()
@@ -301,7 +301,7 @@
                     negs += 1
                     writer.write(record)
                 else:
-                    short_negs += 1
+                    short_neg += 1
 elif seq_format.lower()=="fasta":
     in_handle = open(in_file, "rU")
     out_handle = open(out_file, "w")
@@ -326,7 +326,7 @@
                     negs += 1
                     writer.write(record)
                 else:
-                    short_negs += 1
+                    short_neg += 1
     else:
         for record in reader:
             seq = record.sequence.upper()
@@ -345,9 +345,9 @@
                     negs += 1
                     writer.write(record)
                 else:
-                    short_negs += 1
+                    short_neg += 1
 else:
-    stop_err("Unsupported file type %r" % seq_format)
+    sys_exit("Unsupported file type %r" % seq_format)
 in_handle.close()
 out_handle.close()
 
--- a/tools/seq_primer_clip/seq_primer_clip.xml	Fri Nov 28 11:49:37 2014 -0500
+++ b/tools/seq_primer_clip/seq_primer_clip.xml	Wed May 13 06:57:46 2015 -0400
@@ -1,18 +1,18 @@
-<tool id="seq_primer_clip" name="Primer clip sequences" version="0.0.12">
+<tool id="seq_primer_clip" name="Primer clip sequences" version="0.0.13">
     <description>Trim off 5' or 3' primers</description>
     <requirements>
         <requirement type="package" version="1.62">biopython</requirement>
         <requirement type="python-module">Bio</requirement>
     </requirements>
-    <version_command interpreter="python">seq_primer_clip.py --version</version_command>   
-    <command interpreter="python">
-seq_primer_clip.py $input_file $input_file.ext $primer_fasta $primer_type $mm $min_len $keep_negatives $output_file
-    </command>
     <stdio>
         <!-- Anything other than zero is an error -->
         <exit_code range="1:" />
         <exit_code range=":-1" />
     </stdio>
+    <version_command interpreter="python">seq_primer_clip.py --version</version_command>   
+    <command interpreter="python">
+seq_primer_clip.py $input_file $input_file.ext $primer_fasta $primer_type $mm $min_len $keep_negatives $output_file
+    </command>
     <inputs>
         <param name="input_file" type="data" format="fasta,fastq,sff" label="Sequence file to clip" description="FASTA, FASTQ, or SFF format."/>
         <param name="primer_fasta" type="data" format="fasta" label="FASTA file containing primer(s)"/>
@@ -28,7 +28,7 @@
         <param name="min_len" type="integer" label="Minimum length for (clipped) sequences " value="1"/>
     </inputs>
     <outputs>
-        <data name="output_file" format="input" metadata_source="input_file" label="$primer_type primer clipped"/>
+        <data name="output_file" format_source="input_file" metadata_source="input_file" label="$primer_type primer clipped"/>
     </outputs>
     <tests>
         <test>
@@ -86,9 +86,6 @@
             <output name="output_file" file="MID4_GLZRM4E04_rnd30_frclip.sff" ftype="sff" />
         </test>
     </tests>
-    <requirements>
-        <requirement type="python-module">Bio</requirement>
-    </requirements>
     <help>
 
 **What it does**