changeset 28:e61d180e8deb draft default tip

planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_rename commit d67596914a7bbe183851437eaafe8c7305877e5a-dirty
author peterjc
date Fri, 22 Feb 2019 10:26:16 -0500
parents 67bababc1f88
children
files tools/seq_rename/seq_rename.py tools/seq_rename/tool_dependencies.xml
diffstat 2 files changed, 22 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/tools/seq_rename/seq_rename.py	Fri Nov 09 11:12:10 2018 -0500
+++ b/tools/seq_rename/seq_rename.py	Fri Feb 22 10:26:16 2019 -0500
@@ -34,9 +34,11 @@
 try:
     tabular_file, old_col_arg, new_col_arg, in_file, seq_format, out_file = sys.argv[1:]
 except ValueError:
-    sys.exit("Expected six arguments (tabular file, old col, new col, "
-             "input file, format, output file), got %i:\n%s"
-             % (len(sys.argv) - 1, " ".join(sys.argv)))
+    sys.exit(
+        "Expected six arguments (tabular file, old col, new col, "
+        "input file, format, output file), got %i:\n%s"
+        % (len(sys.argv) - 1, " ".join(sys.argv))
+    )
 
 try:
     if old_col_arg.startswith("c"):
@@ -77,11 +79,15 @@
             old = parts[old_col].strip().split(None, 1)
             new = parts[new_col].strip().split(None, 1)
             if not old_warn and len(old) > 1:
-                old_warn = "WARNING: Some of your old identifiers had white space in them, " + \
-                           "using first word only. e.g.:\n%s\n" % parts[old_col].strip()
+                old_warn = (
+                    "WARNING: Some of your old identifiers had white space in them, "
+                    + "using first word only. e.g.:\n%s\n" % parts[old_col].strip()
+                )
             if not new_warn and len(new) > 1:
-                new_warn = "WARNING: Some of your new identifiers had white space in them, " + \
-                           "using first word only. e.g.:\n%s\n" % parts[new_col].strip()
+                new_warn = (
+                    "WARNING: Some of your new identifiers had white space in them, "
+                    + "using first word only. e.g.:\n%s\n" % parts[new_col].strip()
+                )
             yield old[0], new[0]
     handle.close()
     if old_warn:
@@ -133,13 +139,17 @@
     in_handle.close()
 else:
     # Use Galaxy for FASTA, QUAL or FASTQ
-    if seq_format.lower() in ["fasta", "csfasta"] or seq_format.lower().startswith("qual"):
+    if seq_format.lower() in ["fasta", "csfasta"] or seq_format.lower().startswith(
+        "qual"
+    ):
         from galaxy_utils.sequence.fasta import fastaReader, fastaWriter
+
         reader = fastaReader(open(in_file, "rU"))
         writer = fastaWriter(open(out_file, "w"))
         marker = ">"
     elif seq_format.lower().startswith("fastq"):
         from galaxy_utils.sequence.fastq import fastqReader, fastqWriter
+
         reader = fastqReader(open(in_file, "rU"))
         writer = fastqWriter(open(out_file, "w"))
         marker = "@"
--- a/tools/seq_rename/tool_dependencies.xml	Fri Nov 09 11:12:10 2018 -0500
+++ b/tools/seq_rename/tool_dependencies.xml	Fri Feb 22 10:26:16 2019 -0500
@@ -1,9 +1,9 @@
-<?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>
     <package name="galaxy_sequence_utils" version="1.0.1">
-        <repository changeset_revision="c38bd3fe9da6" name="package_galaxy_sequence_utils_1_0_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="c38bd3fe9da6" name="package_galaxy_sequence_utils_1_0_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu"/>
     </package>
-</tool_dependency>
+</tool_dependency>
\ No newline at end of file