changeset 5:7e92afcc9a76 draft

planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_length commit d67596914a7bbe183851437eaafe8c7305877e5a-dirty
author peterjc
date Fri, 22 Feb 2019 10:24:41 -0500
parents 64ff09c8fd83
children 6db2d2a796ef
files tools/seq_length/seq_length.py tools/seq_length/tool_dependencies.xml
diffstat 2 files changed, 53 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/tools/seq_length/seq_length.py	Fri Nov 09 11:09:08 2018 -0500
+++ b/tools/seq_length/seq_length.py	Fri Feb 22 10:24:41 2019 -0500
@@ -29,20 +29,45 @@
 """
 
 parser = OptionParser(usage=usage)
-parser.add_option('-i', '--input', dest='input',
-                  default=None, help='Input sequence filename (FASTA, FASTQ, etc)',
-                  metavar="FILE")
-parser.add_option('-f', '--format', dest='format',
-                  default=None, help='Input sequence format (FASTA, QUAL, FASTQ, SFF)')
-parser.add_option('-o', '--output', dest='output',
-                  default=None, help='Output filename (tabular)',
-                  metavar="FILE")
-parser.add_option("-s", "--stats", dest="stats",
-                  default=False, action="store_true",
-                  help="Compute statistics (median, N50 - will require much more RAM).")
-parser.add_option("-v", "--version", dest="version",
-                  default=False, action="store_true",
-                  help="Show version and quit")
+parser.add_option(
+    "-i",
+    "--input",
+    dest="input",
+    default=None,
+    help="Input sequence filename (FASTA, FASTQ, etc)",
+    metavar="FILE",
+)
+parser.add_option(
+    "-f",
+    "--format",
+    dest="format",
+    default=None,
+    help="Input sequence format (FASTA, QUAL, FASTQ, SFF)",
+)
+parser.add_option(
+    "-o",
+    "--output",
+    dest="output",
+    default=None,
+    help="Output filename (tabular)",
+    metavar="FILE",
+)
+parser.add_option(
+    "-s",
+    "--stats",
+    dest="stats",
+    default=False,
+    action="store_true",
+    help="Compute statistics (median, N50 - will require much more RAM).",
+)
+parser.add_option(
+    "-v",
+    "--version",
+    dest="version",
+    default=False,
+    action="store_true",
+    help="Show version and quit",
+)
 options, args = parser.parse_args()
 
 if options.version:
@@ -125,11 +150,14 @@
 
 if sys.version_info[0] >= 3:
     from statistics import median
-    for test in [{1: 4, 2: 3},
-                 {1: 4, 3: 6},
-                 {1: 4, 5: 4},
-                 {0: 5, 1: 1, 2: 1, 3: 5},
-                 {0: 5, 1: 1, 2: 1, 3: 1, 4: 5}]:
+
+    for test in [
+        {1: 4, 2: 3},
+        {1: 4, 3: 6},
+        {1: 4, 5: 4},
+        {0: 5, 1: 1, 2: 1, 3: 5},
+        {0: 5, 1: 1, 2: 1, 3: 1, 4: 5},
+    ]:
         test_list = []
         for v, c in test.items():
             test_list.extend([v] * c)
@@ -208,7 +236,9 @@
             else:
                 length_min = min(length_min, length)
                 length_max = max(length_max, length)
-print("%i sequences, total length %i, mean %0.1f" % (count, total, float(total) / count))
+print(
+    "%i sequences, total length %i, mean %0.1f" % (count, total, float(total) / count)
+)
 if not count:
     pass
 elif not stats:
--- a/tools/seq_length/tool_dependencies.xml	Fri Nov 09 11:09:08 2018 -0500
+++ b/tools/seq_length/tool_dependencies.xml	Fri Feb 22 10:24:41 2019 -0500
@@ -1,6 +1,6 @@
-<?xml version="1.0"?>
+<?xml version="1.0" ?>
 <tool_dependency>
     <package name="biopython" version="1.67">
-        <repository changeset_revision="fc45a61abc2f" name="package_biopython_1_67" owner="biopython" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="fc45a61abc2f" name="package_biopython_1_67" owner="biopython" toolshed="https://testtoolshed.g2.bx.psu.edu"/>
     </package>
-</tool_dependency>
+</tool_dependency>
\ No newline at end of file