# HG changeset patch # User peterjc # Date 1427463267 14400 # Node ID 02c13ef1a669e6b2a16559b0fc8bcec43831f9b5 # Parent da64f6a9e32b55c30db378b694dc3fedc03eb6e8 Uploaded v0.2.1, fixed missing test file, more tests. diff -r da64f6a9e32b -r 02c13ef1a669 tools/sample_seqs/README.rst --- a/tools/sample_seqs/README.rst Fri Mar 06 11:48:09 2015 -0500 +++ b/tools/sample_seqs/README.rst Fri Mar 27 09:34:27 2015 -0400 @@ -1,7 +1,7 @@ Galaxy tool to sub-sample sequence files ======================================== -This tool is copyright 2014 by Peter Cock, The James Hutton Institute +This tool is copyright 2014-2014 by Peter Cock, The James Hutton Institute (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved. See the licence text below (MIT licence). @@ -63,6 +63,9 @@ This works by first counting all your sequences, then calculates the percentage required in order to sample them uniformly (evenly). This makes two passes through the input and is therefore slower. +v0.2.1 - Was missing a file for the functional tests. + - Included testing of stdout messages. + - Includes testing of failure modes. ======= ====================================================================== diff -r da64f6a9e32b -r 02c13ef1a669 tools/sample_seqs/sample_seqs.py --- a/tools/sample_seqs/sample_seqs.py Fri Mar 06 11:48:09 2015 -0500 +++ b/tools/sample_seqs/sample_seqs.py Fri Mar 27 09:34:27 2015 -0400 @@ -64,7 +64,7 @@ options, args = parser.parse_args() if options.version: - print("v0.2.0") + print("v0.2.1") sys.exit(0) in_file = options.input @@ -172,7 +172,7 @@ if N < 1: sys_exit("Bad -c count argument %r" % options.count) total = count_sequences(in_file, seq_format) - print("Input file has %i sequences" % total) + sys.stderr.write("Input file has %i sequences\n" % total) if interleaved: # Paired if total % 2: diff -r da64f6a9e32b -r 02c13ef1a669 tools/sample_seqs/sample_seqs.xml --- a/tools/sample_seqs/sample_seqs.xml Fri Mar 06 11:48:09 2015 -0500 +++ b/tools/sample_seqs/sample_seqs.xml Fri Mar 27 09:34:27 2015 -0400 @@ -1,4 +1,4 @@ - + e.g. to reduce coverage biopython @@ -122,25 +122,52 @@ + + + + - + + + + + - + - - + + + + + + + + + + + + + + + + + + + + +